mirror of
https://git.yoctoproject.org/poky
synced 2026-09-12 06:49:32 +02:00
Compare commits
689 Commits
1.2_M4.rc4
...
denzil-7.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3456295898 | ||
|
|
c917351c9b | ||
|
|
f3db1cd8ff | ||
|
|
b0689417df | ||
|
|
270402dd38 | ||
|
|
5d30ffd8f8 | ||
|
|
c2c8bb40e8 | ||
|
|
625044e9a8 | ||
|
|
d571e5a68a | ||
|
|
8e078932c3 | ||
|
|
151d4fbc4e | ||
|
|
caa1d03089 | ||
|
|
a86e32a18b | ||
|
|
156c2554b7 | ||
|
|
b6037b6d2f | ||
|
|
cf77faba91 | ||
|
|
88b65c79ac | ||
|
|
bfae0622b5 | ||
|
|
01c1421270 | ||
|
|
2ccb03f9b7 | ||
|
|
07f304f4e2 | ||
|
|
db915496d3 | ||
|
|
8fe4344e74 | ||
|
|
3c57cb356e | ||
|
|
38d6972032 | ||
|
|
ef745cb34f | ||
|
|
a6f0dcbe7d | ||
|
|
cf796f8908 | ||
|
|
e416fb6920 | ||
|
|
aa66dc91d3 | ||
|
|
b45184aef3 | ||
|
|
0e43be806d | ||
|
|
d6935247dd | ||
|
|
b8f6d9cbfd | ||
|
|
2288ff099c | ||
|
|
93cc23571e | ||
|
|
95f2a5b635 | ||
|
|
75997b4565 | ||
|
|
970d279774 | ||
|
|
40e6fc6a65 | ||
|
|
e9c2218231 | ||
|
|
84399e189b | ||
|
|
846b7c3887 | ||
|
|
732007cbb6 | ||
|
|
9945923c8b | ||
|
|
9bf253f467 | ||
|
|
d156f75fea | ||
|
|
809d97b938 | ||
|
|
e5a85ac2e4 | ||
|
|
b4bb378261 | ||
|
|
e7d4eba0a9 | ||
|
|
aad5c9f699 | ||
|
|
42d9652fb1 | ||
|
|
4e09d164d9 | ||
|
|
d567e770c3 | ||
|
|
a5f5b1e80a | ||
|
|
d47234d4c9 | ||
|
|
3cdd930eeb | ||
|
|
cfd36177f7 | ||
|
|
1ecc27c20c | ||
|
|
82114edb4a | ||
|
|
a62752bb4f | ||
|
|
7ffad91e79 | ||
|
|
1e2d6bffc5 | ||
|
|
cb1c31939d | ||
|
|
bec76a3813 | ||
|
|
ead623b2a0 | ||
|
|
b973813796 | ||
|
|
8941d5aa3b | ||
|
|
f6876adb6a | ||
|
|
3c3614c562 | ||
|
|
1c71304f81 | ||
|
|
5be28549ae | ||
|
|
bbe83b55cd | ||
|
|
3c363a70aa | ||
|
|
2fab410f2e | ||
|
|
4b8d430c1f | ||
|
|
b0f05958fc | ||
|
|
57cdce3108 | ||
|
|
241653a01b | ||
|
|
f6fb4890df | ||
|
|
b4de44f425 | ||
|
|
b32c50e016 | ||
|
|
b5013e9e9e | ||
|
|
0cd0a3b475 | ||
|
|
825c647f65 | ||
|
|
16b6bc4288 | ||
|
|
4ef357f033 | ||
|
|
91714ea8ae | ||
|
|
fbb459aab9 | ||
|
|
7b7f3cff44 | ||
|
|
a512e68202 | ||
|
|
ef789c1327 | ||
|
|
2011408939 | ||
|
|
9520635a00 | ||
|
|
a259fdb296 | ||
|
|
55997cbf3d | ||
|
|
988318927a | ||
|
|
bf9a5226fc | ||
|
|
d72eea5a5d | ||
|
|
a99b03e3ed | ||
|
|
1773d1da62 | ||
|
|
d8ccc44114 | ||
|
|
6f3e6c75de | ||
|
|
89fa2c1fc6 | ||
|
|
e22b4411ae | ||
|
|
33921847a2 | ||
|
|
5427f5d70f | ||
|
|
4624b5eefb | ||
|
|
e7376bb459 | ||
|
|
c2bbe5f5d3 | ||
|
|
758677e212 | ||
|
|
b96bd8465a | ||
|
|
65ffa73950 | ||
|
|
a76fc366ce | ||
|
|
759237f721 | ||
|
|
3e632506c2 | ||
|
|
1b9306705c | ||
|
|
65706548f6 | ||
|
|
bc6b04fe22 | ||
|
|
8a51a8afe8 | ||
|
|
2517376ee8 | ||
|
|
9078e985ac | ||
|
|
b123553c1a | ||
|
|
717704d12c | ||
|
|
e5c5e20a5e | ||
|
|
96631f080b | ||
|
|
78d15a8015 | ||
|
|
ffff5fa2d7 | ||
|
|
119b7ff164 | ||
|
|
1162729c79 | ||
|
|
4591963649 | ||
|
|
3f30bf4eab | ||
|
|
ea032bb2c3 | ||
|
|
4bfb54e0ba | ||
|
|
729b396b21 | ||
|
|
bdb918f808 | ||
|
|
e4f8c7f693 | ||
|
|
4539cf1936 | ||
|
|
6631752c25 | ||
|
|
75b7901f22 | ||
|
|
c520132cb8 | ||
|
|
a8d4eb449f | ||
|
|
4253c34000 | ||
|
|
1a70ddc4e8 | ||
|
|
6352d0a9a1 | ||
|
|
0a6f9a5f5a | ||
|
|
7c5318e1a0 | ||
|
|
88927f4f1f | ||
|
|
68888987ce | ||
|
|
3129f4ff0e | ||
|
|
09ae715bb1 | ||
|
|
c26cfe7738 | ||
|
|
81aac104fa | ||
|
|
bc754beb3a | ||
|
|
e20af93811 | ||
|
|
235667966c | ||
|
|
258bbaa1d2 | ||
|
|
f44faa8757 | ||
|
|
3cf5fc2272 | ||
|
|
ffd554d2ff | ||
|
|
4899d07aa7 | ||
|
|
0b71ac7a99 | ||
|
|
bdebedb6cf | ||
|
|
b2b365e8f0 | ||
|
|
738f163797 | ||
|
|
1ddd5378ec | ||
|
|
ebbd09e21d | ||
|
|
09c83947da | ||
|
|
8c6455b6db | ||
|
|
73cdebf60d | ||
|
|
6b06a4fa1b | ||
|
|
2dcbb48df9 | ||
|
|
fb2335fa2b | ||
|
|
e972d78009 | ||
|
|
91d6344765 | ||
|
|
a707b3269c | ||
|
|
0d3748ca5d | ||
|
|
5f2b526109 | ||
|
|
6bb0fdda40 | ||
|
|
5ad28e97e6 | ||
|
|
495ea21c8b | ||
|
|
94e3e894d0 | ||
|
|
8389decfe6 | ||
|
|
7412611252 | ||
|
|
026d502b2a | ||
|
|
e81f7c6152 | ||
|
|
119e1b7dc9 | ||
|
|
5b3a0eac61 | ||
|
|
4c4924ad1b | ||
|
|
9e6d1101b4 | ||
|
|
2bddf70a84 | ||
|
|
6698060d8e | ||
|
|
bd3cd64da3 | ||
|
|
c88f25ddb4 | ||
|
|
ef215694de | ||
|
|
71a6fb605a | ||
|
|
bfc8589048 | ||
|
|
6514e193ac | ||
|
|
44fb9daa81 | ||
|
|
309b2c090e | ||
|
|
67c7bc5e6c | ||
|
|
e06e502bbb | ||
|
|
89c0e81273 | ||
|
|
78a5471a29 | ||
|
|
b30a243f3f | ||
|
|
20657c1fa0 | ||
|
|
3029a08744 | ||
|
|
d376a4e8f1 | ||
|
|
0d0846e06f | ||
|
|
59ac33c77f | ||
|
|
3cb36a5ed9 | ||
|
|
75e32007ef | ||
|
|
d52e74cee9 | ||
|
|
f1630d3cd4 | ||
|
|
b7f1a8f870 | ||
|
|
015f117d85 | ||
|
|
b8338046ba | ||
|
|
7552ccd06c | ||
|
|
e24d5cc2cd | ||
|
|
1f2fc974df | ||
|
|
a473ba170d | ||
|
|
a5fe09c6aa | ||
|
|
2072256b05 | ||
|
|
b623203ac9 | ||
|
|
c7e4a6ae2c | ||
|
|
1628159028 | ||
|
|
b477f676e3 | ||
|
|
9d2534ab24 | ||
|
|
df815f20c8 | ||
|
|
b64eefe2bb | ||
|
|
4abd299bf0 | ||
|
|
30c3c8420e | ||
|
|
a74fb01b6b | ||
|
|
c003c04590 | ||
|
|
35cc0b023f | ||
|
|
c2826b50ce | ||
|
|
75225bcc84 | ||
|
|
d3204ddc12 | ||
|
|
7c7ac8548d | ||
|
|
bbf95cae4c | ||
|
|
3df821277d | ||
|
|
4f4685469a | ||
|
|
d1bc1191d6 | ||
|
|
5c507a2fd7 | ||
|
|
bf4740cf66 | ||
|
|
24ffb5c0b1 | ||
|
|
a92fed4fe5 | ||
|
|
a518e1e3b1 | ||
|
|
fc9716930a | ||
|
|
f99ced96cf | ||
|
|
d0f0d1b41d | ||
|
|
77203b75f5 | ||
|
|
a0f1aca7a0 | ||
|
|
b3de1f1140 | ||
|
|
6e93ac2581 | ||
|
|
c1bfbf7168 | ||
|
|
5a7d852a94 | ||
|
|
3bf8069100 | ||
|
|
cbd192a6c5 | ||
|
|
6d22ae627b | ||
|
|
49a58c65b6 | ||
|
|
06cde35657 | ||
|
|
196a62b50c | ||
|
|
8ddaa3ede8 | ||
|
|
52ccf5a9eb | ||
|
|
b2c9b25f97 | ||
|
|
5a1fb95a8d | ||
|
|
22b9983cc7 | ||
|
|
7f5e6a1959 | ||
|
|
01025ad2c4 | ||
|
|
71580376c9 | ||
|
|
0774a11505 | ||
|
|
4d2d5abd8b | ||
|
|
884034b256 | ||
|
|
ee98021efe | ||
|
|
f52747d7a2 | ||
|
|
1bf998fe41 | ||
|
|
1b3c00a34f | ||
|
|
b3f870297e | ||
|
|
93deb57c91 | ||
|
|
2883b754a1 | ||
|
|
86325bbc5d | ||
|
|
746d718f53 | ||
|
|
c498338197 | ||
|
|
ba554bd865 | ||
|
|
0dda5d88a5 | ||
|
|
06f44161f1 | ||
|
|
4b4a018466 | ||
|
|
caf6532b51 | ||
|
|
a81cb954bb | ||
|
|
0089bb9ad0 | ||
|
|
ce8d4157db | ||
|
|
66b18cb5cd | ||
|
|
bbf33914ea | ||
|
|
e1e12bfd0c | ||
|
|
bc7f18c61d | ||
|
|
89e2958475 | ||
|
|
943c6917e6 | ||
|
|
2b6e86beae | ||
|
|
42a9a50771 | ||
|
|
74c34c9d3c | ||
|
|
e9b8cf485c | ||
|
|
2863d953bd | ||
|
|
716bdd4bf5 | ||
|
|
dfecd3e3d7 | ||
|
|
142de43be2 | ||
|
|
752c707df3 | ||
|
|
d20a24310e | ||
|
|
8e04664ffd | ||
|
|
3ab5d73f0c | ||
|
|
33f048240d | ||
|
|
0bf04aa4ad | ||
|
|
612555e6fe | ||
|
|
35196ff703 | ||
|
|
0a48c697d7 | ||
|
|
7e56770a60 | ||
|
|
9a548f0ee4 | ||
|
|
946c650a47 | ||
|
|
f99c947c32 | ||
|
|
9ffbd2ef22 | ||
|
|
66625417b4 | ||
|
|
e95ce40abd | ||
|
|
4a83ebbee0 | ||
|
|
90705b36ad | ||
|
|
be5a5c7e7b | ||
|
|
64471e9340 | ||
|
|
4becd60e65 | ||
|
|
9fcfda78b9 | ||
|
|
8558c3e1f4 | ||
|
|
0bfb42dbb6 | ||
|
|
37b069ea5d | ||
|
|
6d7260e8f6 | ||
|
|
236bda9ed6 | ||
|
|
375835092c | ||
|
|
2c3d4f5bee | ||
|
|
45114a9df0 | ||
|
|
08290c6003 | ||
|
|
729e7f774c | ||
|
|
d233c90823 | ||
|
|
b76513948b | ||
|
|
d220e071ab | ||
|
|
f4eed2b8b8 | ||
|
|
d73e41f437 | ||
|
|
5b78c7d559 | ||
|
|
abddce33ac | ||
|
|
a8c668c43a | ||
|
|
9656762e80 | ||
|
|
8e53c8c937 | ||
|
|
375e9502d1 | ||
|
|
a23041090e | ||
|
|
0f8c8c844b | ||
|
|
bb2929692a | ||
|
|
fcd707ed4b | ||
|
|
20ff9db921 | ||
|
|
720fe9e371 | ||
|
|
8e0751a97a | ||
|
|
b9553be4d1 | ||
|
|
80e7bb85a0 | ||
|
|
ad229f81f4 | ||
|
|
1e190eef71 | ||
|
|
8cc3b24242 | ||
|
|
6004dc8906 | ||
|
|
04d6aa1069 | ||
|
|
993c467510 | ||
|
|
139a91d742 | ||
|
|
c50d8b753d | ||
|
|
c27655793b | ||
|
|
a6820f43f5 | ||
|
|
cf05f09f9f | ||
|
|
c936fca6e1 | ||
|
|
a2280512b8 | ||
|
|
51f9cb0840 | ||
|
|
5612bf3339 | ||
|
|
a5afc58319 | ||
|
|
b6cbf1e48c | ||
|
|
59348455a7 | ||
|
|
ca14115a12 | ||
|
|
b99e2f2f33 | ||
|
|
8046fd416f | ||
|
|
d2fca3db85 | ||
|
|
15b16060c7 | ||
|
|
5326847ef8 | ||
|
|
e966ae128a | ||
|
|
6d7aae9e97 | ||
|
|
d5a9ff4b27 | ||
|
|
e8ab6ab64b | ||
|
|
e737d01095 | ||
|
|
d1eba59ffd | ||
|
|
f139832667 | ||
|
|
d431ef2a30 | ||
|
|
388bae1ac8 | ||
|
|
23f4288082 | ||
|
|
469d73a733 | ||
|
|
ccc2b23191 | ||
|
|
2ddf7d3e83 | ||
|
|
f580ac6b30 | ||
|
|
239e8b9853 | ||
|
|
dcaea1447c | ||
|
|
f562e2a393 | ||
|
|
5c006a460f | ||
|
|
2e01a44f3b | ||
|
|
e3e6d2a744 | ||
|
|
74211e0372 | ||
|
|
a5210e47b0 | ||
|
|
d979ee01b5 | ||
|
|
9ff001cba1 | ||
|
|
62c908c88b | ||
|
|
58544debd5 | ||
|
|
4831503957 | ||
|
|
c393309707 | ||
|
|
d91b3f7639 | ||
|
|
0258ba5e14 | ||
|
|
774afe86e8 | ||
|
|
6f527e23e0 | ||
|
|
0a4a7578b8 | ||
|
|
6ea6facd66 | ||
|
|
dc2192cabc | ||
|
|
e024d40cd5 | ||
|
|
276b86509b | ||
|
|
fdb2027e6d | ||
|
|
83cc0a118f | ||
|
|
ac998632f7 | ||
|
|
45da109439 | ||
|
|
71b8383a6b | ||
|
|
fae4509e07 | ||
|
|
3d23afdc7a | ||
|
|
53d629496f | ||
|
|
7503db6713 | ||
|
|
ffc9073db1 | ||
|
|
3e3f774b8d | ||
|
|
ee71422b98 | ||
|
|
25b48c68df | ||
|
|
bc5d68e30b | ||
|
|
60a7403f6c | ||
|
|
04b16f1038 | ||
|
|
5d41ccd2ca | ||
|
|
132b12b26e | ||
|
|
0d7b909817 | ||
|
|
cc69136bf3 | ||
|
|
396da97103 | ||
|
|
60cf19a36d | ||
|
|
996308a4ea | ||
|
|
54c6e07ffe | ||
|
|
f09a5e176f | ||
|
|
22aac28f28 | ||
|
|
7b22df2e4b | ||
|
|
7cf26b2d3d | ||
|
|
b4acabea99 | ||
|
|
898bee7a4e | ||
|
|
100e3c9b75 | ||
|
|
554cac7d13 | ||
|
|
fb918fb4db | ||
|
|
811f7d8ebf | ||
|
|
4997801bad | ||
|
|
9c1dcdceb2 | ||
|
|
302f2cc8ce | ||
|
|
6703173449 | ||
|
|
d74c5aa2c9 | ||
|
|
c37faea947 | ||
|
|
b2ae65f7d1 | ||
|
|
d6031bad2a | ||
|
|
853c5613ac | ||
|
|
17c4134ebd | ||
|
|
a9be1accab | ||
|
|
58d2ff3955 | ||
|
|
7e5d41ab22 | ||
|
|
376bf4a390 | ||
|
|
0923ee40ae | ||
|
|
9789ed626b | ||
|
|
4be09eec6a | ||
|
|
eaf299419a | ||
|
|
75a604bbf5 | ||
|
|
00a6199b92 | ||
|
|
f03d66bcc1 | ||
|
|
b23b2b42a0 | ||
|
|
88b399bb2c | ||
|
|
6abc4c46fd | ||
|
|
0f21f39fad | ||
|
|
8c48ab6183 | ||
|
|
06a7ffdeca | ||
|
|
5fb36b041c | ||
|
|
acdcb3c7e0 | ||
|
|
91a77020eb | ||
|
|
0dca188d2d | ||
|
|
394445fdf9 | ||
|
|
73aab2c289 | ||
|
|
9067f7bfc2 | ||
|
|
6486d39fb1 | ||
|
|
ccf4f7653b | ||
|
|
793058e6f2 | ||
|
|
0043ed8fa6 | ||
|
|
59cd6a56e3 | ||
|
|
62e5a4df09 | ||
|
|
655476f9d1 | ||
|
|
c5964a79c7 | ||
|
|
2176e14894 | ||
|
|
f511b8cd07 | ||
|
|
21901e0ada | ||
|
|
35317bd2c2 | ||
|
|
47caae2f21 | ||
|
|
27caa6b89d | ||
|
|
8d353411c1 | ||
|
|
e2c1092905 | ||
|
|
4495a73abc | ||
|
|
e1d463eb39 | ||
|
|
a46aafb8b2 | ||
|
|
9fd56fad6c | ||
|
|
44b08a96b8 | ||
|
|
f9d7043b62 | ||
|
|
4c72ee98c2 | ||
|
|
c546037dc9 | ||
|
|
0aff9a5824 | ||
|
|
df64e7f884 | ||
|
|
4cf1aa5ae4 | ||
|
|
49cd60e3c3 | ||
|
|
e5a63fd66b | ||
|
|
0d001e8c04 | ||
|
|
b2fb7ddedd | ||
|
|
0d5e808777 | ||
|
|
c0a812c222 | ||
|
|
ec33e21004 | ||
|
|
273e05bb0d | ||
|
|
adc13fc925 | ||
|
|
13d62101f6 | ||
|
|
5d3d7537dd | ||
|
|
c397384ef4 | ||
|
|
547cb70473 | ||
|
|
aedff44a9a | ||
|
|
a0ccc1fb24 | ||
|
|
b0550403d4 | ||
|
|
c13afae688 | ||
|
|
fe0b3333a5 | ||
|
|
c54831fa89 | ||
|
|
73e3fd88b4 | ||
|
|
177171ccf1 | ||
|
|
190f6d791d | ||
|
|
07c0a12d72 | ||
|
|
0f497f3dcd | ||
|
|
91983593f4 | ||
|
|
a405ca246e | ||
|
|
c7283aa15f | ||
|
|
df21414331 | ||
|
|
885485f74c | ||
|
|
aed4211cf2 | ||
|
|
c9173dab9a | ||
|
|
f4e27505b4 | ||
|
|
d103dae12b | ||
|
|
0dacda90b9 | ||
|
|
98291b5ed2 | ||
|
|
cb63e37c8f | ||
|
|
1cf4440aae | ||
|
|
3d9f67c2d6 | ||
|
|
0d76c5b9c5 | ||
|
|
5cad18b188 | ||
|
|
b9accbb42a | ||
|
|
36164b9a9b | ||
|
|
041cc16dd9 | ||
|
|
cda92e27b4 | ||
|
|
a84e353282 | ||
|
|
d2402f6c8e | ||
|
|
3d594b7749 | ||
|
|
17db3877d1 | ||
|
|
c15d4a2dde | ||
|
|
7b560745f2 | ||
|
|
f414dbbaa0 | ||
|
|
048aa0d472 | ||
|
|
20ea123c28 | ||
|
|
9cc1e86356 | ||
|
|
c77321180b | ||
|
|
5607729d99 | ||
|
|
af74a8f627 | ||
|
|
449dae1e03 | ||
|
|
78e1a7c0d1 | ||
|
|
d328ae22b7 | ||
|
|
d6e7ebb209 | ||
|
|
62331ff46b | ||
|
|
c87b50ea9d | ||
|
|
db7f5c4e94 | ||
|
|
ca0831d92d | ||
|
|
30b2b8fdf1 | ||
|
|
6228ba6848 | ||
|
|
0aaddbc32b | ||
|
|
6c73e458da | ||
|
|
834a17d6d8 | ||
|
|
8b797c6b6e | ||
|
|
9ce92e439f | ||
|
|
029f3c6dec | ||
|
|
1dc560c9d2 | ||
|
|
fedad51cb4 | ||
|
|
cd4d346c0e | ||
|
|
4c35d05623 | ||
|
|
46600e37cf | ||
|
|
2c20a915c8 | ||
|
|
4fbc283c00 | ||
|
|
7819e67a9b | ||
|
|
7ebbe699cb | ||
|
|
f64aae0500 | ||
|
|
12e5386477 | ||
|
|
3c566581bd | ||
|
|
23e85906e0 | ||
|
|
0be0e3b350 | ||
|
|
723c91297d | ||
|
|
5dcac2b359 | ||
|
|
ce69eb9341 | ||
|
|
9d526462fe | ||
|
|
38ba438303 | ||
|
|
126c5c0c57 | ||
|
|
2cf38f0d76 | ||
|
|
ac10ef7cfc | ||
|
|
5b9b6a4541 | ||
|
|
cf6b3fb482 | ||
|
|
79c806cb40 | ||
|
|
84b7541abc | ||
|
|
2592a11bde | ||
|
|
bcd3db5b02 | ||
|
|
7e7600f0ff | ||
|
|
869dfaee18 | ||
|
|
6a11c78757 | ||
|
|
501f0da47f | ||
|
|
8691a58826 | ||
|
|
e008fc154f | ||
|
|
1482da4f3a | ||
|
|
43d819c890 | ||
|
|
299f890f6d | ||
|
|
6302003eb4 | ||
|
|
15e797ccdb | ||
|
|
6333c5fb7f | ||
|
|
3180dd2b14 | ||
|
|
404cced0c2 | ||
|
|
d55db7b058 | ||
|
|
06fc2d2ec8 | ||
|
|
60d48922fa | ||
|
|
fdf7db7606 | ||
|
|
d19c8c8315 | ||
|
|
3eb0125bde | ||
|
|
5cdb58f683 | ||
|
|
899aa3f216 | ||
|
|
caf3f82098 | ||
|
|
9cb1f86301 | ||
|
|
24f5fe8210 | ||
|
|
debd5d5bb1 | ||
|
|
525275dcfd | ||
|
|
984c23f7d7 | ||
|
|
35acc9edc8 | ||
|
|
b9b0ff98a2 | ||
|
|
8c5536543f | ||
|
|
bcd4d14425 | ||
|
|
1fd8c6fe08 | ||
|
|
dd4d49b20f | ||
|
|
3af7e95d69 | ||
|
|
db4c830328 | ||
|
|
64d9976cdc | ||
|
|
b5dad0e563 | ||
|
|
2e6ea8565a | ||
|
|
f717cd64cd | ||
|
|
ad8fe62cee | ||
|
|
59ca1af3a1 | ||
|
|
407c93d3e8 | ||
|
|
1ea547c154 | ||
|
|
00e262e490 | ||
|
|
1c3ff8623f | ||
|
|
f5fd769f5a | ||
|
|
a8c0323034 | ||
|
|
e24f10e275 | ||
|
|
d30b75fecf | ||
|
|
72bc345f85 | ||
|
|
1da504536a | ||
|
|
f73ea0e40d | ||
|
|
abcb2e0916 | ||
|
|
345a2dd01c | ||
|
|
8b26fdcb3a | ||
|
|
71c1de347e | ||
|
|
57434b40b8 | ||
|
|
7463dd803a | ||
|
|
c489990f82 | ||
|
|
25e9e16a39 | ||
|
|
366bf755ac | ||
|
|
19a5489f4c | ||
|
|
96be713241 | ||
|
|
3ac86ce2ea | ||
|
|
2aa1468054 | ||
|
|
ff43873706 | ||
|
|
3038c0c65d | ||
|
|
eeb0529e13 | ||
|
|
5b84c902eb | ||
|
|
3774cf0fdc | ||
|
|
331f7fa3f2 | ||
|
|
4d16bc3c5e |
25
.gitignore
vendored
25
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyo
|
||||||
|
/*.patch
|
||||||
build*/conf/local.conf
|
build*/conf/local.conf
|
||||||
build*/conf/bblayers.conf
|
build*/conf/bblayers.conf
|
||||||
build*/downloads
|
build*/downloads
|
||||||
@@ -16,5 +17,25 @@ meta-*
|
|||||||
*.orig
|
*.orig
|
||||||
*.rej
|
*.rej
|
||||||
*~
|
*~
|
||||||
|
documentation/adt-manual/adt-manual.html
|
||||||
|
documentation/adt-manual/adt-manual.pdf
|
||||||
|
documentation/adt-manual/adt-manual.tgz
|
||||||
|
documentation/dev-manual/dev-manual.html
|
||||||
|
documentation/dev-manual/dev-manual.pdf
|
||||||
|
documentation/dev-manual/dev-manual.tgz
|
||||||
|
documentation/poky-ref-manual/poky-ref-manual.html
|
||||||
|
documentation/poky-ref-manual/poky-ref-manual.pdf
|
||||||
|
documentation/poky-ref-manual/poky-ref-manual.tgz
|
||||||
|
documentation/poky-ref-manual/bsp-guide.html
|
||||||
|
documentation/poky-ref-manual/bsp-guide.pdf
|
||||||
|
documentation/bsp-guide/bsp-guide.html
|
||||||
|
documentation/bsp-guide/bsp-guide.pdf
|
||||||
|
documentation/bsp-guide/bsp-guide.tgz
|
||||||
|
documentation/yocto-project-qs/yocto-project-qs.html
|
||||||
|
documentation/yocto-project-qs/yocto-project-qs.tgz
|
||||||
|
documentation/kernel-manual/kernel-manual.html
|
||||||
|
documentation/kernel-manual/kernel-manual.tgz
|
||||||
|
documentation/kernel-manual/kernel-manual.pdf
|
||||||
|
documentation/mega-manual/mega-manual.html
|
||||||
|
documentation/mega-manual/mega-manual.pdf
|
||||||
|
documentation/mega-manual/mega-manual.tgz
|
||||||
|
|||||||
@@ -96,8 +96,9 @@ USB Device:
|
|||||||
|
|
||||||
# dd if=core-image-minimal-atom-pc.hddimg of=/dev/sdb
|
# dd if=core-image-minimal-atom-pc.hddimg of=/dev/sdb
|
||||||
|
|
||||||
If the device fails to boot with "Boot error" displayed, it is likely the BIOS
|
If the device fails to boot with "Boot error" displayed, or apparently
|
||||||
cannot understand the physical layout of the disk (or rather it expects a
|
stops just after the SYSLINUX version banner, it is likely the BIOS cannot
|
||||||
|
understand the physical layout of the disk (or rather it expects a
|
||||||
particular layout and cannot handle anything else). There are two possible
|
particular layout and cannot handle anything else). There are two possible
|
||||||
solutions to this problem:
|
solutions to this problem:
|
||||||
|
|
||||||
@@ -106,26 +107,47 @@ USB Device:
|
|||||||
geometry from the device.
|
geometry from the device.
|
||||||
|
|
||||||
2. Without such an option, the BIOS generally boots the device in USB-ZIP
|
2. Without such an option, the BIOS generally boots the device in USB-ZIP
|
||||||
mode.
|
mode. To write an image to a USB device that will be bootable in
|
||||||
|
USB-ZIP mode, carry out the following actions:
|
||||||
|
|
||||||
a. Configure the USB device for USB-ZIP mode:
|
a. Determine the geometry of your USB device using fdisk:
|
||||||
|
|
||||||
|
# fdisk /dev/sdb
|
||||||
|
Command (m for help): p
|
||||||
|
|
||||||
|
Disk /dev/sdb: 4011 MB, 4011491328 bytes
|
||||||
|
124 heads, 62 sectors/track, 1019 cylinders, total 7834944 sectors
|
||||||
|
...
|
||||||
|
|
||||||
|
Command (m for help): q
|
||||||
|
|
||||||
|
b. Configure the USB device for USB-ZIP mode:
|
||||||
|
|
||||||
# mkdiskimage -4 /dev/sdb 0 63 62
|
# mkdiskimage -4 /dev/sdb 1019 124 62
|
||||||
|
|
||||||
Where 63 and 62 are the head and sector count as reported by fdisk.
|
Where 1019, 124 and 62 are the cylinder, head and sectors/track counts
|
||||||
Remove and reinsert the device to allow the kernel to detect the new
|
as reported by fdisk (substitute the values reported for your device).
|
||||||
partition layout.
|
When the operation has finished and the access LED (if any) on the
|
||||||
|
device stops flashing, remove and reinsert the device to allow the
|
||||||
|
kernel to detect the new partition layout.
|
||||||
|
|
||||||
b. Copy the contents of the poky image to the USB-ZIP mode device:
|
c. Copy the contents of the poky image to the USB-ZIP mode device:
|
||||||
|
|
||||||
|
# mkdir /tmp/image
|
||||||
|
# mkdir /tmp/usbkey
|
||||||
# mount -o loop core-image-minimal-atom-pc.hddimg /tmp/image
|
# mount -o loop core-image-minimal-atom-pc.hddimg /tmp/image
|
||||||
# mount /dev/sdb4 /tmp/usbkey
|
# mount /dev/sdb4 /tmp/usbkey
|
||||||
# cp -rf /tmp/image/* /tmp/usbkey
|
# cp -rf /tmp/image/* /tmp/usbkey
|
||||||
|
|
||||||
c. Install the syslinux boot loader:
|
d. Install the syslinux boot loader:
|
||||||
|
|
||||||
# syslinux /dev/sdb4
|
# syslinux /dev/sdb4
|
||||||
|
|
||||||
|
e. Unmount everything:
|
||||||
|
|
||||||
|
# umount /tmp/image
|
||||||
|
# umount /tmp/usbkey
|
||||||
|
|
||||||
Install the boot device in the target board and configure the BIOS to boot
|
Install the boot device in the target board and configure the BIOS to boot
|
||||||
from it.
|
from it.
|
||||||
|
|
||||||
@@ -241,8 +263,8 @@ Setup instructions
|
|||||||
You will need the following:
|
You will need the following:
|
||||||
* NFS root setup on your workstation
|
* NFS root setup on your workstation
|
||||||
* TFTP server installed on your workstation
|
* TFTP server installed on your workstation
|
||||||
* Null modem cable connected from your workstation to the first serial port
|
* Straight-thru 9-conductor serial cable (DB9, M/F) connected from your
|
||||||
on the board
|
PC to UART1
|
||||||
* Ethernet connected to the first ethernet port on the board
|
* Ethernet connected to the first ethernet port on the board
|
||||||
|
|
||||||
--- Preparation ---
|
--- Preparation ---
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ from bb import cooker
|
|||||||
from bb import ui
|
from bb import ui
|
||||||
from bb import server
|
from bb import server
|
||||||
|
|
||||||
__version__ = "1.15.1"
|
__version__ = "1.15.2"
|
||||||
logger = logging.getLogger("BitBake")
|
logger = logging.getLogger("BitBake")
|
||||||
|
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ def get_ui(config):
|
|||||||
return getattr(module, interface).main
|
return getattr(module, interface).main
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
sys.exit("FATAL: Invalid user interface '%s' specified.\n"
|
sys.exit("FATAL: Invalid user interface '%s' specified.\n"
|
||||||
"Valid interfaces: depexp, goggle, ncurses, knotty [default]." % interface)
|
"Valid interfaces: depexp, goggle, ncurses, hob, knotty [default], knotty2." % interface)
|
||||||
|
|
||||||
|
|
||||||
# Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others"""
|
# Display bitbake/OE warnings via the BitBake.Warnings logger, ignoring others"""
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
import cmd
|
import cmd
|
||||||
import logging
|
import logging
|
||||||
|
import warnings
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import fnmatch
|
import fnmatch
|
||||||
@@ -28,6 +29,7 @@ import bb.fetch2
|
|||||||
|
|
||||||
logger = logging.getLogger('BitBake')
|
logger = logging.getLogger('BitBake')
|
||||||
|
|
||||||
|
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||||
|
|
||||||
def main(args):
|
def main(args):
|
||||||
# Set up logging
|
# Set up logging
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ of the event and the content of the <varname>FILE</varname> variable.</para>
|
|||||||
<section>
|
<section>
|
||||||
<title>Variants</title>
|
<title>Variants</title>
|
||||||
<para>Two BitBake features exist to facilitate the creation of multiple buildable incarnations from a single recipe file.</para>
|
<para>Two BitBake features exist to facilitate the creation of multiple buildable incarnations from a single recipe file.</para>
|
||||||
<para>The first is <varname>BBCLASSEXTEND</varname>. This variable is a space separated list of classes used to "extend" the recipe for each variant. As an example, setting <screen>BBCLASSEXTEND = "native"</screen> results in a second incarnation of the current recipe being available. This second incarantion will have the "native" class inherited.</para>
|
<para>The first is <varname>BBCLASSEXTEND</varname>. This variable is a space separated list of classes used to "extend" the recipe for each variant. As an example, setting <screen>BBCLASSEXTEND = "native"</screen> results in a second incarnation of the current recipe being available. This second incarnation will have the "native" class inherited.</para>
|
||||||
<para>The second feature is <varname>BBVERSIONS</varname>. This variable allows a single recipe to build multiple versions of a project from a single recipe file, and allows you to specify conditional metadata (using the <varname>OVERRIDES</varname> mechanism) for a single version, or an optionally named range of versions:</para>
|
<para>The second feature is <varname>BBVERSIONS</varname>. This variable allows a single recipe to build multiple versions of a project from a single recipe file, and allows you to specify conditional metadata (using the <varname>OVERRIDES</varname> mechanism) for a single version, or an optionally named range of versions:</para>
|
||||||
<para><screen>BBVERSIONS = "1.0 2.0 git"
|
<para><screen>BBVERSIONS = "1.0 2.0 git"
|
||||||
SRC_URI_git = "git://someurl/somepath.git"</screen></para>
|
SRC_URI_git = "git://someurl/somepath.git"</screen></para>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
__version__ = "1.15.1"
|
__version__ = "1.15.2"
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
if sys.version_info < (2, 6, 0):
|
if sys.version_info < (2, 6, 0):
|
||||||
|
|||||||
@@ -291,12 +291,13 @@ def _exec_task(fn, task, d, quieterr):
|
|||||||
|
|
||||||
bb.utils.mkdirhier(tempdir)
|
bb.utils.mkdirhier(tempdir)
|
||||||
loglink = os.path.join(tempdir, 'log.{0}'.format(task))
|
loglink = os.path.join(tempdir, 'log.{0}'.format(task))
|
||||||
logfn = os.path.join(tempdir, 'log.{0}.{1}'.format(task, os.getpid()))
|
logbase = 'log.{0}.{1}'.format(task, os.getpid())
|
||||||
|
logfn = os.path.join(tempdir, logbase)
|
||||||
if loglink:
|
if loglink:
|
||||||
bb.utils.remove(loglink)
|
bb.utils.remove(loglink)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.symlink(logfn, loglink)
|
os.symlink(logbase, loglink)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -457,6 +458,24 @@ def del_stamp(task, d, file_name = None):
|
|||||||
stamp = stamp_internal(task, d, file_name)
|
stamp = stamp_internal(task, d, file_name)
|
||||||
bb.utils.remove(stamp)
|
bb.utils.remove(stamp)
|
||||||
|
|
||||||
|
def write_taint(task, d, file_name = None):
|
||||||
|
"""
|
||||||
|
Creates a "taint" file which will force the specified task and its
|
||||||
|
dependents to be re-run the next time by influencing the value of its
|
||||||
|
taskhash.
|
||||||
|
(d can be a data dict or dataCache)
|
||||||
|
"""
|
||||||
|
import uuid
|
||||||
|
if file_name:
|
||||||
|
taintfn = d.stamp[file_name] + '.' + task + '.taint'
|
||||||
|
else:
|
||||||
|
taintfn = d.getVar('STAMP', True) + '.' + task + '.taint'
|
||||||
|
bb.utils.mkdirhier(os.path.dirname(taintfn))
|
||||||
|
# The specific content of the taint file is not really important,
|
||||||
|
# we just need it to be random, so a random UUID is used
|
||||||
|
with open(taintfn, 'w') as taintf:
|
||||||
|
taintf.write(str(uuid.uuid4()))
|
||||||
|
|
||||||
def stampfile(taskname, d, file_name = None):
|
def stampfile(taskname, d, file_name = None):
|
||||||
"""
|
"""
|
||||||
Return the stamp for a given task
|
Return the stamp for a given task
|
||||||
|
|||||||
@@ -179,12 +179,12 @@ class CommandsSync:
|
|||||||
"""
|
"""
|
||||||
return bb.utils.cpu_count()
|
return bb.utils.cpu_count()
|
||||||
|
|
||||||
def triggerEvent(self, command, params):
|
def setConfFilter(self, command, params):
|
||||||
"""
|
"""
|
||||||
Trigger a certain event
|
Set the configuration file parsing filter
|
||||||
"""
|
"""
|
||||||
event = params[0]
|
filterfunc = params[0]
|
||||||
bb.event.fire(eval(event), command.cooker.configuration.data)
|
bb.parse.parse_py.ConfHandler.confFilters.append(filterfunc)
|
||||||
|
|
||||||
class CommandsAsync:
|
class CommandsAsync:
|
||||||
"""
|
"""
|
||||||
@@ -359,3 +359,13 @@ class CommandsAsync:
|
|||||||
command.cooker.parseConfigurationFiles(prefiles, postfiles)
|
command.cooker.parseConfigurationFiles(prefiles, postfiles)
|
||||||
command.finishAsyncCommand()
|
command.finishAsyncCommand()
|
||||||
parseConfigurationFiles.needcache = False
|
parseConfigurationFiles.needcache = False
|
||||||
|
|
||||||
|
def triggerEvent(self, command, params):
|
||||||
|
"""
|
||||||
|
Trigger a certain event
|
||||||
|
"""
|
||||||
|
event = params[0]
|
||||||
|
bb.event.fire(eval(event), command.cooker.configuration.data)
|
||||||
|
command.currentAsyncCommand = None
|
||||||
|
triggerEvent.needcache = False
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ class BBCooker:
|
|||||||
self.configuration.data = bb.data.init()
|
self.configuration.data = bb.data.init()
|
||||||
|
|
||||||
if not self.server_registration_cb:
|
if not self.server_registration_cb:
|
||||||
bb.data.setVar("BB_WORKERCONTEXT", "1", self.configuration.data)
|
self.configuration.data.setVar("BB_WORKERCONTEXT", "1")
|
||||||
|
|
||||||
filtered_keys = bb.utils.approved_variables()
|
filtered_keys = bb.utils.approved_variables()
|
||||||
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
||||||
@@ -1066,10 +1066,10 @@ class BBCooker:
|
|||||||
self.status.rundeps[fn] = []
|
self.status.rundeps[fn] = []
|
||||||
self.status.runrecs[fn] = []
|
self.status.runrecs[fn] = []
|
||||||
|
|
||||||
# Remove stamp for target if force mode active
|
# Invalidate task for target if force mode active
|
||||||
if self.configuration.force:
|
if self.configuration.force:
|
||||||
logger.verbose("Remove stamp %s, %s", task, fn)
|
logger.verbose("Invalidate task %s, %s", task, fn)
|
||||||
bb.build.del_stamp('do_%s' % task, self.status, fn)
|
bb.parse.siggen.invalidate_task('do_%s' % task, self.status, fn)
|
||||||
|
|
||||||
# Setup taskdata structure
|
# Setup taskdata structure
|
||||||
taskdata = bb.taskdata.TaskData(self.configuration.abort)
|
taskdata = bb.taskdata.TaskData(self.configuration.abort)
|
||||||
@@ -1175,7 +1175,7 @@ class BBCooker:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if self.state in (state.shutdown, state.stop):
|
if self.state in (state.shutdown, state.stop):
|
||||||
self.parser.shutdown(clean=False)
|
self.parser.shutdown(clean=False, force = True)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if self.state != state.parsing:
|
if self.state != state.parsing:
|
||||||
@@ -1608,10 +1608,13 @@ class CookerParser(object):
|
|||||||
self.parser_quit.put(None)
|
self.parser_quit.put(None)
|
||||||
|
|
||||||
self.jobs.cancel_join_thread()
|
self.jobs.cancel_join_thread()
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
for process in self.processes:
|
for process in self.processes:
|
||||||
process.join()
|
if force:
|
||||||
|
process.join(.1)
|
||||||
|
process.terminate()
|
||||||
|
else:
|
||||||
|
process.join()
|
||||||
self.feeder.join()
|
self.feeder.join()
|
||||||
|
|
||||||
sync = threading.Thread(target=self.bb_cache.sync)
|
sync = threading.Thread(target=self.bb_cache.sync)
|
||||||
@@ -1641,6 +1644,8 @@ class CookerParser(object):
|
|||||||
yield result
|
yield result
|
||||||
|
|
||||||
def parse_next(self):
|
def parse_next(self):
|
||||||
|
result = []
|
||||||
|
parsed = None
|
||||||
try:
|
try:
|
||||||
parsed, result = self.results.next()
|
parsed, result = self.results.next()
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
|
|||||||
@@ -462,13 +462,14 @@ class DataSmart(MutableMapping):
|
|||||||
self.delVar(var)
|
self.delVar(var)
|
||||||
|
|
||||||
def get_hash(self):
|
def get_hash(self):
|
||||||
data = ""
|
data = {}
|
||||||
config_whitelist = set((self.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split())
|
config_whitelist = set((self.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split())
|
||||||
keys = set(key for key in iter(self) if not key.startswith("__"))
|
keys = set(key for key in iter(self) if not key.startswith("__"))
|
||||||
for key in keys:
|
for key in keys:
|
||||||
if key in config_whitelist:
|
if key in config_whitelist:
|
||||||
continue
|
continue
|
||||||
value = self.getVar(key, False) or ""
|
value = self.getVar(key, False) or ""
|
||||||
data = data + key + ': ' + str(value) + '\n'
|
data.update({key:value})
|
||||||
|
|
||||||
return hashlib.md5(data).hexdigest()
|
data_str = str([(k, data[k]) for k in sorted(data.keys())])
|
||||||
|
return hashlib.md5(data_str).hexdigest()
|
||||||
|
|||||||
@@ -517,3 +517,21 @@ class PackageInfo(Event):
|
|||||||
def __init__(self, pkginfolist):
|
def __init__(self, pkginfolist):
|
||||||
Event.__init__(self)
|
Event.__init__(self)
|
||||||
self._pkginfolist = pkginfolist
|
self._pkginfolist = pkginfolist
|
||||||
|
|
||||||
|
class SanityCheck(Event):
|
||||||
|
"""
|
||||||
|
Event to issue sanity check
|
||||||
|
"""
|
||||||
|
|
||||||
|
class SanityCheckPassed(Event):
|
||||||
|
"""
|
||||||
|
Event to indicate sanity check is passed
|
||||||
|
"""
|
||||||
|
|
||||||
|
class SanityCheckFailed(Event):
|
||||||
|
"""
|
||||||
|
Event to indicate sanity check has failed
|
||||||
|
"""
|
||||||
|
def __init__(self, msg):
|
||||||
|
Event.__init__(self)
|
||||||
|
self._msg = msg
|
||||||
|
|||||||
@@ -174,7 +174,8 @@ def encodeurl(decoded):
|
|||||||
|
|
||||||
def uri_replace(ud, uri_find, uri_replace, d):
|
def uri_replace(ud, uri_find, uri_replace, d):
|
||||||
if not ud.url or not uri_find or not uri_replace:
|
if not ud.url or not uri_find or not uri_replace:
|
||||||
logger.debug(1, "uri_replace: passed an undefined value, not replacing")
|
logger.error("uri_replace: passed an undefined value, not replacing")
|
||||||
|
return None
|
||||||
uri_decoded = list(decodeurl(ud.url))
|
uri_decoded = list(decodeurl(ud.url))
|
||||||
uri_find_decoded = list(decodeurl(uri_find))
|
uri_find_decoded = list(decodeurl(uri_find))
|
||||||
uri_replace_decoded = list(decodeurl(uri_replace))
|
uri_replace_decoded = list(decodeurl(uri_replace))
|
||||||
@@ -200,8 +201,10 @@ def uri_replace(ud, uri_find, uri_replace, d):
|
|||||||
if basename and not result_decoded[loc].endswith(basename):
|
if basename and not result_decoded[loc].endswith(basename):
|
||||||
result_decoded[loc] = os.path.join(result_decoded[loc], basename)
|
result_decoded[loc] = os.path.join(result_decoded[loc], basename)
|
||||||
else:
|
else:
|
||||||
return ud.url
|
return None
|
||||||
result = encodeurl(result_decoded)
|
result = encodeurl(result_decoded)
|
||||||
|
if result == ud.url:
|
||||||
|
return None
|
||||||
logger.debug(2, "For url %s returning %s" % (ud.url, result))
|
logger.debug(2, "For url %s returning %s" % (ud.url, result))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@@ -446,6 +449,90 @@ def check_network_access(d, info = "", url = None):
|
|||||||
else:
|
else:
|
||||||
logger.debug(1, "Fetcher accessed the network with the command %s" % info)
|
logger.debug(1, "Fetcher accessed the network with the command %s" % info)
|
||||||
|
|
||||||
|
def build_mirroruris(origud, mirrors, ld):
|
||||||
|
uris = []
|
||||||
|
uds = []
|
||||||
|
|
||||||
|
def adduri(uri, ud, uris, uds):
|
||||||
|
for line in mirrors:
|
||||||
|
try:
|
||||||
|
(find, replace) = line
|
||||||
|
except ValueError:
|
||||||
|
continue
|
||||||
|
newuri = uri_replace(ud, find, replace, ld)
|
||||||
|
if not newuri or newuri in uris or newuri == origud.url:
|
||||||
|
continue
|
||||||
|
try:
|
||||||
|
newud = FetchData(newuri, ld)
|
||||||
|
newud.setup_localpath(ld)
|
||||||
|
except bb.fetch2.BBFetchException as e:
|
||||||
|
logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
|
||||||
|
logger.debug(1, str(e))
|
||||||
|
try:
|
||||||
|
ud.method.clean(ud, ld)
|
||||||
|
except UnboundLocalError:
|
||||||
|
pass
|
||||||
|
continue
|
||||||
|
uris.append(newuri)
|
||||||
|
uds.append(newud)
|
||||||
|
|
||||||
|
adduri(newuri, newud, uris, uds)
|
||||||
|
|
||||||
|
adduri(None, origud, uris, uds)
|
||||||
|
|
||||||
|
return uris, uds
|
||||||
|
|
||||||
|
def try_mirror_url(newuri, origud, ud, ld, check = False):
|
||||||
|
# Return of None or a value means we're finished
|
||||||
|
# False means try another url
|
||||||
|
try:
|
||||||
|
if check:
|
||||||
|
found = ud.method.checkstatus(newuri, ud, ld)
|
||||||
|
if found:
|
||||||
|
return found
|
||||||
|
return False
|
||||||
|
|
||||||
|
os.chdir(ld.getVar("DL_DIR", True))
|
||||||
|
|
||||||
|
if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
|
||||||
|
ud.method.download(newuri, ud, ld)
|
||||||
|
if hasattr(ud.method,"build_mirror_data"):
|
||||||
|
ud.method.build_mirror_data(newuri, ud, ld)
|
||||||
|
|
||||||
|
if not ud.localpath or not os.path.exists(ud.localpath):
|
||||||
|
return False
|
||||||
|
|
||||||
|
if ud.localpath == origud.localpath:
|
||||||
|
return ud.localpath
|
||||||
|
|
||||||
|
# We may be obtaining a mirror tarball which needs further processing by the real fetcher
|
||||||
|
# If that tarball is a local file:// we need to provide a symlink to it
|
||||||
|
dldir = ld.getVar("DL_DIR", True)
|
||||||
|
if origud.mirrortarball and os.path.basename(ud.localpath) == os.path.basename(origud.mirrortarball) \
|
||||||
|
and os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
|
||||||
|
open(ud.donestamp, 'w').close()
|
||||||
|
dest = os.path.join(dldir, os.path.basename(ud.localpath))
|
||||||
|
if not os.path.exists(dest):
|
||||||
|
os.symlink(ud.localpath, dest)
|
||||||
|
return None
|
||||||
|
# Otherwise the result is a local file:// and we symlink to it
|
||||||
|
if not os.path.exists(origud.localpath):
|
||||||
|
os.symlink(ud.localpath, origud.localpath)
|
||||||
|
update_stamp(newuri, origud, ld)
|
||||||
|
return ud.localpath
|
||||||
|
|
||||||
|
except bb.fetch2.NetworkAccess:
|
||||||
|
raise
|
||||||
|
|
||||||
|
except bb.fetch2.BBFetchException as e:
|
||||||
|
logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
|
||||||
|
logger.debug(1, str(e))
|
||||||
|
try:
|
||||||
|
ud.method.clean(ud, ld)
|
||||||
|
except UnboundLocalError:
|
||||||
|
pass
|
||||||
|
return False
|
||||||
|
|
||||||
def try_mirrors(d, origud, mirrors, check = False):
|
def try_mirrors(d, origud, mirrors, check = False):
|
||||||
"""
|
"""
|
||||||
Try to use a mirrored version of the sources.
|
Try to use a mirrored version of the sources.
|
||||||
@@ -456,61 +543,13 @@ def try_mirrors(d, origud, mirrors, check = False):
|
|||||||
mirrors is the list of mirrors we're going to try
|
mirrors is the list of mirrors we're going to try
|
||||||
"""
|
"""
|
||||||
ld = d.createCopy()
|
ld = d.createCopy()
|
||||||
for line in mirrors:
|
|
||||||
try:
|
|
||||||
(find, replace) = line
|
|
||||||
except ValueError:
|
|
||||||
continue
|
|
||||||
newuri = uri_replace(origud, find, replace, ld)
|
|
||||||
if newuri == origud.url:
|
|
||||||
continue
|
|
||||||
try:
|
|
||||||
ud = FetchData(newuri, ld)
|
|
||||||
ud.setup_localpath(ld)
|
|
||||||
|
|
||||||
if check:
|
uris, uds = build_mirroruris(origud, mirrors, ld)
|
||||||
found = ud.method.checkstatus(newuri, ud, ld)
|
|
||||||
if found:
|
|
||||||
return found
|
|
||||||
continue
|
|
||||||
|
|
||||||
if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
|
for index, uri in enumerate(uris):
|
||||||
ud.method.download(newuri, ud, ld)
|
ret = try_mirror_url(uri, origud, uds[index], ld, check)
|
||||||
open(ud.donestamp, 'w').close()
|
if ret != False:
|
||||||
if hasattr(ud.method,"build_mirror_data"):
|
return ret
|
||||||
ud.method.build_mirror_data(newuri, ud, ld)
|
|
||||||
|
|
||||||
if not ud.localpath or not os.path.exists(ud.localpath):
|
|
||||||
continue
|
|
||||||
|
|
||||||
if ud.localpath == origud.localpath:
|
|
||||||
return ud.localpath
|
|
||||||
|
|
||||||
# We may be obtaining a mirror tarball which needs further processing by the real fetcher
|
|
||||||
# If that tarball is a local file:// we need to provide a symlink to it
|
|
||||||
dldir = ld.getVar("DL_DIR", True)
|
|
||||||
if os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
|
|
||||||
dest = os.path.join(dldir, os.path.basename(ud.localpath))
|
|
||||||
if not os.path.exists(dest):
|
|
||||||
os.symlink(ud.localpath, dest)
|
|
||||||
return None
|
|
||||||
# Otherwise the result is a local file:// and we symlink to it
|
|
||||||
if not os.path.exists(origud.localpath):
|
|
||||||
os.symlink(ud.localpath, origud.localpath)
|
|
||||||
return ud.localpath
|
|
||||||
|
|
||||||
except bb.fetch2.NetworkAccess:
|
|
||||||
raise
|
|
||||||
|
|
||||||
except bb.fetch2.BBFetchException as e:
|
|
||||||
logger.debug(1, "Mirror fetch failure for url %s (original url: %s)" % (newuri, origud.url))
|
|
||||||
logger.debug(1, str(e))
|
|
||||||
try:
|
|
||||||
if os.path.isfile(ud.localpath):
|
|
||||||
bb.utils.remove(ud.localpath)
|
|
||||||
except UnboundLocalError:
|
|
||||||
pass
|
|
||||||
continue
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def srcrev_internal_helper(ud, d, name):
|
def srcrev_internal_helper(ud, d, name):
|
||||||
@@ -900,14 +939,14 @@ class Fetch(object):
|
|||||||
self.ud = {}
|
self.ud = {}
|
||||||
|
|
||||||
fn = d.getVar('FILE', True)
|
fn = d.getVar('FILE', True)
|
||||||
if cache and fn in urldata_cache:
|
if cache and fn and fn in urldata_cache:
|
||||||
self.ud = urldata_cache[fn]
|
self.ud = urldata_cache[fn]
|
||||||
|
|
||||||
for url in urls:
|
for url in urls:
|
||||||
if url not in self.ud:
|
if url not in self.ud:
|
||||||
self.ud[url] = FetchData(url, d)
|
self.ud[url] = FetchData(url, d)
|
||||||
|
|
||||||
if cache:
|
if fn and cache:
|
||||||
urldata_cache[fn] = self.ud
|
urldata_cache[fn] = self.ud
|
||||||
|
|
||||||
def localpath(self, url):
|
def localpath(self, url):
|
||||||
@@ -961,6 +1000,8 @@ class Fetch(object):
|
|||||||
if premirroronly:
|
if premirroronly:
|
||||||
self.d.setVar("BB_NO_NETWORK", "1")
|
self.d.setVar("BB_NO_NETWORK", "1")
|
||||||
|
|
||||||
|
os.chdir(self.d.getVar("DL_DIR", True))
|
||||||
|
|
||||||
firsterr = None
|
firsterr = None
|
||||||
if not localpath and ((not os.path.exists(ud.donestamp)) or m.need_update(u, ud, self.d)):
|
if not localpath and ((not os.path.exists(ud.donestamp)) or m.need_update(u, ud, self.d)):
|
||||||
try:
|
try:
|
||||||
@@ -1020,7 +1061,7 @@ class Fetch(object):
|
|||||||
except:
|
except:
|
||||||
# Finally, try checking uri, u, from MIRRORS
|
# Finally, try checking uri, u, from MIRRORS
|
||||||
mirrors = mirror_from_string(self.d.getVar('MIRRORS', True))
|
mirrors = mirror_from_string(self.d.getVar('MIRRORS', True))
|
||||||
ret = try_mirrors (self.d, ud, mirrors, True)
|
ret = try_mirrors(self.d, ud, mirrors, True)
|
||||||
|
|
||||||
if not ret:
|
if not ret:
|
||||||
raise FetchError("URL %s doesn't work" % u, u)
|
raise FetchError("URL %s doesn't work" % u, u)
|
||||||
|
|||||||
@@ -136,10 +136,13 @@ def getInterval(configuration):
|
|||||||
|
|
||||||
""" Get the disk space interval """
|
""" Get the disk space interval """
|
||||||
|
|
||||||
|
# The default value is 50M and 5K.
|
||||||
|
spaceDefault = 50 * 1024 * 1024
|
||||||
|
inodeDefault = 5 * 1024
|
||||||
|
|
||||||
interval = configuration.getVar("BB_DISKMON_WARNINTERVAL", True)
|
interval = configuration.getVar("BB_DISKMON_WARNINTERVAL", True)
|
||||||
if not interval:
|
if not interval:
|
||||||
# The default value is 50M and 5K.
|
return spaceDefault, inodeDefault
|
||||||
return 50 * 1024 * 1024, 5 * 1024
|
|
||||||
else:
|
else:
|
||||||
# The disk space or inode interval is optional, but it should
|
# The disk space or inode interval is optional, but it should
|
||||||
# have a correct value once it is specified
|
# have a correct value once it is specified
|
||||||
@@ -151,12 +154,16 @@ def getInterval(configuration):
|
|||||||
if not intervalSpace:
|
if not intervalSpace:
|
||||||
printErr("Invalid disk space interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(1))
|
printErr("Invalid disk space interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(1))
|
||||||
return None, None
|
return None, None
|
||||||
|
else:
|
||||||
|
intervalSpace = spaceDefault
|
||||||
intervalInode = intervalRe.group(2)
|
intervalInode = intervalRe.group(2)
|
||||||
if intervalInode:
|
if intervalInode:
|
||||||
intervalInode = convertGMK(intervalInode)
|
intervalInode = convertGMK(intervalInode)
|
||||||
if not intervalInode:
|
if not intervalInode:
|
||||||
printErr("Invalid disk inode interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(2))
|
printErr("Invalid disk inode interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(2))
|
||||||
return None, None
|
return None, None
|
||||||
|
else:
|
||||||
|
intervalInode = inodeDefault
|
||||||
return intervalSpace, intervalInode
|
return intervalSpace, intervalInode
|
||||||
else:
|
else:
|
||||||
printErr("Invalid interval value in BB_DISKMON_WARNINTERVAL: %s" % interval)
|
printErr("Invalid interval value in BB_DISKMON_WARNINTERVAL: %s" % interval)
|
||||||
|
|||||||
@@ -71,6 +71,14 @@ def include(oldfn, fn, lineno, data, error_out):
|
|||||||
raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
|
raise ParseError("Could not %(error_out)s file %(fn)s" % vars(), oldfn, lineno)
|
||||||
logger.debug(2, "CONF file '%s' not found", fn)
|
logger.debug(2, "CONF file '%s' not found", fn)
|
||||||
|
|
||||||
|
# We have an issue where a UI might want to enforce particular settings such as
|
||||||
|
# an empty DISTRO variable. If configuration files do something like assigning
|
||||||
|
# a weak default, it turns out to be very difficult to filter out these changes,
|
||||||
|
# particularly when the weak default might appear half way though parsing a chain
|
||||||
|
# of configuration files. We therefore let the UIs hook into configuration file
|
||||||
|
# parsing. This turns out to be a hard problem to solve any other way.
|
||||||
|
confFilters = []
|
||||||
|
|
||||||
def handle(fn, data, include):
|
def handle(fn, data, include):
|
||||||
init(data)
|
init(data)
|
||||||
|
|
||||||
@@ -107,6 +115,9 @@ def handle(fn, data, include):
|
|||||||
if oldfile:
|
if oldfile:
|
||||||
data.setVar('FILE', oldfile)
|
data.setVar('FILE', oldfile)
|
||||||
|
|
||||||
|
for f in confFilters:
|
||||||
|
f(fn, data)
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
def feeder(lineno, s, fn, statements):
|
def feeder(lineno, s, fn, statements):
|
||||||
|
|||||||
@@ -705,6 +705,12 @@ class RunQueueData:
|
|||||||
continue
|
continue
|
||||||
self.runq_setscene.append(task)
|
self.runq_setscene.append(task)
|
||||||
|
|
||||||
|
# Invalidate task if force mode active
|
||||||
|
if self.cooker.configuration.force:
|
||||||
|
for (fn, target) in self.target_pairs:
|
||||||
|
logger.verbose("Invalidate task %s, %s", target, fn)
|
||||||
|
bb.parse.siggen.invalidate_task(target, self.dataCache, fn)
|
||||||
|
|
||||||
# Interate over the task list and call into the siggen code
|
# Interate over the task list and call into the siggen code
|
||||||
dealtwith = set()
|
dealtwith = set()
|
||||||
todeal = set(range(len(self.runq_fnid)))
|
todeal = set(range(len(self.runq_fnid)))
|
||||||
@@ -731,12 +737,6 @@ class RunQueueData:
|
|||||||
deps.append(depidentifier)
|
deps.append(depidentifier)
|
||||||
self.hash_deps[identifier] = deps
|
self.hash_deps[identifier] = deps
|
||||||
|
|
||||||
# Remove stamps for targets if force mode active
|
|
||||||
if self.cooker.configuration.force:
|
|
||||||
for (fn, target) in self.target_pairs:
|
|
||||||
logger.verbose("Remove stamp %s, %s", target, fn)
|
|
||||||
bb.build.del_stamp(target, self.dataCache, fn)
|
|
||||||
|
|
||||||
return len(self.runq_fnid)
|
return len(self.runq_fnid)
|
||||||
|
|
||||||
def dump_data(self, taskQueue):
|
def dump_data(self, taskQueue):
|
||||||
@@ -1068,6 +1068,7 @@ class RunQueueExecute:
|
|||||||
for k, v in self.build_pids.iteritems():
|
for k, v in self.build_pids.iteritems():
|
||||||
try:
|
try:
|
||||||
os.kill(-k, signal.SIGTERM)
|
os.kill(-k, signal.SIGTERM)
|
||||||
|
os.waitpid(-1, 0)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
for pipe in self.build_pipes:
|
for pipe in self.build_pipes:
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ class SignatureGenerator(object):
|
|||||||
def dump_sigtask(self, fn, task, stampbase, runtime):
|
def dump_sigtask(self, fn, task, stampbase, runtime):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def invalidate_task(self, task, d, fn):
|
||||||
|
bb.build.del_stamp(task, d, fn)
|
||||||
|
|
||||||
|
|
||||||
class SignatureGeneratorBasic(SignatureGenerator):
|
class SignatureGeneratorBasic(SignatureGenerator):
|
||||||
"""
|
"""
|
||||||
"""
|
"""
|
||||||
@@ -148,6 +152,15 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def read_taint(self, fn, task, stampbase):
|
||||||
|
taint = None
|
||||||
|
try:
|
||||||
|
with open(stampbase + '.' + task + '.taint', 'r') as taintf:
|
||||||
|
taint = taintf.read()
|
||||||
|
except IOError:
|
||||||
|
pass
|
||||||
|
return taint
|
||||||
|
|
||||||
def get_taskhash(self, fn, task, deps, dataCache):
|
def get_taskhash(self, fn, task, deps, dataCache):
|
||||||
k = fn + "." + task
|
k = fn + "." + task
|
||||||
data = dataCache.basetaskhash[k]
|
data = dataCache.basetaskhash[k]
|
||||||
@@ -161,6 +174,11 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
bb.fatal("%s is not in taskhash, caller isn't calling in dependency order?", dep)
|
bb.fatal("%s is not in taskhash, caller isn't calling in dependency order?", dep)
|
||||||
data = data + self.taskhash[dep]
|
data = data + self.taskhash[dep]
|
||||||
self.runtaskdeps[k].append(dep)
|
self.runtaskdeps[k].append(dep)
|
||||||
|
|
||||||
|
taint = self.read_taint(fn, task, dataCache.stamp[fn])
|
||||||
|
if taint:
|
||||||
|
data = data + taint
|
||||||
|
|
||||||
h = hashlib.md5(data).hexdigest()
|
h = hashlib.md5(data).hexdigest()
|
||||||
self.taskhash[k] = h
|
self.taskhash[k] = h
|
||||||
#d.setVar("BB_TASKHASH_task-%s" % task, taskhash[task])
|
#d.setVar("BB_TASKHASH_task-%s" % task, taskhash[task])
|
||||||
@@ -201,9 +219,14 @@ class SignatureGeneratorBasic(SignatureGenerator):
|
|||||||
for dep in data['runtaskdeps']:
|
for dep in data['runtaskdeps']:
|
||||||
data['runtaskhashes'][dep] = self.taskhash[dep]
|
data['runtaskhashes'][dep] = self.taskhash[dep]
|
||||||
|
|
||||||
|
taint = self.read_taint(fn, task, stampbase)
|
||||||
|
if taint:
|
||||||
|
data['taint'] = taint
|
||||||
|
|
||||||
p = pickle.Pickler(file(sigfile, "wb"), -1)
|
p = pickle.Pickler(file(sigfile, "wb"), -1)
|
||||||
p.dump(data)
|
p.dump(data)
|
||||||
|
|
||||||
|
|
||||||
def dump_sigs(self, dataCache):
|
def dump_sigs(self, dataCache):
|
||||||
for fn in self.taskdeps:
|
for fn in self.taskdeps:
|
||||||
for task in self.taskdeps[fn]:
|
for task in self.taskdeps[fn]:
|
||||||
@@ -230,6 +253,10 @@ class SignatureGeneratorBasicHash(SignatureGeneratorBasic):
|
|||||||
h = self.basehash[k]
|
h = self.basehash[k]
|
||||||
return ("%s.%s.%s.%s" % (stampbase, taskname, h, extrainfo)).rstrip('.')
|
return ("%s.%s.%s.%s" % (stampbase, taskname, h, extrainfo)).rstrip('.')
|
||||||
|
|
||||||
|
def invalidate_task(self, task, d, fn):
|
||||||
|
bb.note("Tainting hash to force rebuild of task %s, %s" % (fn, task))
|
||||||
|
bb.build.write_taint(task, d, fn)
|
||||||
|
|
||||||
def dump_this_task(outfile, d):
|
def dump_this_task(outfile, d):
|
||||||
import bb.parse
|
import bb.parse
|
||||||
fn = d.getVar("BB_FILENAME", True)
|
fn = d.getVar("BB_FILENAME", True)
|
||||||
@@ -330,6 +357,11 @@ def compare_sigfiles(a, b):
|
|||||||
for dep in changed:
|
for dep in changed:
|
||||||
print "Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep])
|
print "Hash for dependent task %s changed from %s to %s" % (dep, a[dep], b[dep])
|
||||||
|
|
||||||
|
a_taint = a_data.get('taint', None)
|
||||||
|
b_taint = b_data.get('taint', None)
|
||||||
|
if a_taint != b_taint:
|
||||||
|
print "Taint (by forced/invalidated task) changed from %s to %s" % (a_taint, b_taint)
|
||||||
|
|
||||||
def dump_sigfile(a):
|
def dump_sigfile(a):
|
||||||
p1 = pickle.Unpickler(file(a, "rb"))
|
p1 = pickle.Unpickler(file(a, "rb"))
|
||||||
a_data = p1.load()
|
a_data = p1.load()
|
||||||
@@ -354,3 +386,6 @@ def dump_sigfile(a):
|
|||||||
if 'runtaskhashes' in a_data:
|
if 'runtaskhashes' in a_data:
|
||||||
for dep in a_data['runtaskhashes']:
|
for dep in a_data['runtaskhashes']:
|
||||||
print "Hash for dependent task %s is %s" % (dep, a_data['runtaskhashes'][dep])
|
print "Hash for dependent task %s is %s" % (dep, a_data['runtaskhashes'][dep])
|
||||||
|
|
||||||
|
if 'taint' in a_data:
|
||||||
|
print "Tainted (by forced/invalidated task): %s" % a_data['taint']
|
||||||
|
|||||||
@@ -83,15 +83,15 @@ class BuildConfigurationTreeView(gtk.TreeView):
|
|||||||
|
|
||||||
def show(self, src_config_info, src_params):
|
def show(self, src_config_info, src_params):
|
||||||
vars = []
|
vars = []
|
||||||
vars.append(self.set_vars("BB VERSION:", src_params.bb_version))
|
vars.append(self.set_vars("BB version:", src_params.bb_version))
|
||||||
vars.append(self.set_vars("TARGET_ARCH:", src_params.target_arch))
|
vars.append(self.set_vars("Target arch:", src_params.target_arch))
|
||||||
vars.append(self.set_vars("TARGET_OS:", src_params.target_os))
|
vars.append(self.set_vars("Target OS:", src_params.target_os))
|
||||||
vars.append(self.set_vars("MACHINE:", src_config_info.curr_mach))
|
vars.append(self.set_vars("Machine:", src_config_info.curr_mach))
|
||||||
vars.append(self.set_vars("DISTRO:", src_config_info.curr_distro))
|
vars.append(self.set_vars("Distro:", src_config_info.curr_distro))
|
||||||
vars.append(self.set_vars("DISTRO_VERSION:", src_params.distro_version))
|
vars.append(self.set_vars("Distro version:", src_params.distro_version))
|
||||||
vars.append(self.set_vars("SDK_MACHINE:", src_config_info.curr_sdk_machine))
|
vars.append(self.set_vars("SDK machine:", src_config_info.curr_sdk_machine))
|
||||||
vars.append(self.set_vars("TUNE_FEATURE:", src_params.tune_pkgarch))
|
vars.append(self.set_vars("Tune features:", src_params.tune_pkgarch))
|
||||||
vars.append(self.set_vars("LAYERS:", src_config_info.layers))
|
vars.append(self.set_vars("Layers:", src_config_info.layers))
|
||||||
|
|
||||||
for path in src_config_info.layers:
|
for path in src_config_info.layers:
|
||||||
import os, os.path
|
import os, os.path
|
||||||
@@ -99,12 +99,15 @@ class BuildConfigurationTreeView(gtk.TreeView):
|
|||||||
f = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path)
|
f = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path)
|
||||||
if f:
|
if f:
|
||||||
branch = f.readline().lstrip('\n').rstrip('\n')
|
branch = f.readline().lstrip('\n').rstrip('\n')
|
||||||
vars.append(self.set_vars("BRANCH:", branch))
|
vars.append(self.set_vars("Branch:", branch))
|
||||||
f.close()
|
f.close()
|
||||||
break
|
break
|
||||||
|
|
||||||
self.set_config_model(vars)
|
self.set_config_model(vars)
|
||||||
|
|
||||||
|
def reset(self):
|
||||||
|
self.set_model(None)
|
||||||
|
|
||||||
#
|
#
|
||||||
# BuildDetailsPage
|
# BuildDetailsPage
|
||||||
#
|
#
|
||||||
@@ -133,6 +136,7 @@ class BuildDetailsPage (HobPage):
|
|||||||
self.progress_hbox.pack_start(self.progress_bar, expand=True, fill=True)
|
self.progress_hbox.pack_start(self.progress_bar, expand=True, fill=True)
|
||||||
self.stop_button = HobAltButton("Stop")
|
self.stop_button = HobAltButton("Stop")
|
||||||
self.stop_button.connect("clicked", self.stop_button_clicked_cb)
|
self.stop_button.connect("clicked", self.stop_button_clicked_cb)
|
||||||
|
self.stop_button.set_sensitive(False)
|
||||||
self.progress_hbox.pack_end(self.stop_button, expand=False, fill=False)
|
self.progress_hbox.pack_end(self.stop_button, expand=False, fill=False)
|
||||||
|
|
||||||
self.notebook = HobNotebook()
|
self.notebook = HobNotebook()
|
||||||
@@ -140,7 +144,7 @@ class BuildDetailsPage (HobPage):
|
|||||||
self.scrolled_view_config = gtk.ScrolledWindow ()
|
self.scrolled_view_config = gtk.ScrolledWindow ()
|
||||||
self.scrolled_view_config.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
|
self.scrolled_view_config.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
|
||||||
self.scrolled_view_config.add(self.config_tv)
|
self.scrolled_view_config.add(self.config_tv)
|
||||||
self.notebook.append_page(self.scrolled_view_config, gtk.Label("Build Configuration"))
|
self.notebook.append_page(self.scrolled_view_config, gtk.Label("Build configuration"))
|
||||||
|
|
||||||
self.failure_tv = BuildFailureTreeView()
|
self.failure_tv = BuildFailureTreeView()
|
||||||
self.failure_model = self.builder.handler.build.model.failure_model()
|
self.failure_model = self.builder.handler.build.model.failure_model()
|
||||||
@@ -169,9 +173,11 @@ class BuildDetailsPage (HobPage):
|
|||||||
recipe = os.path.basename(recipe_path).rstrip(".bb")
|
recipe = os.path.basename(recipe_path).rstrip(".bb")
|
||||||
tsk_msg = "<b>Running task %s of %s:</b> %s\n<b>Recipe:</b> %s" % (current, total, recipe_task, recipe)
|
tsk_msg = "<b>Running task %s of %s:</b> %s\n<b>Recipe:</b> %s" % (current, total, recipe_task, recipe)
|
||||||
self.task_status.set_markup(tsk_msg)
|
self.task_status.set_markup(tsk_msg)
|
||||||
|
self.stop_button.set_sensitive(True)
|
||||||
|
|
||||||
def reset_build_status(self):
|
def reset_build_status(self):
|
||||||
self.task_status.set_markup("\n") # to ensure layout is correct
|
self.task_status.set_markup("\n") # to ensure layout is correct
|
||||||
|
self.endpath = (0,)
|
||||||
|
|
||||||
def show_issues(self):
|
def show_issues(self):
|
||||||
self.num_of_issues += 1
|
self.num_of_issues += 1
|
||||||
@@ -205,6 +211,7 @@ class BuildDetailsPage (HobPage):
|
|||||||
self.box_group_area.pack_start(self.vbox, expand=True, fill=True)
|
self.box_group_area.pack_start(self.vbox, expand=True, fill=True)
|
||||||
|
|
||||||
self.progress_bar.reset()
|
self.progress_bar.reset()
|
||||||
|
self.config_tv.reset()
|
||||||
self.vbox.pack_start(self.progress_box, expand=False, fill=False)
|
self.vbox.pack_start(self.progress_box, expand=False, fill=False)
|
||||||
|
|
||||||
self.vbox.pack_start(self.notebook, expand=True, fill=True)
|
self.vbox.pack_start(self.notebook, expand=True, fill=True)
|
||||||
@@ -213,7 +220,10 @@ class BuildDetailsPage (HobPage):
|
|||||||
self.show_all()
|
self.show_all()
|
||||||
self.back_button.hide()
|
self.back_button.hide()
|
||||||
|
|
||||||
def update_progress_bar(self, title, fraction, status=True):
|
self.reset_build_status()
|
||||||
|
self.reset_issues()
|
||||||
|
|
||||||
|
def update_progress_bar(self, title, fraction, status=None):
|
||||||
self.progress_bar.update(fraction)
|
self.progress_bar.update(fraction)
|
||||||
self.progress_bar.set_title(title)
|
self.progress_bar.set_title(title)
|
||||||
self.progress_bar.set_rcstyle(status)
|
self.progress_bar.set_rcstyle(status)
|
||||||
@@ -228,13 +238,15 @@ class BuildDetailsPage (HobPage):
|
|||||||
self.builder.stop_build()
|
self.builder.stop_build()
|
||||||
|
|
||||||
def hide_stop_button(self):
|
def hide_stop_button(self):
|
||||||
|
self.stop_button.set_sensitive(False)
|
||||||
self.stop_button.hide()
|
self.stop_button.hide()
|
||||||
|
|
||||||
def scroll_to_present_row(self, model, path, iter, v_adj, treeview):
|
def scroll_to_present_row(self, model, path, iter, v_adj, treeview):
|
||||||
if treeview and v_adj:
|
if treeview and v_adj:
|
||||||
if path[0] > self.endpath[0]: # check the event is a new row append or not
|
if path[0] > self.endpath[0]: # check the event is a new row append or not
|
||||||
self.endpath = path
|
self.endpath = path
|
||||||
if v_adj.value == (v_adj.upper - v_adj.page_size): # check the gtk.adjustment position is at end boundary or not
|
# check the gtk.adjustment position is at end boundary or not
|
||||||
|
if (v_adj.upper <= v_adj.page_size) or (v_adj.value == v_adj.upper - v_adj.page_size):
|
||||||
treeview.scroll_to_cell(path)
|
treeview.scroll_to_cell(path)
|
||||||
|
|
||||||
def show_configurations(self, configurations, params):
|
def show_configurations(self, configurations, params):
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
import glib
|
||||||
import gtk
|
import gtk
|
||||||
import copy
|
import copy
|
||||||
import os
|
import os
|
||||||
@@ -32,23 +33,58 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
|
|||||||
from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
|
from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
|
||||||
from bb.ui.crumbs.builddetailspage import BuildDetailsPage
|
from bb.ui.crumbs.builddetailspage import BuildDetailsPage
|
||||||
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
|
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
|
||||||
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
|
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton, hcc
|
||||||
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
|
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
|
||||||
AdvancedSettingDialog, LayerSelectionDialog, \
|
AdvancedSettingDialog, LayerSelectionDialog, \
|
||||||
DeployImageDialog
|
DeployImageDialog
|
||||||
from bb.ui.crumbs.persistenttooltip import PersistentTooltip
|
from bb.ui.crumbs.persistenttooltip import PersistentTooltip
|
||||||
|
import bb.ui.crumbs.utils
|
||||||
|
|
||||||
class Configuration:
|
class Configuration:
|
||||||
'''Represents the data structure of configuration.'''
|
'''Represents the data structure of configuration.'''
|
||||||
|
|
||||||
def __init__(self, params):
|
def __init__(self):
|
||||||
# Settings
|
|
||||||
self.curr_mach = ""
|
self.curr_mach = ""
|
||||||
|
# settings
|
||||||
|
self.curr_distro = ""
|
||||||
|
self.dldir = self.sstatedir = self.sstatemirror = ""
|
||||||
|
self.pmake = self.bbthread = 0
|
||||||
|
self.curr_package_format = ""
|
||||||
|
self.image_rootfs_size = self.image_extra_size = 0
|
||||||
|
self.image_overhead_factor = 1
|
||||||
|
self.incompat_license = ""
|
||||||
|
self.curr_sdk_machine = ""
|
||||||
|
self.conf_version = self.lconf_version = ""
|
||||||
|
self.extra_setting = {}
|
||||||
|
self.toolchain_build = False
|
||||||
|
self.image_fstypes = ""
|
||||||
|
# bblayers.conf
|
||||||
|
self.layers = []
|
||||||
|
# image/recipes/packages
|
||||||
|
self.clear_selection()
|
||||||
|
|
||||||
|
self.user_selected_packages = []
|
||||||
|
|
||||||
|
self.default_task = "build"
|
||||||
|
|
||||||
|
# proxy settings
|
||||||
|
self.all_proxy = self.http_proxy = self.ftp_proxy = self.https_proxy = ""
|
||||||
|
self.git_proxy_host = self.git_proxy_port = ""
|
||||||
|
self.cvs_proxy_host = self.cvs_proxy_port = ""
|
||||||
|
self.enable_proxy = None
|
||||||
|
|
||||||
|
def clear_selection(self):
|
||||||
|
self.selected_image = None
|
||||||
|
self.selected_recipes = []
|
||||||
|
self.selected_packages = []
|
||||||
|
|
||||||
|
def update(self, params):
|
||||||
|
# settings
|
||||||
self.curr_distro = params["distro"]
|
self.curr_distro = params["distro"]
|
||||||
self.dldir = params["dldir"]
|
self.dldir = params["dldir"]
|
||||||
self.sstatedir = params["sstatedir"]
|
self.sstatedir = params["sstatedir"]
|
||||||
self.sstatemirror = params["sstatemirror"]
|
self.sstatemirror = params["sstatemirror"]
|
||||||
self.pmake = params["pmake"]
|
self.pmake = int(params["pmake"].split()[1])
|
||||||
self.bbthread = params["bbthread"]
|
self.bbthread = params["bbthread"]
|
||||||
self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
|
self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
|
||||||
self.image_rootfs_size = params["image_rootfs_size"]
|
self.image_rootfs_size = params["image_rootfs_size"]
|
||||||
@@ -58,17 +94,16 @@ class Configuration:
|
|||||||
self.curr_sdk_machine = params["sdk_machine"]
|
self.curr_sdk_machine = params["sdk_machine"]
|
||||||
self.conf_version = params["conf_version"]
|
self.conf_version = params["conf_version"]
|
||||||
self.lconf_version = params["lconf_version"]
|
self.lconf_version = params["lconf_version"]
|
||||||
self.extra_setting = {}
|
self.image_fstypes = params["image_fstypes"]
|
||||||
self.toolchain_build = False
|
# self.extra_setting/self.toolchain_build
|
||||||
self.image_fstypes = params["image_fstypes"].split()
|
|
||||||
# bblayers.conf
|
# bblayers.conf
|
||||||
self.layers = params["layer"].split()
|
self.layers = params["layer"].split()
|
||||||
# image/recipes/packages
|
self.default_task = params["default_task"]
|
||||||
self.selected_image = None
|
|
||||||
self.selected_recipes = []
|
|
||||||
self.selected_packages = []
|
|
||||||
|
|
||||||
# proxy settings
|
# proxy settings
|
||||||
|
self.enable_proxy = params["http_proxy"] != "" or params["https_proxy"] != "" or params["ftp_proxy"] != "" \
|
||||||
|
or params["git_proxy_host"] != "" or params["git_proxy_port"] != "" \
|
||||||
|
or params["cvs_proxy_host"] != "" or params["cvs_proxy_port"] != "" or params["all_proxy"] != ""
|
||||||
self.all_proxy = params["all_proxy"]
|
self.all_proxy = params["all_proxy"]
|
||||||
self.http_proxy = params["http_proxy"]
|
self.http_proxy = params["http_proxy"]
|
||||||
self.ftp_proxy = params["ftp_proxy"]
|
self.ftp_proxy = params["ftp_proxy"]
|
||||||
@@ -85,10 +120,22 @@ class Configuration:
|
|||||||
self.dldir = template.getVar("DL_DIR")
|
self.dldir = template.getVar("DL_DIR")
|
||||||
self.sstatedir = template.getVar("SSTATE_DIR")
|
self.sstatedir = template.getVar("SSTATE_DIR")
|
||||||
self.sstatemirror = template.getVar("SSTATE_MIRROR")
|
self.sstatemirror = template.getVar("SSTATE_MIRROR")
|
||||||
self.pmake = int(template.getVar("PARALLEL_MAKE").split()[1])
|
try:
|
||||||
self.bbthread = int(template.getVar("BB_NUMBER_THREADS"))
|
self.pmake = int(template.getVar("PARALLEL_MAKE").split()[1])
|
||||||
self.image_rootfs_size = int(template.getVar("IMAGE_ROOTFS_SIZE"))
|
except:
|
||||||
self.image_extra_size = int(template.getVar("IMAGE_EXTRA_SPACE"))
|
pass
|
||||||
|
try:
|
||||||
|
self.bbthread = int(template.getVar("BB_NUMBER_THREADS"))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
self.image_rootfs_size = int(template.getVar("IMAGE_ROOTFS_SIZE"))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
self.image_extra_size = int(template.getVar("IMAGE_EXTRA_SPACE"))
|
||||||
|
except:
|
||||||
|
pass
|
||||||
# image_overhead_factor is read-only.
|
# image_overhead_factor is read-only.
|
||||||
self.incompat_license = template.getVar("INCOMPATIBLE_LICENSE")
|
self.incompat_license = template.getVar("INCOMPATIBLE_LICENSE")
|
||||||
self.curr_sdk_machine = template.getVar("SDKMACHINE")
|
self.curr_sdk_machine = template.getVar("SDKMACHINE")
|
||||||
@@ -96,7 +143,7 @@ class Configuration:
|
|||||||
self.lconf_version = template.getVar("LCONF_VERSION")
|
self.lconf_version = template.getVar("LCONF_VERSION")
|
||||||
self.extra_setting = eval(template.getVar("EXTRA_SETTING"))
|
self.extra_setting = eval(template.getVar("EXTRA_SETTING"))
|
||||||
self.toolchain_build = eval(template.getVar("TOOLCHAIN_BUILD"))
|
self.toolchain_build = eval(template.getVar("TOOLCHAIN_BUILD"))
|
||||||
self.image_fstypes = template.getVar("IMAGE_FSTYPES").split()
|
self.image_fstypes = template.getVar("IMAGE_FSTYPES")
|
||||||
# bblayers.conf
|
# bblayers.conf
|
||||||
self.layers = template.getVar("BBLAYERS").split()
|
self.layers = template.getVar("BBLAYERS").split()
|
||||||
# image/recipes/packages
|
# image/recipes/packages
|
||||||
@@ -104,6 +151,7 @@ class Configuration:
|
|||||||
self.selected_recipes = template.getVar("DEPENDS").split()
|
self.selected_recipes = template.getVar("DEPENDS").split()
|
||||||
self.selected_packages = template.getVar("IMAGE_INSTALL").split()
|
self.selected_packages = template.getVar("IMAGE_INSTALL").split()
|
||||||
# proxy
|
# proxy
|
||||||
|
self.enable_proxy = eval(template.getVar("enable_proxy"))
|
||||||
self.all_proxy = template.getVar("all_proxy")
|
self.all_proxy = template.getVar("all_proxy")
|
||||||
self.http_proxy = template.getVar("http_proxy")
|
self.http_proxy = template.getVar("http_proxy")
|
||||||
self.ftp_proxy = template.getVar("ftp_proxy")
|
self.ftp_proxy = template.getVar("ftp_proxy")
|
||||||
@@ -113,11 +161,12 @@ class Configuration:
|
|||||||
self.cvs_proxy_host = template.getVar("CVS_PROXY_HOST")
|
self.cvs_proxy_host = template.getVar("CVS_PROXY_HOST")
|
||||||
self.cvs_proxy_port = template.getVar("CVS_PROXY_PORT")
|
self.cvs_proxy_port = template.getVar("CVS_PROXY_PORT")
|
||||||
|
|
||||||
def save(self, template, filename):
|
def save(self, template, defaults=False):
|
||||||
# bblayers.conf
|
# bblayers.conf
|
||||||
template.setVar("BBLAYERS", " ".join(self.layers))
|
template.setVar("BBLAYERS", " ".join(self.layers))
|
||||||
# local.conf
|
# local.conf
|
||||||
template.setVar("MACHINE", self.curr_mach)
|
if not defaults:
|
||||||
|
template.setVar("MACHINE", self.curr_mach)
|
||||||
template.setVar("DISTRO", self.curr_distro)
|
template.setVar("DISTRO", self.curr_distro)
|
||||||
template.setVar("DL_DIR", self.dldir)
|
template.setVar("DL_DIR", self.dldir)
|
||||||
template.setVar("SSTATE_DIR", self.sstatedir)
|
template.setVar("SSTATE_DIR", self.sstatedir)
|
||||||
@@ -133,13 +182,14 @@ class Configuration:
|
|||||||
template.setVar("LCONF_VERSION", self.lconf_version)
|
template.setVar("LCONF_VERSION", self.lconf_version)
|
||||||
template.setVar("EXTRA_SETTING", self.extra_setting)
|
template.setVar("EXTRA_SETTING", self.extra_setting)
|
||||||
template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
|
template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
|
||||||
template.setVar("IMAGE_FSTYPES", " ".join(self.image_fstypes).lstrip(" "))
|
template.setVar("IMAGE_FSTYPES", self.image_fstypes)
|
||||||
# image/recipes/packages
|
if not defaults:
|
||||||
self.selected_image = filename
|
# image/recipes/packages
|
||||||
template.setVar("__SELECTED_IMAGE__", self.selected_image)
|
template.setVar("__SELECTED_IMAGE__", self.selected_image)
|
||||||
template.setVar("DEPENDS", self.selected_recipes)
|
template.setVar("DEPENDS", self.selected_recipes)
|
||||||
template.setVar("IMAGE_INSTALL", self.selected_packages)
|
template.setVar("IMAGE_INSTALL", self.user_selected_packages)
|
||||||
# proxy
|
# proxy
|
||||||
|
template.setVar("enable_proxy", self.enable_proxy)
|
||||||
template.setVar("all_proxy", self.all_proxy)
|
template.setVar("all_proxy", self.all_proxy)
|
||||||
template.setVar("http_proxy", self.http_proxy)
|
template.setVar("http_proxy", self.http_proxy)
|
||||||
template.setVar("ftp_proxy", self.ftp_proxy)
|
template.setVar("ftp_proxy", self.ftp_proxy)
|
||||||
@@ -152,34 +202,74 @@ class Configuration:
|
|||||||
class Parameters:
|
class Parameters:
|
||||||
'''Represents other variables like available machines, etc.'''
|
'''Represents other variables like available machines, etc.'''
|
||||||
|
|
||||||
def __init__(self, params):
|
def __init__(self):
|
||||||
# Variables
|
# Variables
|
||||||
|
self.max_threads = 65535
|
||||||
|
self.core_base = ""
|
||||||
|
self.image_addr = ""
|
||||||
|
self.image_types = []
|
||||||
|
self.runnable_image_types = []
|
||||||
|
self.runnable_machine_patterns = []
|
||||||
|
self.deployable_image_types = []
|
||||||
|
self.tmpdir = ""
|
||||||
|
|
||||||
self.all_machines = []
|
self.all_machines = []
|
||||||
self.all_package_formats = []
|
self.all_package_formats = []
|
||||||
self.all_distros = []
|
self.all_distros = []
|
||||||
self.all_sdk_machines = []
|
self.all_sdk_machines = []
|
||||||
self.max_threads = params["max_threads"]
|
|
||||||
self.all_layers = []
|
self.all_layers = []
|
||||||
self.core_base = params["core_base"]
|
|
||||||
self.image_names = []
|
self.image_names = []
|
||||||
|
|
||||||
|
# for build log to show
|
||||||
|
self.bb_version = ""
|
||||||
|
self.target_arch = ""
|
||||||
|
self.target_os = ""
|
||||||
|
self.distro_version = ""
|
||||||
|
self.tune_pkgarch = ""
|
||||||
|
|
||||||
|
def update(self, params):
|
||||||
|
self.max_threads = params["max_threads"]
|
||||||
|
self.core_base = params["core_base"]
|
||||||
self.image_addr = params["image_addr"]
|
self.image_addr = params["image_addr"]
|
||||||
self.image_types = params["image_types"].split()
|
self.image_types = params["image_types"].split()
|
||||||
self.runnable_image_types = params["runnable_image_types"].split()
|
self.runnable_image_types = params["runnable_image_types"].split()
|
||||||
self.runnable_machine_patterns = params["runnable_machine_patterns"].split()
|
self.runnable_machine_patterns = params["runnable_machine_patterns"].split()
|
||||||
self.deployable_image_types = params["deployable_image_types"].split()
|
self.deployable_image_types = params["deployable_image_types"].split()
|
||||||
self.tmpdir = params["tmpdir"]
|
self.tmpdir = params["tmpdir"]
|
||||||
self.distro_version = params["distro_version"]
|
# for build log to show
|
||||||
self.target_os = params["target_os"]
|
|
||||||
self.target_arch = params["target_arch"]
|
|
||||||
self.tune_pkgarch = params["tune_pkgarch"]
|
|
||||||
self.bb_version = params["bb_version"]
|
self.bb_version = params["bb_version"]
|
||||||
self.tune_arch = params["tune_arch"]
|
self.target_arch = params["target_arch"]
|
||||||
self.enable_proxy = False
|
self.target_os = params["target_os"]
|
||||||
|
self.distro_version = params["distro_version"]
|
||||||
|
self.tune_pkgarch = params["tune_pkgarch"]
|
||||||
|
|
||||||
|
def hob_conf_filter(fn, data):
|
||||||
|
if fn.endswith("/local.conf"):
|
||||||
|
distro = data.getVar("DISTRO_HOB")
|
||||||
|
if distro:
|
||||||
|
if distro != "defaultsetup":
|
||||||
|
data.setVar("DISTRO", distro)
|
||||||
|
else:
|
||||||
|
data.delVar("DISTRO")
|
||||||
|
|
||||||
|
keys = ["MACHINE_HOB", "SDKMACHINE_HOB", "PACKAGE_CLASSES_HOB", \
|
||||||
|
"BB_NUMBER_THREADS_HOB", "PARALLEL_MAKE_HOB", "DL_DIR_HOB", \
|
||||||
|
"SSTATE_DIR_HOB", "SSTATE_MIRROR_HOB", "INCOMPATIBLE_LICENSE_HOB"]
|
||||||
|
for key in keys:
|
||||||
|
var_hob = data.getVar(key)
|
||||||
|
if var_hob:
|
||||||
|
data.setVar(key.split("_HOB")[0], var_hob)
|
||||||
|
return
|
||||||
|
|
||||||
|
if fn.endswith("/bblayers.conf"):
|
||||||
|
layers = data.getVar("BBLAYERS_HOB")
|
||||||
|
if layers:
|
||||||
|
data.setVar("BBLAYERS", layers)
|
||||||
|
return
|
||||||
|
|
||||||
class Builder(gtk.Window):
|
class Builder(gtk.Window):
|
||||||
|
|
||||||
(MACHINE_SELECTION,
|
(MACHINE_SELECTION,
|
||||||
LAYER_CHANGED,
|
|
||||||
RCPPKGINFO_POPULATING,
|
RCPPKGINFO_POPULATING,
|
||||||
RCPPKGINFO_POPULATED,
|
RCPPKGINFO_POPULATED,
|
||||||
BASEIMG_SELECTED,
|
BASEIMG_SELECTED,
|
||||||
@@ -192,7 +282,7 @@ class Builder(gtk.Window):
|
|||||||
IMAGE_GENERATED,
|
IMAGE_GENERATED,
|
||||||
MY_IMAGE_OPENED,
|
MY_IMAGE_OPENED,
|
||||||
BACK,
|
BACK,
|
||||||
END_NOOP) = range(15)
|
END_NOOP) = range(14)
|
||||||
|
|
||||||
(IMAGE_CONFIGURATION,
|
(IMAGE_CONFIGURATION,
|
||||||
RECIPE_DETAILS,
|
RECIPE_DETAILS,
|
||||||
@@ -203,7 +293,6 @@ class Builder(gtk.Window):
|
|||||||
|
|
||||||
__step2page__ = {
|
__step2page__ = {
|
||||||
MACHINE_SELECTION : IMAGE_CONFIGURATION,
|
MACHINE_SELECTION : IMAGE_CONFIGURATION,
|
||||||
LAYER_CHANGED : IMAGE_CONFIGURATION,
|
|
||||||
RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
|
RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
|
||||||
RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
|
RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
|
||||||
BASEIMG_SELECTED : IMAGE_CONFIGURATION,
|
BASEIMG_SELECTED : IMAGE_CONFIGURATION,
|
||||||
@@ -221,11 +310,18 @@ class Builder(gtk.Window):
|
|||||||
def __init__(self, hobHandler, recipe_model, package_model):
|
def __init__(self, hobHandler, recipe_model, package_model):
|
||||||
super(Builder, self).__init__()
|
super(Builder, self).__init__()
|
||||||
|
|
||||||
|
self.hob_image = "hob-image"
|
||||||
|
self.hob_toolchain = "hob-toolchain"
|
||||||
|
|
||||||
# handler
|
# handler
|
||||||
self.handler = hobHandler
|
self.handler = hobHandler
|
||||||
|
|
||||||
self.template = None
|
self.template = None
|
||||||
|
|
||||||
|
# configuration and parameters
|
||||||
|
self.configuration = Configuration()
|
||||||
|
self.parameters = Parameters()
|
||||||
|
|
||||||
# build step
|
# build step
|
||||||
self.current_step = None
|
self.current_step = None
|
||||||
self.previous_step = None
|
self.previous_step = None
|
||||||
@@ -236,6 +332,12 @@ class Builder(gtk.Window):
|
|||||||
self.recipe_model = recipe_model
|
self.recipe_model = recipe_model
|
||||||
self.package_model = package_model
|
self.package_model = package_model
|
||||||
|
|
||||||
|
# Indicate whether user has customized the image
|
||||||
|
self.customized = False
|
||||||
|
|
||||||
|
# Indicate whether the UI is working
|
||||||
|
self.sensitive = True
|
||||||
|
|
||||||
# create visual elements
|
# create visual elements
|
||||||
self.create_visual_elements()
|
self.create_visual_elements()
|
||||||
|
|
||||||
@@ -245,7 +347,6 @@ class Builder(gtk.Window):
|
|||||||
self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
|
self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
|
||||||
self.handler.connect("config-updated", self.handler_config_updated_cb)
|
self.handler.connect("config-updated", self.handler_config_updated_cb)
|
||||||
self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb)
|
self.handler.connect("package-formats-updated", self.handler_package_formats_updated_cb)
|
||||||
self.handler.connect("layers-updated", self.handler_layers_updated_cb)
|
|
||||||
self.handler.connect("parsing-started", self.handler_parsing_started_cb)
|
self.handler.connect("parsing-started", self.handler_parsing_started_cb)
|
||||||
self.handler.connect("parsing", self.handler_parsing_cb)
|
self.handler.connect("parsing", self.handler_parsing_cb)
|
||||||
self.handler.connect("parsing-completed", self.handler_parsing_completed_cb)
|
self.handler.connect("parsing-completed", self.handler_parsing_completed_cb)
|
||||||
@@ -254,16 +355,18 @@ class Builder(gtk.Window):
|
|||||||
self.handler.build.connect("build-failed", self.handler_build_failed_cb)
|
self.handler.build.connect("build-failed", self.handler_build_failed_cb)
|
||||||
self.handler.build.connect("task-started", self.handler_task_started_cb)
|
self.handler.build.connect("task-started", self.handler_task_started_cb)
|
||||||
self.handler.build.connect("log-error", self.handler_build_failure_cb)
|
self.handler.build.connect("log-error", self.handler_build_failure_cb)
|
||||||
|
self.handler.build.connect("no-provider", self.handler_no_provider_cb)
|
||||||
self.handler.connect("generating-data", self.handler_generating_data_cb)
|
self.handler.connect("generating-data", self.handler_generating_data_cb)
|
||||||
self.handler.connect("data-generated", self.handler_data_generated_cb)
|
self.handler.connect("data-generated", self.handler_data_generated_cb)
|
||||||
self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
|
self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
|
||||||
self.handler.connect("command-failed", self.handler_command_failed_cb)
|
self.handler.connect("command-failed", self.handler_command_failed_cb)
|
||||||
|
self.handler.connect("sanity-failed", self.handler_sanity_failed_cb)
|
||||||
|
self.handler.connect("recipe-populated", self.handler_recipe_populated_cb)
|
||||||
|
self.handler.connect("package-populated", self.handler_package_populated_cb)
|
||||||
|
|
||||||
self.handler.init_cooker()
|
self.handler.set_config_filter(hob_conf_filter)
|
||||||
self.handler.set_extra_inherit("image_types")
|
|
||||||
self.handler.parse_config()
|
|
||||||
|
|
||||||
self.switch_page(self.MACHINE_SELECTION)
|
self.initiate_new_build_async()
|
||||||
|
|
||||||
def create_visual_elements(self):
|
def create_visual_elements(self):
|
||||||
self.set_title("Hob")
|
self.set_title("Hob")
|
||||||
@@ -299,21 +402,99 @@ class Builder(gtk.Window):
|
|||||||
self.show_all()
|
self.show_all()
|
||||||
self.nb.set_current_page(0)
|
self.nb.set_current_page(0)
|
||||||
|
|
||||||
|
def initiate_new_build_async(self):
|
||||||
|
self.switch_page(self.MACHINE_SELECTION)
|
||||||
|
if self.load_template(TemplateMgr.convert_to_template_pathfilename("default", ".hob/")) == None:
|
||||||
|
self.handler.init_cooker()
|
||||||
|
self.handler.set_extra_inherit("image_types")
|
||||||
|
self.handler.generate_configuration()
|
||||||
|
|
||||||
|
def update_config_async(self):
|
||||||
|
self.switch_page(self.MACHINE_SELECTION)
|
||||||
|
self.set_user_config()
|
||||||
|
self.handler.generate_configuration()
|
||||||
|
|
||||||
|
def sanity_check(self):
|
||||||
|
self.handler.trigger_sanity_check()
|
||||||
|
|
||||||
|
def populate_recipe_package_info_async(self):
|
||||||
|
self.switch_page(self.RCPPKGINFO_POPULATING)
|
||||||
|
# Parse recipes
|
||||||
|
self.set_user_config()
|
||||||
|
self.handler.generate_recipes()
|
||||||
|
|
||||||
|
def generate_packages_async(self):
|
||||||
|
self.switch_page(self.PACKAGE_GENERATING)
|
||||||
|
# Build packages
|
||||||
|
_, all_recipes = self.recipe_model.get_selected_recipes()
|
||||||
|
self.set_user_config()
|
||||||
|
self.handler.reset_build()
|
||||||
|
self.handler.generate_packages(all_recipes, self.configuration.default_task)
|
||||||
|
|
||||||
|
def fast_generate_image_async(self):
|
||||||
|
self.switch_page(self.FAST_IMAGE_GENERATING)
|
||||||
|
# Build packages
|
||||||
|
_, all_recipes = self.recipe_model.get_selected_recipes()
|
||||||
|
self.set_user_config()
|
||||||
|
self.handler.reset_build()
|
||||||
|
self.handler.generate_packages(all_recipes, self.configuration.default_task)
|
||||||
|
|
||||||
|
def generate_image_async(self):
|
||||||
|
self.switch_page(self.IMAGE_GENERATING)
|
||||||
|
self.handler.reset_build()
|
||||||
|
# Build image
|
||||||
|
self.set_user_config()
|
||||||
|
toolchain_packages = []
|
||||||
|
if self.configuration.toolchain_build:
|
||||||
|
toolchain_packages = self.package_model.get_selected_packages_toolchain()
|
||||||
|
if self.configuration.selected_image == self.recipe_model.__dummy_image__:
|
||||||
|
packages = self.package_model.get_selected_packages()
|
||||||
|
image = self.hob_image
|
||||||
|
else:
|
||||||
|
packages = []
|
||||||
|
image = self.configuration.selected_image
|
||||||
|
self.handler.generate_image(image,
|
||||||
|
self.hob_toolchain,
|
||||||
|
packages,
|
||||||
|
toolchain_packages,
|
||||||
|
self.configuration.default_task)
|
||||||
|
|
||||||
|
def get_parameters_sync(self):
|
||||||
|
return self.handler.get_parameters()
|
||||||
|
|
||||||
|
def request_package_info_async(self):
|
||||||
|
self.handler.request_package_info()
|
||||||
|
|
||||||
|
def cancel_build_sync(self, force=False):
|
||||||
|
self.handler.cancel_build(force)
|
||||||
|
|
||||||
|
def cancel_parse_sync(self):
|
||||||
|
self.handler.cancel_parse()
|
||||||
|
|
||||||
def load_template(self, path):
|
def load_template(self, path):
|
||||||
|
if not os.path.isfile(path):
|
||||||
|
return None
|
||||||
|
|
||||||
self.template = TemplateMgr()
|
self.template = TemplateMgr()
|
||||||
self.template.load(path)
|
try:
|
||||||
self.configuration.load(self.template)
|
self.template.load(path)
|
||||||
|
self.configuration.load(self.template)
|
||||||
|
except Exception as e:
|
||||||
|
self.show_error_dialog("Hob Exception - %s" % (str(e)))
|
||||||
|
self.reset()
|
||||||
|
finally:
|
||||||
|
self.template.destroy()
|
||||||
|
self.template = None
|
||||||
|
|
||||||
for layer in self.configuration.layers:
|
for layer in self.configuration.layers:
|
||||||
if not os.path.exists(layer+'/conf/layer.conf'):
|
if not os.path.exists(layer+'/conf/layer.conf'):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.switch_page(self.LAYER_CHANGED)
|
self.save_defaults() # remember layers and settings
|
||||||
|
self.update_config_async()
|
||||||
|
return True
|
||||||
|
|
||||||
self.template.destroy()
|
def save_template(self, path, defaults=False):
|
||||||
self.template = None
|
|
||||||
|
|
||||||
def save_template(self, path):
|
|
||||||
if path.rfind("/") == -1:
|
if path.rfind("/") == -1:
|
||||||
filename = "default"
|
filename = "default"
|
||||||
path = "."
|
path = "."
|
||||||
@@ -322,12 +503,22 @@ class Builder(gtk.Window):
|
|||||||
path = path[0:path.rfind("/")]
|
path = path[0:path.rfind("/")]
|
||||||
|
|
||||||
self.template = TemplateMgr()
|
self.template = TemplateMgr()
|
||||||
self.template.open(filename, path)
|
try:
|
||||||
self.configuration.save(self.template, filename)
|
self.template.open(filename, path)
|
||||||
|
self.configuration.save(self.template, defaults)
|
||||||
|
|
||||||
self.template.save()
|
self.template.save()
|
||||||
self.template.destroy()
|
except Exception as e:
|
||||||
self.template = None
|
self.show_error_dialog("Hob Exception - %s" % (str(e)))
|
||||||
|
self.reset()
|
||||||
|
finally:
|
||||||
|
self.template.destroy()
|
||||||
|
self.template = None
|
||||||
|
|
||||||
|
def save_defaults(self):
|
||||||
|
if not os.path.exists(".hob/"):
|
||||||
|
os.mkdir(".hob/")
|
||||||
|
self.save_template(".hob/default", True)
|
||||||
|
|
||||||
def switch_page(self, next_step):
|
def switch_page(self, next_step):
|
||||||
# Main Workflow (Business Logic)
|
# Main Workflow (Business Logic)
|
||||||
@@ -336,16 +527,10 @@ class Builder(gtk.Window):
|
|||||||
if next_step == self.MACHINE_SELECTION: # init step
|
if next_step == self.MACHINE_SELECTION: # init step
|
||||||
self.image_configuration_page.show_machine()
|
self.image_configuration_page.show_machine()
|
||||||
|
|
||||||
elif next_step == self.LAYER_CHANGED:
|
|
||||||
# after layers is changd by users
|
|
||||||
self.image_configuration_page.show_machine()
|
|
||||||
self.handler.refresh_layers(self.configuration.layers)
|
|
||||||
|
|
||||||
elif next_step == self.RCPPKGINFO_POPULATING:
|
elif next_step == self.RCPPKGINFO_POPULATING:
|
||||||
# MACHINE CHANGED action or SETTINGS CHANGED
|
# MACHINE CHANGED action or SETTINGS CHANGED
|
||||||
# show the progress bar
|
# show the progress bar
|
||||||
self.image_configuration_page.show_info_populating()
|
self.image_configuration_page.show_info_populating()
|
||||||
self.generate_recipes()
|
|
||||||
|
|
||||||
elif next_step == self.RCPPKGINFO_POPULATED:
|
elif next_step == self.RCPPKGINFO_POPULATED:
|
||||||
self.image_configuration_page.show_info_populated()
|
self.image_configuration_page.show_info_populated()
|
||||||
@@ -362,7 +547,6 @@ class Builder(gtk.Window):
|
|||||||
elif next_step == self.PACKAGE_GENERATING or next_step == self.FAST_IMAGE_GENERATING:
|
elif next_step == self.PACKAGE_GENERATING or next_step == self.FAST_IMAGE_GENERATING:
|
||||||
# both PACKAGE_GENEATING and FAST_IMAGE_GENERATING share the same page
|
# both PACKAGE_GENEATING and FAST_IMAGE_GENERATING share the same page
|
||||||
self.build_details_page.show_page(next_step)
|
self.build_details_page.show_page(next_step)
|
||||||
self.generate_packages()
|
|
||||||
|
|
||||||
elif next_step == self.PACKAGE_GENERATED:
|
elif next_step == self.PACKAGE_GENERATED:
|
||||||
pass
|
pass
|
||||||
@@ -371,7 +555,6 @@ class Builder(gtk.Window):
|
|||||||
# after packages are generated, selected_packages need to
|
# after packages are generated, selected_packages need to
|
||||||
# be updated in package_model per selected_image in recipe_model
|
# be updated in package_model per selected_image in recipe_model
|
||||||
self.build_details_page.show_page(next_step)
|
self.build_details_page.show_page(next_step)
|
||||||
self.generate_image()
|
|
||||||
|
|
||||||
elif next_step == self.IMAGE_GENERATED:
|
elif next_step == self.IMAGE_GENERATED:
|
||||||
self.image_details_page.show_page(next_step)
|
self.image_details_page.show_page(next_step)
|
||||||
@@ -402,14 +585,22 @@ class Builder(gtk.Window):
|
|||||||
self.handler.set_image_fstypes(self.configuration.image_fstypes)
|
self.handler.set_image_fstypes(self.configuration.image_fstypes)
|
||||||
self.handler.set_extra_config(self.configuration.extra_setting)
|
self.handler.set_extra_config(self.configuration.extra_setting)
|
||||||
self.handler.set_extra_inherit("packageinfo")
|
self.handler.set_extra_inherit("packageinfo")
|
||||||
|
self.handler.set_extra_inherit("image_types")
|
||||||
# set proxies
|
# set proxies
|
||||||
if self.parameters.enable_proxy:
|
if self.configuration.enable_proxy == True:
|
||||||
self.handler.set_http_proxy(self.configuration.http_proxy)
|
self.handler.set_http_proxy(self.configuration.http_proxy)
|
||||||
self.handler.set_https_proxy(self.configuration.https_proxy)
|
self.handler.set_https_proxy(self.configuration.https_proxy)
|
||||||
self.handler.set_ftp_proxy(self.configuration.ftp_proxy)
|
self.handler.set_ftp_proxy(self.configuration.ftp_proxy)
|
||||||
self.handler.set_all_proxy(self.configuration.all_proxy)
|
self.handler.set_all_proxy(self.configuration.all_proxy)
|
||||||
self.handler.set_git_proxy(self.configuration.git_proxy_host, self.configuration.git_proxy_port)
|
self.handler.set_git_proxy(self.configuration.git_proxy_host, self.configuration.git_proxy_port)
|
||||||
self.handler.set_cvs_proxy(self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port)
|
self.handler.set_cvs_proxy(self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port)
|
||||||
|
elif self.configuration.enable_proxy == False:
|
||||||
|
self.handler.set_http_proxy('')
|
||||||
|
self.handler.set_https_proxy('')
|
||||||
|
self.handler.set_ftp_proxy('')
|
||||||
|
self.handler.set_all_proxy('')
|
||||||
|
self.handler.set_git_proxy('', '')
|
||||||
|
self.handler.set_cvs_proxy('', '')
|
||||||
|
|
||||||
def update_recipe_model(self, selected_image, selected_recipes):
|
def update_recipe_model(self, selected_image, selected_recipes):
|
||||||
self.recipe_model.set_selected_image(selected_image)
|
self.recipe_model.set_selected_image(selected_image)
|
||||||
@@ -419,25 +610,16 @@ class Builder(gtk.Window):
|
|||||||
left = self.package_model.set_selected_packages(selected_packages)
|
left = self.package_model.set_selected_packages(selected_packages)
|
||||||
self.configuration.selected_packages += left
|
self.configuration.selected_packages += left
|
||||||
|
|
||||||
def generate_packages(self):
|
def update_configuration_parameters(self, params):
|
||||||
# Build packages
|
if params:
|
||||||
_, all_recipes = self.recipe_model.get_selected_recipes()
|
self.configuration.update(params)
|
||||||
self.set_user_config()
|
self.parameters.update(params)
|
||||||
self.handler.reset_build()
|
|
||||||
self.handler.generate_packages(all_recipes)
|
|
||||||
|
|
||||||
def generate_recipes(self):
|
|
||||||
# Parse recipes
|
|
||||||
self.set_user_config()
|
|
||||||
self.handler.generate_recipes()
|
|
||||||
|
|
||||||
def generate_image(self):
|
|
||||||
# Build image
|
|
||||||
self.set_user_config()
|
|
||||||
all_packages = self.package_model.get_selected_packages()
|
|
||||||
self.handler.reset_build()
|
|
||||||
self.handler.generate_image(all_packages, self.configuration.toolchain_build)
|
|
||||||
|
|
||||||
|
def reset(self):
|
||||||
|
self.configuration.curr_mach = ""
|
||||||
|
self.configuration.clear_selection()
|
||||||
|
self.image_configuration_page.switch_machine_combo()
|
||||||
|
self.switch_page(self.MACHINE_SELECTION)
|
||||||
|
|
||||||
# Callback Functions
|
# Callback Functions
|
||||||
def handler_config_updated_cb(self, handler, which, values):
|
def handler_config_updated_cb(self, handler, which, values):
|
||||||
@@ -452,22 +634,17 @@ class Builder(gtk.Window):
|
|||||||
def handler_package_formats_updated_cb(self, handler, formats):
|
def handler_package_formats_updated_cb(self, handler, formats):
|
||||||
self.parameters.all_package_formats = formats
|
self.parameters.all_package_formats = formats
|
||||||
|
|
||||||
def handler_layers_updated_cb(self, handler, layers):
|
|
||||||
self.parameters.all_layers = layers
|
|
||||||
|
|
||||||
def handler_command_succeeded_cb(self, handler, initcmd):
|
def handler_command_succeeded_cb(self, handler, initcmd):
|
||||||
if initcmd == self.handler.PARSE_CONFIG:
|
if initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||||
# settings
|
self.update_configuration_parameters(self.get_parameters_sync())
|
||||||
params = self.handler.get_parameters()
|
self.sanity_check()
|
||||||
self.configuration = Configuration(params)
|
elif initcmd == self.handler.SANITY_CHECK:
|
||||||
self.parameters = Parameters(params)
|
|
||||||
self.handler.generate_configuration()
|
|
||||||
elif initcmd == self.handler.GENERATE_CONFIGURATION:
|
|
||||||
self.image_configuration_page.switch_machine_combo()
|
self.image_configuration_page.switch_machine_combo()
|
||||||
elif initcmd in [self.handler.GENERATE_RECIPES,
|
elif initcmd in [self.handler.GENERATE_RECIPES,
|
||||||
self.handler.GENERATE_PACKAGES,
|
self.handler.GENERATE_PACKAGES,
|
||||||
self.handler.GENERATE_IMAGE]:
|
self.handler.GENERATE_IMAGE]:
|
||||||
self.handler.request_package_info_async()
|
self.update_configuration_parameters(self.get_parameters_sync())
|
||||||
|
self.request_package_info_async()
|
||||||
elif initcmd == self.handler.POPULATE_PACKAGEINFO:
|
elif initcmd == self.handler.POPULATE_PACKAGEINFO:
|
||||||
if self.current_step == self.RCPPKGINFO_POPULATING:
|
if self.current_step == self.RCPPKGINFO_POPULATING:
|
||||||
self.switch_page(self.RCPPKGINFO_POPULATED)
|
self.switch_page(self.RCPPKGINFO_POPULATED)
|
||||||
@@ -476,25 +653,26 @@ class Builder(gtk.Window):
|
|||||||
|
|
||||||
self.rcppkglist_populated()
|
self.rcppkglist_populated()
|
||||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||||
self.switch_page(self.IMAGE_GENERATING)
|
self.generate_image_async()
|
||||||
elif self.current_step == self.PACKAGE_GENERATING:
|
|
||||||
self.switch_page(self.PACKAGE_GENERATED)
|
def show_error_dialog(self, msg):
|
||||||
elif self.current_step == self.IMAGE_GENERATING:
|
lbl = "<b>Error</b>\n"
|
||||||
self.switch_page(self.IMAGE_GENERATED)
|
lbl = lbl + "%s\n\n" % glib.markup_escape_text(msg)
|
||||||
|
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
||||||
|
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||||
|
HobButton.style_button(button)
|
||||||
|
response = dialog.run()
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
def handler_command_failed_cb(self, handler, msg):
|
def handler_command_failed_cb(self, handler, msg):
|
||||||
if msg:
|
if msg:
|
||||||
lbl = "<b>Error</b>\n"
|
self.show_error_dialog(msg)
|
||||||
lbl = lbl + "%s\n\n" % msg
|
self.reset()
|
||||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
|
||||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
def handler_sanity_failed_cb(self, handler, msg):
|
||||||
HobButton.style_button(button)
|
msg = msg.replace("your local.conf", "Settings")
|
||||||
response = dialog.run()
|
self.show_error_dialog(msg)
|
||||||
dialog.destroy()
|
self.reset()
|
||||||
self.handler.clear_busy()
|
|
||||||
self.configuration.curr_mach = None
|
|
||||||
self.image_configuration_page.switch_machine_combo()
|
|
||||||
self.switch_page(self.MACHINE_SELECTION)
|
|
||||||
|
|
||||||
def window_sensitive(self, sensitive):
|
def window_sensitive(self, sensitive):
|
||||||
self.image_configuration_page.machine_combo.set_sensitive(sensitive)
|
self.image_configuration_page.machine_combo.set_sensitive(sensitive)
|
||||||
@@ -515,6 +693,7 @@ class Builder(gtk.Window):
|
|||||||
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
|
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
|
||||||
else:
|
else:
|
||||||
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
||||||
|
self.sensitive = sensitive
|
||||||
|
|
||||||
|
|
||||||
def handler_generating_data_cb(self, handler):
|
def handler_generating_data_cb(self, handler):
|
||||||
@@ -528,11 +707,8 @@ class Builder(gtk.Window):
|
|||||||
selected_recipes = self.configuration.selected_recipes[:]
|
selected_recipes = self.configuration.selected_recipes[:]
|
||||||
selected_packages = self.configuration.selected_packages[:]
|
selected_packages = self.configuration.selected_packages[:]
|
||||||
|
|
||||||
self.recipe_model.image_list_append(selected_image,
|
|
||||||
" ".join(selected_recipes),
|
|
||||||
" ".join(selected_packages))
|
|
||||||
|
|
||||||
self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
|
self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
|
||||||
|
self.image_configuration_page.update_image_desc(selected_image)
|
||||||
self.update_recipe_model(selected_image, selected_recipes)
|
self.update_recipe_model(selected_image, selected_recipes)
|
||||||
self.update_package_model(selected_packages)
|
self.update_package_model(selected_packages)
|
||||||
|
|
||||||
@@ -542,6 +718,12 @@ class Builder(gtk.Window):
|
|||||||
def packagelist_changed_cb(self, package_model):
|
def packagelist_changed_cb(self, package_model):
|
||||||
self.package_details_page.refresh_selection()
|
self.package_details_page.refresh_selection()
|
||||||
|
|
||||||
|
def handler_recipe_populated_cb(self, handler):
|
||||||
|
self.image_configuration_page.update_progress_bar("Populated recipes", 0.99)
|
||||||
|
|
||||||
|
def handler_package_populated_cb(self, handler):
|
||||||
|
self.image_configuration_page.update_progress_bar("Populated packages", 1.0)
|
||||||
|
|
||||||
def handler_parsing_started_cb(self, handler, message):
|
def handler_parsing_started_cb(self, handler, message):
|
||||||
if self.current_step != self.RCPPKGINFO_POPULATING:
|
if self.current_step != self.RCPPKGINFO_POPULATING:
|
||||||
return
|
return
|
||||||
@@ -561,7 +743,7 @@ class Builder(gtk.Window):
|
|||||||
|
|
||||||
fraction = message["current"] * 1.0/message["total"]
|
fraction = message["current"] * 1.0/message["total"]
|
||||||
if message["eventname"] == "TreeDataPreparationProgress":
|
if message["eventname"] == "TreeDataPreparationProgress":
|
||||||
fraction = 0.6 + 0.4 * fraction
|
fraction = 0.6 + 0.38 * fraction
|
||||||
else:
|
else:
|
||||||
fraction = 0.6 * fraction
|
fraction = 0.6 * fraction
|
||||||
self.image_configuration_page.update_progress_bar(message["title"], fraction)
|
self.image_configuration_page.update_progress_bar(message["title"], fraction)
|
||||||
@@ -571,7 +753,7 @@ class Builder(gtk.Window):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if message["eventname"] == "TreeDataPreparationCompleted":
|
if message["eventname"] == "TreeDataPreparationCompleted":
|
||||||
fraction = 1.0
|
fraction = 0.98
|
||||||
else:
|
else:
|
||||||
fraction = 0.6
|
fraction = 0.6
|
||||||
self.image_configuration_page.update_progress_bar(message["title"], fraction)
|
self.image_configuration_page.update_progress_bar(message["title"], fraction)
|
||||||
@@ -587,8 +769,6 @@ class Builder(gtk.Window):
|
|||||||
elif self.current_step == self.PACKAGE_GENERATING:
|
elif self.current_step == self.PACKAGE_GENERATING:
|
||||||
fraction = 0
|
fraction = 0
|
||||||
self.build_details_page.update_progress_bar("Build Started: ", fraction)
|
self.build_details_page.update_progress_bar("Build Started: ", fraction)
|
||||||
self.build_details_page.reset_build_status()
|
|
||||||
self.build_details_page.reset_issues()
|
|
||||||
self.build_details_page.show_configurations(self.configuration, self.parameters)
|
self.build_details_page.show_configurations(self.configuration, self.parameters)
|
||||||
|
|
||||||
def build_succeeded(self):
|
def build_succeeded(self):
|
||||||
@@ -597,24 +777,42 @@ class Builder(gtk.Window):
|
|||||||
elif self.current_step == self.IMAGE_GENERATING:
|
elif self.current_step == self.IMAGE_GENERATING:
|
||||||
fraction = 1.0
|
fraction = 1.0
|
||||||
self.parameters.image_names = []
|
self.parameters.image_names = []
|
||||||
linkname = 'hob-image-' + self.configuration.curr_mach
|
selected_image = self.recipe_model.get_selected_image()
|
||||||
|
if selected_image == self.recipe_model.__dummy_image__:
|
||||||
|
linkname = 'hob-image-' + self.configuration.curr_mach
|
||||||
|
else:
|
||||||
|
linkname = selected_image + '-' + self.configuration.curr_mach
|
||||||
for image_type in self.parameters.image_types:
|
for image_type in self.parameters.image_types:
|
||||||
linkpath = self.parameters.image_addr + '/' + linkname + '.' + image_type
|
for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[image_type]:
|
||||||
if os.path.exists(linkpath):
|
linkpath = self.parameters.image_addr + '/' + linkname + '.' + real_image_type
|
||||||
self.parameters.image_names.append(os.readlink(linkpath))
|
if os.path.exists(linkpath):
|
||||||
|
self.parameters.image_names.append(os.readlink(linkpath))
|
||||||
elif self.current_step == self.PACKAGE_GENERATING:
|
elif self.current_step == self.PACKAGE_GENERATING:
|
||||||
fraction = 1.0
|
fraction = 1.0
|
||||||
self.build_details_page.update_progress_bar("Build Completed: ", fraction)
|
self.build_details_page.update_progress_bar("Build Completed: ", fraction)
|
||||||
|
self.handler.build_succeeded_async()
|
||||||
self.stopping = False
|
self.stopping = False
|
||||||
|
|
||||||
def build_failed(self):
|
if self.current_step == self.PACKAGE_GENERATING:
|
||||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
self.switch_page(self.PACKAGE_GENERATED)
|
||||||
fraction = 0.9
|
|
||||||
elif self.current_step == self.IMAGE_GENERATING:
|
elif self.current_step == self.IMAGE_GENERATING:
|
||||||
fraction = 1.0
|
self.switch_page(self.IMAGE_GENERATED)
|
||||||
elif self.current_step == self.PACKAGE_GENERATING:
|
|
||||||
fraction = 1.0
|
def build_failed(self):
|
||||||
self.build_details_page.update_progress_bar("Build Failed: ", fraction, False)
|
if self.stopping:
|
||||||
|
status = "stop"
|
||||||
|
message = "Build stopped: "
|
||||||
|
fraction = self.build_details_page.progress_bar.get_fraction()
|
||||||
|
else:
|
||||||
|
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||||
|
fraction = 0.9
|
||||||
|
elif self.current_step == self.IMAGE_GENERATING:
|
||||||
|
fraction = 1.0
|
||||||
|
elif self.current_step == self.PACKAGE_GENERATING:
|
||||||
|
fraction = 1.0
|
||||||
|
status = "fail"
|
||||||
|
message = "Build failed: "
|
||||||
|
self.build_details_page.update_progress_bar(message, fraction, status)
|
||||||
self.build_details_page.show_back_button()
|
self.build_details_page.show_back_button()
|
||||||
self.build_details_page.hide_stop_button()
|
self.build_details_page.hide_stop_button()
|
||||||
self.handler.build_failed_async()
|
self.handler.build_failed_async()
|
||||||
@@ -630,6 +828,14 @@ class Builder(gtk.Window):
|
|||||||
def handler_build_failed_cb(self, running_build):
|
def handler_build_failed_cb(self, running_build):
|
||||||
self.build_failed()
|
self.build_failed()
|
||||||
|
|
||||||
|
def handler_no_provider_cb(self, running_build, msg):
|
||||||
|
dialog = CrumbsMessageDialog(self, glib.markup_escape_text(msg), gtk.STOCK_DIALOG_INFO)
|
||||||
|
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||||
|
HobButton.style_button(button)
|
||||||
|
dialog.run()
|
||||||
|
dialog.destroy()
|
||||||
|
self.build_failed()
|
||||||
|
|
||||||
def handler_task_started_cb(self, running_build, message):
|
def handler_task_started_cb(self, running_build, message):
|
||||||
fraction = message["current"] * 1.0/message["total"]
|
fraction = message["current"] * 1.0/message["total"]
|
||||||
title = "Build packages"
|
title = "Build packages"
|
||||||
@@ -662,6 +868,8 @@ class Builder(gtk.Window):
|
|||||||
self.build_details_page.show_issues()
|
self.build_details_page.show_issues()
|
||||||
|
|
||||||
def destroy_window_cb(self, widget, event):
|
def destroy_window_cb(self, widget, event):
|
||||||
|
if not self.sensitive:
|
||||||
|
return True
|
||||||
lbl = "<b>Do you really want to exit the Hob image creator?</b>"
|
lbl = "<b>Do you really want to exit the Hob image creator?</b>"
|
||||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
|
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
|
||||||
button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
|
button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
|
||||||
@@ -688,7 +896,7 @@ class Builder(gtk.Window):
|
|||||||
dialog.run()
|
dialog.run()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
return
|
return
|
||||||
self.switch_page(self.PACKAGE_GENERATING)
|
self.generate_packages_async()
|
||||||
|
|
||||||
def build_image(self):
|
def build_image(self):
|
||||||
selected_packages = self.package_model.get_selected_packages()
|
selected_packages = self.package_model.get_selected_packages()
|
||||||
@@ -701,7 +909,7 @@ class Builder(gtk.Window):
|
|||||||
dialog.run()
|
dialog.run()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
return
|
return
|
||||||
self.switch_page(self.IMAGE_GENERATING)
|
self.generate_image_async()
|
||||||
|
|
||||||
def just_bake(self):
|
def just_bake(self):
|
||||||
selected_image = self.recipe_model.get_selected_image()
|
selected_image = self.recipe_model.get_selected_image()
|
||||||
@@ -718,11 +926,11 @@ class Builder(gtk.Window):
|
|||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
return
|
return
|
||||||
|
|
||||||
self.switch_page(self.FAST_IMAGE_GENERATING)
|
self.fast_generate_image_async()
|
||||||
|
|
||||||
def show_binb_dialog(self, binb):
|
def show_binb_dialog(self, binb):
|
||||||
markup = "<b>Brought in by:</b>\n%s" % binb
|
markup = "<b>Brought in by:</b>\n%s" % binb
|
||||||
ptip = PersistentTooltip(markup)
|
ptip = PersistentTooltip(markup, self)
|
||||||
|
|
||||||
ptip.show()
|
ptip.show()
|
||||||
|
|
||||||
@@ -734,14 +942,17 @@ class Builder(gtk.Window):
|
|||||||
flags = gtk.DIALOG_MODAL
|
flags = gtk.DIALOG_MODAL
|
||||||
| gtk.DIALOG_DESTROY_WITH_PARENT
|
| gtk.DIALOG_DESTROY_WITH_PARENT
|
||||||
| gtk.DIALOG_NO_SEPARATOR)
|
| gtk.DIALOG_NO_SEPARATOR)
|
||||||
button = dialog.add_button("Close", gtk.RESPONSE_YES)
|
button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
|
||||||
|
HobAltButton.style_button(button)
|
||||||
|
button = dialog.add_button("OK", gtk.RESPONSE_YES)
|
||||||
HobButton.style_button(button)
|
HobButton.style_button(button)
|
||||||
response = dialog.run()
|
response = dialog.run()
|
||||||
if response == gtk.RESPONSE_YES:
|
if response == gtk.RESPONSE_YES:
|
||||||
self.configuration.layers = dialog.layers
|
self.configuration.layers = dialog.layers
|
||||||
|
self.save_defaults() # remember layers
|
||||||
# DO refresh layers
|
# DO refresh layers
|
||||||
if dialog.layers_changed:
|
if dialog.layers_changed:
|
||||||
self.switch_page(self.LAYER_CHANGED)
|
self.update_config_async()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
|
||||||
def show_load_template_dialog(self):
|
def show_load_template_dialog(self):
|
||||||
@@ -757,10 +968,11 @@ class Builder(gtk.Window):
|
|||||||
dialog.add_filter(filter)
|
dialog.add_filter(filter)
|
||||||
|
|
||||||
response = dialog.run()
|
response = dialog.run()
|
||||||
|
path = None
|
||||||
if response == gtk.RESPONSE_YES:
|
if response == gtk.RESPONSE_YES:
|
||||||
path = dialog.get_filename()
|
path = dialog.get_filename()
|
||||||
self.load_template(path)
|
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
return response == gtk.RESPONSE_YES, path
|
||||||
|
|
||||||
def show_save_template_dialog(self):
|
def show_save_template_dialog(self):
|
||||||
dialog = gtk.FileChooserDialog("Save Template Files", self,
|
dialog = gtk.FileChooserDialog("Save Template Files", self,
|
||||||
@@ -810,7 +1022,6 @@ class Builder(gtk.Window):
|
|||||||
all_distros = self.parameters.all_distros,
|
all_distros = self.parameters.all_distros,
|
||||||
all_sdk_machines = self.parameters.all_sdk_machines,
|
all_sdk_machines = self.parameters.all_sdk_machines,
|
||||||
max_threads = self.parameters.max_threads,
|
max_threads = self.parameters.max_threads,
|
||||||
enable_proxy = self.parameters.enable_proxy,
|
|
||||||
parent = self,
|
parent = self,
|
||||||
flags = gtk.DIALOG_MODAL
|
flags = gtk.DIALOG_MODAL
|
||||||
| gtk.DIALOG_DESTROY_WITH_PARENT
|
| gtk.DIALOG_DESTROY_WITH_PARENT
|
||||||
@@ -820,16 +1031,21 @@ class Builder(gtk.Window):
|
|||||||
button = dialog.add_button("Save", gtk.RESPONSE_YES)
|
button = dialog.add_button("Save", gtk.RESPONSE_YES)
|
||||||
HobButton.style_button(button)
|
HobButton.style_button(button)
|
||||||
response = dialog.run()
|
response = dialog.run()
|
||||||
|
settings_changed = False
|
||||||
if response == gtk.RESPONSE_YES:
|
if response == gtk.RESPONSE_YES:
|
||||||
self.parameters.enable_proxy = dialog.enable_proxy
|
|
||||||
self.configuration = dialog.configuration
|
self.configuration = dialog.configuration
|
||||||
# DO reparse recipes
|
self.save_defaults() # remember settings
|
||||||
if dialog.settings_changed:
|
settings_changed = dialog.settings_changed
|
||||||
if self.configuration.curr_mach == "":
|
|
||||||
self.switch_page(self.MACHINE_SELECTION)
|
|
||||||
else:
|
|
||||||
self.switch_page(self.RCPPKGINFO_POPULATING)
|
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
|
return response == gtk.RESPONSE_YES, settings_changed
|
||||||
|
|
||||||
|
def reparse_post_adv_settings(self):
|
||||||
|
if not self.configuration.curr_mach:
|
||||||
|
self.update_config_async()
|
||||||
|
else:
|
||||||
|
self.configuration.clear_selection()
|
||||||
|
# DO reparse recipes
|
||||||
|
self.populate_recipe_package_info_async()
|
||||||
|
|
||||||
def deploy_image(self, image_name):
|
def deploy_image(self, image_name):
|
||||||
if not image_name:
|
if not image_name:
|
||||||
@@ -887,12 +1103,13 @@ class Builder(gtk.Window):
|
|||||||
if response == gtk.RESPONSE_YES:
|
if response == gtk.RESPONSE_YES:
|
||||||
source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
|
source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
|
||||||
tmp_path = self.parameters.tmpdir
|
tmp_path = self.parameters.tmpdir
|
||||||
|
cmdline = bb.ui.crumbs.utils.which_terminal()
|
||||||
if os.path.exists(image_path) and os.path.exists(kernel_path) \
|
if os.path.exists(image_path) and os.path.exists(kernel_path) \
|
||||||
and os.path.exists(source_env_path) and os.path.exists(tmp_path):
|
and os.path.exists(source_env_path) and os.path.exists(tmp_path) \
|
||||||
cmdline = "/usr/bin/xterm -e "
|
and cmdline:
|
||||||
cmdline += "\" export OE_TMPDIR=" + tmp_path + "; "
|
cmdline += "\' bash -c \"export OE_TMPDIR=" + tmp_path + "; "
|
||||||
cmdline += "source " + source_env_path + " " + os.getcwd() + "; "
|
cmdline += "source " + source_env_path + " " + os.getcwd() + "; "
|
||||||
cmdline += "runqemu " + kernel_path + " " + image_path + "; bash\""
|
cmdline += "runqemu " + kernel_path + " " + image_path + "\"\'"
|
||||||
subprocess.Popen(shlex.split(cmdline))
|
subprocess.Popen(shlex.split(cmdline))
|
||||||
else:
|
else:
|
||||||
lbl = "<b>Path error</b>\nOne of your paths is wrong,"
|
lbl = "<b>Path error</b>\nOne of your paths is wrong,"
|
||||||
@@ -901,6 +1118,7 @@ class Builder(gtk.Window):
|
|||||||
lbl = lbl + "kernel path:" + kernel_path + "\n"
|
lbl = lbl + "kernel path:" + kernel_path + "\n"
|
||||||
lbl = lbl + "source environment path:" + source_env_path + "\n"
|
lbl = lbl + "source environment path:" + source_env_path + "\n"
|
||||||
lbl = lbl + "tmp path: " + tmp_path + "."
|
lbl = lbl + "tmp path: " + tmp_path + "."
|
||||||
|
lbl = lbl + "You may be missing either xterm or vte for terminal services."
|
||||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_ERROR)
|
||||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||||
HobButton.style_button(button)
|
HobButton.style_button(button)
|
||||||
@@ -921,7 +1139,7 @@ class Builder(gtk.Window):
|
|||||||
response = dialog.run()
|
response = dialog.run()
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
if response == gtk.RESPONSE_YES:
|
if response == gtk.RESPONSE_YES:
|
||||||
self.switch_page(self.PACKAGE_GENERATING)
|
self.generate_packages_async()
|
||||||
else:
|
else:
|
||||||
self.switch_page(self.PACKAGE_SELECTION)
|
self.switch_page(self.PACKAGE_SELECTION)
|
||||||
else:
|
else:
|
||||||
@@ -930,17 +1148,9 @@ class Builder(gtk.Window):
|
|||||||
def show_recipes(self):
|
def show_recipes(self):
|
||||||
self.switch_page(self.RECIPE_SELECTION)
|
self.switch_page(self.RECIPE_SELECTION)
|
||||||
|
|
||||||
def initiate_new_build(self):
|
|
||||||
self.configuration.curr_mach = ""
|
|
||||||
self.image_configuration_page.switch_machine_combo()
|
|
||||||
self.switch_page(self.MACHINE_SELECTION)
|
|
||||||
|
|
||||||
def show_configuration(self):
|
def show_configuration(self):
|
||||||
self.switch_page(self.BASEIMG_SELECTED)
|
self.switch_page(self.BASEIMG_SELECTED)
|
||||||
|
|
||||||
def stop_parse(self):
|
|
||||||
self.handler.cancel_parse()
|
|
||||||
|
|
||||||
def stop_build(self):
|
def stop_build(self):
|
||||||
if self.stopping:
|
if self.stopping:
|
||||||
lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
|
lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
|
||||||
@@ -974,6 +1184,6 @@ class Builder(gtk.Window):
|
|||||||
if response != gtk.RESPONSE_CANCEL:
|
if response != gtk.RESPONSE_CANCEL:
|
||||||
self.stopping = True
|
self.stopping = True
|
||||||
if response == gtk.RESPONSE_OK:
|
if response == gtk.RESPONSE_OK:
|
||||||
self.handler.cancel_build()
|
self.cancel_build_sync()
|
||||||
elif response == gtk.RESPONSE_YES:
|
elif response == gtk.RESPONSE_YES:
|
||||||
self.handler.cancel_build(True)
|
self.cancel_build_sync(True)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import shlex
|
|||||||
from bb.ui.crumbs.hobcolor import HobColors
|
from bb.ui.crumbs.hobcolor import HobColors
|
||||||
from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker
|
from bb.ui.crumbs.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker
|
||||||
from bb.ui.crumbs.progressbar import HobProgressBar
|
from bb.ui.crumbs.progressbar import HobProgressBar
|
||||||
|
import bb.ui.crumbs.utils
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The following are convenience classes for implementing GNOME HIG compliant
|
The following are convenience classes for implementing GNOME HIG compliant
|
||||||
@@ -182,7 +183,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
check_hbox.pack_start(check_button, expand=False, fill=False)
|
check_hbox.pack_start(check_button, expand=False, fill=False)
|
||||||
check_hbox.show_all()
|
check_hbox.show_all()
|
||||||
|
|
||||||
def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip=""):
|
def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip_combo="", tooltip_extra=""):
|
||||||
pkgfmt_hbox = gtk.HBox(False, 24)
|
pkgfmt_hbox = gtk.HBox(False, 24)
|
||||||
|
|
||||||
rootfs_vbox = gtk.VBox(False, 6)
|
rootfs_vbox = gtk.VBox(False, 6)
|
||||||
@@ -195,8 +196,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
if curr_package_format:
|
if curr_package_format:
|
||||||
rootfs_format = curr_package_format.split()[0]
|
rootfs_format = curr_package_format.split()[0]
|
||||||
|
|
||||||
tooltip = "Package format that is used to generate rootfs"
|
rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip_combo)
|
||||||
rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip)
|
|
||||||
rootfs_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
|
rootfs_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
|
||||||
|
|
||||||
extra_vbox = gtk.VBox(False, 6)
|
extra_vbox = gtk.VBox(False, 6)
|
||||||
@@ -214,8 +214,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
check_button.set_active(is_active)
|
check_button.set_active(is_active)
|
||||||
check_hbox.pack_start(check_button, expand=False, fill=False)
|
check_hbox.pack_start(check_button, expand=False, fill=False)
|
||||||
|
|
||||||
tooltip = "Extra package formats to build"
|
info = HobInfoButton(tooltip_extra, self)
|
||||||
info = HobInfoButton(tooltip, self)
|
|
||||||
check_hbox.pack_end(info, expand=False, fill=False)
|
check_hbox.pack_end(info, expand=False, fill=False)
|
||||||
|
|
||||||
rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
|
rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
|
||||||
@@ -310,7 +309,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
|
|
||||||
def __init__(self, title, configuration, all_image_types,
|
def __init__(self, title, configuration, all_image_types,
|
||||||
all_package_formats, all_distros, all_sdk_machines,
|
all_package_formats, all_distros, all_sdk_machines,
|
||||||
max_threads, enable_proxy, parent, flags, buttons=None):
|
max_threads, parent, flags, buttons=None):
|
||||||
super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons)
|
super(AdvancedSettingDialog, self).__init__(title, parent, flags, buttons)
|
||||||
|
|
||||||
# class members from other objects
|
# class members from other objects
|
||||||
@@ -321,7 +320,6 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
self.all_distros = all_distros
|
self.all_distros = all_distros
|
||||||
self.all_sdk_machines = all_sdk_machines
|
self.all_sdk_machines = all_sdk_machines
|
||||||
self.max_threads = max_threads
|
self.max_threads = max_threads
|
||||||
self.enable_proxy = enable_proxy
|
|
||||||
|
|
||||||
# class members for internal use
|
# class members for internal use
|
||||||
self.distro_combo = None
|
self.distro_combo = None
|
||||||
@@ -337,19 +335,40 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
self.setting_store = None
|
self.setting_store = None
|
||||||
self.image_types_checkbuttons = {}
|
self.image_types_checkbuttons = {}
|
||||||
|
|
||||||
self.variables = {}
|
self.md5 = self.config_md5()
|
||||||
self.variables["PACKAGE_FORMAT"] = self.configuration.curr_package_format
|
|
||||||
self.variables["INCOMPATIBLE_LICENSE"] = self.configuration.incompat_license
|
|
||||||
self.variables["IMAGE_FSTYPES"] = self.configuration.image_fstypes
|
|
||||||
for key in self.configuration.extra_setting.keys():
|
|
||||||
self.variables[key] = self.configuration.extra_setting[key]
|
|
||||||
self.md5 = hashlib.md5(str(sorted(self.variables.items()))).hexdigest()
|
|
||||||
self.settings_changed = False
|
self.settings_changed = False
|
||||||
|
|
||||||
# create visual elements on the dialog
|
# create visual elements on the dialog
|
||||||
self.create_visual_elements()
|
self.create_visual_elements()
|
||||||
self.connect("response", self.response_cb)
|
self.connect("response", self.response_cb)
|
||||||
|
|
||||||
|
def _get_sorted_value(self, var):
|
||||||
|
return " ".join(sorted(str(var).split())) + "\n"
|
||||||
|
|
||||||
|
def config_md5(self):
|
||||||
|
data = ""
|
||||||
|
data += ("PACKAGE_CLASSES: " + self.configuration.curr_package_format + '\n')
|
||||||
|
data += ("DISTRO: " + self._get_sorted_value(self.configuration.curr_distro))
|
||||||
|
data += ("IMAGE_ROOTFS_SIZE: " + self._get_sorted_value(self.configuration.image_rootfs_size))
|
||||||
|
data += ("IMAGE_EXTRA_SIZE: " + self._get_sorted_value(self.configuration.image_extra_size))
|
||||||
|
data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))
|
||||||
|
data += ("SDK_MACHINE: " + self._get_sorted_value(self.configuration.curr_sdk_machine))
|
||||||
|
data += ("TOOLCHAIN_BUILD: " + self._get_sorted_value(self.configuration.toolchain_build))
|
||||||
|
data += ("IMAGE_FSTYPES: " + self._get_sorted_value(self.configuration.image_fstypes))
|
||||||
|
data += ("ENABLE_PROXY: " + self._get_sorted_value(self.configuration.enable_proxy))
|
||||||
|
if self.configuration.enable_proxy:
|
||||||
|
data += ("ALL_PROXY: " + self._get_sorted_value(self.configuration.all_proxy))
|
||||||
|
data += ("HTTP_PROXY: " + self._get_sorted_value(self.configuration.http_proxy))
|
||||||
|
data += ("HTTPS_PROXY: " + self._get_sorted_value(self.configuration.https_proxy))
|
||||||
|
data += ("FTP_PROXY: " + self._get_sorted_value(self.configuration.ftp_proxy))
|
||||||
|
data += ("GIT_PROXY_HOST: " + self._get_sorted_value(self.configuration.git_proxy_host))
|
||||||
|
data += ("GIT_PROXY_PORT: " + self._get_sorted_value(self.configuration.git_proxy_port))
|
||||||
|
data += ("CVS_PROXY_HOST: " + self._get_sorted_value(self.configuration.cvs_proxy_host))
|
||||||
|
data += ("CVS_PROXY_PORT: " + self._get_sorted_value(self.configuration.cvs_proxy_port))
|
||||||
|
for key in self.configuration.extra_setting.keys():
|
||||||
|
data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
|
||||||
|
return hashlib.md5(data).hexdigest()
|
||||||
|
|
||||||
def create_visual_elements(self):
|
def create_visual_elements(self):
|
||||||
self.nb = gtk.Notebook()
|
self.nb = gtk.Notebook()
|
||||||
self.nb.set_show_tabs(True)
|
self.nb.set_show_tabs(True)
|
||||||
@@ -372,7 +391,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
table = gtk.Table(rows + 1, 10, True)
|
table = gtk.Table(rows + 1, 10, True)
|
||||||
advanced_vbox.pack_start(table, expand=False, fill=False)
|
advanced_vbox.pack_start(table, expand=False, fill=False)
|
||||||
|
|
||||||
tooltip = "Select image file system types that will be used."
|
tooltip = "Image file system types you want."
|
||||||
info = HobInfoButton(tooltip, self)
|
info = HobInfoButton(tooltip, self)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Select image types:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Select image types:</span>")
|
||||||
table.attach(label, 0, 9, 0, 1)
|
table.attach(label, 0, 9, 0, 1)
|
||||||
@@ -382,9 +401,12 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
j = 1
|
j = 1
|
||||||
for image_type in self.image_types:
|
for image_type in self.image_types:
|
||||||
self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
|
self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
|
||||||
self.image_types_checkbuttons[image_type].set_tooltip_text("Build an %s image" % image_type)
|
article = ""
|
||||||
|
if image_type.startswith(("a", "e", "i", "o", "u")):
|
||||||
|
article = "n"
|
||||||
|
self.image_types_checkbuttons[image_type].set_tooltip_text("Build a%s %s image" % (article, image_type))
|
||||||
table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1)
|
table.attach(self.image_types_checkbuttons[image_type], j, j + 4, i, i + 1)
|
||||||
if image_type in self.configuration.image_fstypes:
|
if image_type in self.configuration.image_fstypes.split():
|
||||||
self.image_types_checkbuttons[image_type].set_active(True)
|
self.image_types_checkbuttons[image_type].set_active(True)
|
||||||
i += 1
|
i += 1
|
||||||
if i > rows:
|
if i > rows:
|
||||||
@@ -399,26 +421,26 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Packaging Format:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Packaging format:</span>")
|
||||||
tooltip = "Select package formats that will be used. "
|
tooltip_combo = "Selects the package format used to generate rootfs."
|
||||||
tooltip += "The first format will be used for final image"
|
tooltip_extra = "Selects extra package formats to build"
|
||||||
pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip)
|
pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip_combo, tooltip_extra)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
|
sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
|
||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Image Rootfs Size: (MB)</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Image rootfs size: (MB)</span>")
|
||||||
tooltip = "Sets the size of your target image.\nThis is the basic size of your target image, unless your selected package size exceeds this value, or you set value to \"Image Extra Size\"."
|
tooltip = "Sets the basic size of your target image.\nThis is the basic size of your target image unless your selected package size exceeds this value or you select \'Image Extra Size\'."
|
||||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 1024, tooltip)
|
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(rootfs_size_widget, expand=False, fill=False)
|
sub_vbox.pack_start(rootfs_size_widget, expand=False, fill=False)
|
||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Image Extra Size: (MB)</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Image extra size: (MB)</span>")
|
||||||
tooltip = "Sets the extra free space of your target image.\nDefaultly, system will reserve 30% of your image size as your free space. If your image contains zypper, it will bring in 50MB more space. The maximum free space is 1024MB."
|
tooltip = "Sets the extra free space of your target image.\nBy default, the system reserves 30% of your image size as free space. If your image contains zypper, it brings in 50MB more space. The maximum free space is 64GB."
|
||||||
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 1024, tooltip)
|
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 65536, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(extra_size_widget, expand=False, fill=False)
|
sub_vbox.pack_start(extra_size_widget, expand=False, fill=False)
|
||||||
|
|
||||||
@@ -432,12 +454,12 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
|
|
||||||
sub_hbox = gtk.HBox(False, 6)
|
sub_hbox = gtk.HBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_hbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_hbox, expand=False, fill=False)
|
||||||
self.toolchain_checkbox = gtk.CheckButton("Build Toolchain")
|
self.toolchain_checkbox = gtk.CheckButton("Build toolchain")
|
||||||
self.toolchain_checkbox.set_tooltip_text("Check this box to build the related toolchain with your image")
|
self.toolchain_checkbox.set_tooltip_text("Check this box to build the related toolchain with your image")
|
||||||
self.toolchain_checkbox.set_active(self.configuration.toolchain_build)
|
self.toolchain_checkbox.set_active(self.configuration.toolchain_build)
|
||||||
sub_hbox.pack_start(self.toolchain_checkbox, expand=False, fill=False)
|
sub_hbox.pack_start(self.toolchain_checkbox, expand=False, fill=False)
|
||||||
|
|
||||||
tooltip = "This is the Host platform you would like to run the toolchain"
|
tooltip = "Selects the host platform for which you want to run the toolchain"
|
||||||
sdk_machine_widget, self.sdk_machine_combo = self.gen_combo_widget(self.configuration.curr_sdk_machine, self.all_sdk_machines, tooltip)
|
sdk_machine_widget, self.sdk_machine_combo = self.gen_combo_widget(self.configuration.curr_sdk_machine, self.all_sdk_machines, tooltip)
|
||||||
sub_hbox.pack_start(sdk_machine_widget, expand=False, fill=False)
|
sub_hbox.pack_start(sdk_machine_widget, expand=False, fill=False)
|
||||||
|
|
||||||
@@ -449,31 +471,35 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Select Distro:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Select distro:</span>")
|
||||||
tooltip = "This is the Yocto distribution you would like to use"
|
tooltip = "Selects the Yocto Project distribution you want"
|
||||||
distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)
|
distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(distro_widget, expand=False, fill=False)
|
sub_vbox.pack_start(distro_widget, expand=False, fill=False)
|
||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">BB_NUMBER_THREADS:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">BB number threads:</span>")
|
||||||
tooltip = "Sets the number of threads that bitbake tasks can run simultaneously"
|
tooltip = "Sets the number of threads that BitBake tasks can simultaneously run. See the <a href=\""
|
||||||
|
tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
|
||||||
|
tooltip += "poky-ref-manual.html#var-BB_NUMBER_THREADS\">Poky reference manual</a> for information"
|
||||||
bbthread_widget, self.bb_spinner = self.gen_spinner_widget(self.configuration.bbthread, 1, self.max_threads, tooltip)
|
bbthread_widget, self.bb_spinner = self.gen_spinner_widget(self.configuration.bbthread, 1, self.max_threads, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(bbthread_widget, expand=False, fill=False)
|
sub_vbox.pack_start(bbthread_widget, expand=False, fill=False)
|
||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">PARALLEL_MAKE:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Parallel make:</span>")
|
||||||
tooltip = "Sets the make parallism, as known as 'make -j'"
|
tooltip = "Sets the maximum number of threads the host can use during the build. See the <a href=\""
|
||||||
|
tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
|
||||||
|
tooltip += "poky-ref-manual.html#var-PARALLEL_MAKE\">Poky reference manual</a> for information"
|
||||||
pmake_widget, self.pmake_spinner = self.gen_spinner_widget(self.configuration.pmake, 1, self.max_threads, tooltip)
|
pmake_widget, self.pmake_spinner = self.gen_spinner_widget(self.configuration.pmake, 1, self.max_threads, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(pmake_widget, expand=False, fill=False)
|
sub_vbox.pack_start(pmake_widget, expand=False, fill=False)
|
||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Set Download Directory:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Select download directory:</span>")
|
||||||
tooltip = "Select a folder that caches the upstream project source code"
|
tooltip = "Select a folder that caches the upstream project source code"
|
||||||
dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)
|
dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
@@ -481,7 +507,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE Directory:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE directory:</span>")
|
||||||
tooltip = "Select a folder that caches your prebuilt results"
|
tooltip = "Select a folder that caches your prebuilt results"
|
||||||
sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self, tooltip)
|
sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
@@ -489,8 +515,8 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE Mirror:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE mirror:</span>")
|
||||||
tooltip = "Select the prebuilt mirror that will fasten your build speed"
|
tooltip = "Select the pre-built mirror that will speed your build"
|
||||||
sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.configuration.sstatemirror, self, tooltip)
|
sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.configuration.sstatemirror, self, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False)
|
sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False)
|
||||||
@@ -503,57 +529,57 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
|
|
||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||||
self.proxy_checkbox = gtk.CheckButton("Enable Proxy")
|
self.proxy_checkbox = gtk.CheckButton("Enable proxy")
|
||||||
self.proxy_checkbox.set_tooltip_text("Check this box to setup the proxy you specified")
|
self.proxy_checkbox.set_tooltip_text("Check this box to setup the proxy you specified")
|
||||||
self.proxy_checkbox.set_active(self.enable_proxy)
|
self.proxy_checkbox.set_active(self.configuration.enable_proxy)
|
||||||
self.proxy_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)
|
self.proxy_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)
|
||||||
sub_vbox.pack_start(self.proxy_checkbox, expand=False, fill=False)
|
sub_vbox.pack_start(self.proxy_checkbox, expand=False, fill=False)
|
||||||
|
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Set all proxy:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Set all proxy:</span>")
|
||||||
tooltip = "Set the all proxy that will be used if the proxy for a URL isn't specified."
|
tooltip = "Set the all proxy that will be used if the proxy for a URL isn't specified."
|
||||||
proxy_widget, self.all_proxy_text = self.gen_entry_widget(self.configuration.all_proxy, self, tooltip, False)
|
proxy_widget, self.all_proxy_text = self.gen_entry_widget(self.configuration.all_proxy, self, tooltip, False)
|
||||||
self.all_proxy_text.set_editable(self.enable_proxy)
|
self.all_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.all_proxy_text.set_sensitive(self.enable_proxy)
|
self.all_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
||||||
|
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Set http proxy:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Set http proxy:</span>")
|
||||||
tooltip = "Set the http proxy that will be used in do_fetch() source code"
|
tooltip = "Set the http proxy that will be used in do_fetch() source code"
|
||||||
proxy_widget, self.http_proxy_text = self.gen_entry_widget(self.configuration.http_proxy, self, tooltip, False)
|
proxy_widget, self.http_proxy_text = self.gen_entry_widget(self.configuration.http_proxy, self, tooltip, False)
|
||||||
self.http_proxy_text.set_editable(self.enable_proxy)
|
self.http_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.http_proxy_text.set_sensitive(self.enable_proxy)
|
self.http_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
||||||
|
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Set https proxy:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Set https proxy:</span>")
|
||||||
tooltip = "Set the https proxy that will be used in do_fetch() source code"
|
tooltip = "Set the https proxy that will be used in do_fetch() source code"
|
||||||
proxy_widget, self.https_proxy_text = self.gen_entry_widget(self.configuration.https_proxy, self, tooltip, False)
|
proxy_widget, self.https_proxy_text = self.gen_entry_widget(self.configuration.https_proxy, self, tooltip, False)
|
||||||
self.https_proxy_text.set_editable(self.enable_proxy)
|
self.https_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.https_proxy_text.set_sensitive(self.enable_proxy)
|
self.https_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
||||||
|
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Set ftp proxy:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Set ftp proxy:</span>")
|
||||||
tooltip = "Set the ftp proxy that will be used in do_fetch() source code"
|
tooltip = "Set the ftp proxy that will be used in do_fetch() source code"
|
||||||
proxy_widget, self.ftp_proxy_text = self.gen_entry_widget(self.configuration.ftp_proxy, self, tooltip, False)
|
proxy_widget, self.ftp_proxy_text = self.gen_entry_widget(self.configuration.ftp_proxy, self, tooltip, False)
|
||||||
self.ftp_proxy_text.set_editable(self.enable_proxy)
|
self.ftp_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.ftp_proxy_text.set_sensitive(self.enable_proxy)
|
self.ftp_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
||||||
|
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Set git proxy:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Set git proxy:</span>")
|
||||||
tooltip = "Set the git proxy that will be used in do_fetch() source code"
|
tooltip = "Set the git proxy that will be used in do_fetch() source code"
|
||||||
proxy_widget, self.git_proxy_text = self.gen_entry_widget(self.configuration.git_proxy_host + ':' + self.configuration.git_proxy_port, self, tooltip, False)
|
proxy_widget, self.git_proxy_text = self.gen_entry_widget(self.configuration.git_proxy_host + ':' + self.configuration.git_proxy_port, self, tooltip, False)
|
||||||
self.git_proxy_text.set_editable(self.enable_proxy)
|
self.git_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.git_proxy_text.set_sensitive(self.enable_proxy)
|
self.git_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
||||||
|
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Set cvs proxy:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Set cvs proxy:</span>")
|
||||||
tooltip = "Set the cvs proxy that will be used in do_fetch() source code"
|
tooltip = "Set the cvs proxy that will be used in do_fetch() source code"
|
||||||
proxy_widget, self.cvs_proxy_text = self.gen_entry_widget(self.configuration.cvs_proxy_host + ':' + self.configuration.cvs_proxy_port, self, tooltip, False)
|
proxy_widget, self.cvs_proxy_text = self.gen_entry_widget(self.configuration.cvs_proxy_host + ':' + self.configuration.cvs_proxy_port, self, tooltip, False)
|
||||||
self.cvs_proxy_text.set_editable(self.enable_proxy)
|
self.cvs_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.cvs_proxy_text.set_sensitive(self.enable_proxy)
|
self.cvs_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
sub_vbox.pack_start(proxy_widget, expand=False, fill=False)
|
||||||
|
|
||||||
@@ -566,7 +592,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
sub_vbox = gtk.VBox(False, 6)
|
sub_vbox = gtk.VBox(False, 6)
|
||||||
advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
|
advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
|
||||||
label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
|
label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
|
||||||
tooltip = "This is the key/value pair for your extra settings"
|
tooltip = "These are key/value pairs for your extra settings. Click \'Add\' and then directly edit the key and the value"
|
||||||
setting_widget, self.setting_store = self.gen_editable_settings(self.configuration.extra_setting, tooltip)
|
setting_widget, self.setting_store = self.gen_editable_settings(self.configuration.extra_setting, tooltip)
|
||||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||||
sub_vbox.pack_start(setting_widget, expand=True, fill=True)
|
sub_vbox.pack_start(setting_widget, expand=True, fill=True)
|
||||||
@@ -574,30 +600,27 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
return advanced_vbox
|
return advanced_vbox
|
||||||
|
|
||||||
def proxy_checkbox_toggled_cb(self, button):
|
def proxy_checkbox_toggled_cb(self, button):
|
||||||
self.enable_proxy = self.proxy_checkbox.get_active()
|
self.configuration.enable_proxy = self.proxy_checkbox.get_active()
|
||||||
self.all_proxy_text.set_editable(self.enable_proxy)
|
self.all_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.all_proxy_text.set_sensitive(self.enable_proxy)
|
self.all_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
self.http_proxy_text.set_editable(self.enable_proxy)
|
self.http_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.http_proxy_text.set_sensitive(self.enable_proxy)
|
self.http_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
self.https_proxy_text.set_editable(self.enable_proxy)
|
self.https_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.https_proxy_text.set_sensitive(self.enable_proxy)
|
self.https_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
self.ftp_proxy_text.set_editable(self.enable_proxy)
|
self.ftp_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.ftp_proxy_text.set_sensitive(self.enable_proxy)
|
self.ftp_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
self.git_proxy_text.set_editable(self.enable_proxy)
|
self.git_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.git_proxy_text.set_sensitive(self.enable_proxy)
|
self.git_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
self.cvs_proxy_text.set_editable(self.enable_proxy)
|
self.cvs_proxy_text.set_editable(self.configuration.enable_proxy)
|
||||||
self.cvs_proxy_text.set_sensitive(self.enable_proxy)
|
self.cvs_proxy_text.set_sensitive(self.configuration.enable_proxy)
|
||||||
|
|
||||||
def response_cb(self, dialog, response_id):
|
def response_cb(self, dialog, response_id):
|
||||||
self.variables = {}
|
|
||||||
|
|
||||||
package_format = []
|
package_format = []
|
||||||
package_format.append(self.rootfs_combo.get_active_text())
|
package_format.append(self.rootfs_combo.get_active_text())
|
||||||
for child in self.check_hbox:
|
for child in self.check_hbox:
|
||||||
if isinstance(child, gtk.CheckButton) and child.get_active():
|
if isinstance(child, gtk.CheckButton) and child.get_active():
|
||||||
package_format.append(child.get_label())
|
package_format.append(child.get_label())
|
||||||
self.configuration.curr_package_format = " ".join(package_format)
|
self.configuration.curr_package_format = " ".join(package_format)
|
||||||
self.variables["PACKAGE_FORMAT"] = self.configuration.curr_package_format
|
|
||||||
|
|
||||||
self.configuration.curr_distro = self.distro_combo.get_active_text()
|
self.configuration.curr_distro = self.distro_combo.get_active_text()
|
||||||
self.configuration.dldir = self.dldir_text.get_text()
|
self.configuration.dldir = self.dldir_text.get_text()
|
||||||
@@ -608,11 +631,11 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
|
self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
|
||||||
self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
|
self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
|
||||||
|
|
||||||
self.configuration.image_fstypes = []
|
self.configuration.image_fstypes = ""
|
||||||
for image_type in self.image_types:
|
for image_type in self.image_types:
|
||||||
if self.image_types_checkbuttons[image_type].get_active():
|
if self.image_types_checkbuttons[image_type].get_active():
|
||||||
self.configuration.image_fstypes.append(image_type)
|
self.configuration.image_fstypes += (" " + image_type)
|
||||||
self.variables["IMAGE_FSTYPES"] = self.configuration.image_fstypes
|
self.configuration.image_fstypes.strip()
|
||||||
|
|
||||||
if self.gplv3_checkbox.get_active():
|
if self.gplv3_checkbox.get_active():
|
||||||
if "GPLv3" not in self.configuration.incompat_license.split():
|
if "GPLv3" not in self.configuration.incompat_license.split():
|
||||||
@@ -622,7 +645,6 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
self.configuration.incompat_license = self.configuration.incompat_license.split().remove("GPLv3")
|
self.configuration.incompat_license = self.configuration.incompat_license.split().remove("GPLv3")
|
||||||
self.configuration.incompat_license = " ".join(self.configuration.incompat_license or [])
|
self.configuration.incompat_license = " ".join(self.configuration.incompat_license or [])
|
||||||
self.configuration.incompat_license = self.configuration.incompat_license.strip()
|
self.configuration.incompat_license = self.configuration.incompat_license.strip()
|
||||||
self.variables["INCOMPATIBLE_LICENSE"] = self.configuration.incompat_license
|
|
||||||
|
|
||||||
self.configuration.toolchain_build = self.toolchain_checkbox.get_active()
|
self.configuration.toolchain_build = self.toolchain_checkbox.get_active()
|
||||||
|
|
||||||
@@ -632,7 +654,6 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
key = self.setting_store.get_value(it, 0)
|
key = self.setting_store.get_value(it, 0)
|
||||||
value = self.setting_store.get_value(it, 1)
|
value = self.setting_store.get_value(it, 1)
|
||||||
self.configuration.extra_setting[key] = value
|
self.configuration.extra_setting[key] = value
|
||||||
self.variables[key] = value
|
|
||||||
it = self.setting_store.iter_next(it)
|
it = self.setting_store.iter_next(it)
|
||||||
|
|
||||||
self.configuration.all_proxy = self.all_proxy_text.get_text()
|
self.configuration.all_proxy = self.all_proxy_text.get_text()
|
||||||
@@ -642,7 +663,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
|||||||
self.configuration.git_proxy_host, self.configuration.git_proxy_port = self.git_proxy_text.get_text().split(':')
|
self.configuration.git_proxy_host, self.configuration.git_proxy_port = self.git_proxy_text.get_text().split(':')
|
||||||
self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port = self.cvs_proxy_text.get_text().split(':')
|
self.configuration.cvs_proxy_host, self.configuration.cvs_proxy_port = self.cvs_proxy_text.get_text().split(':')
|
||||||
|
|
||||||
md5 = hashlib.md5(str(sorted(self.variables.items()))).hexdigest()
|
md5 = self.config_md5()
|
||||||
self.settings_changed = (self.md5 != md5)
|
self.settings_changed = (self.md5 != md5)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -731,11 +752,12 @@ class DeployImageDialog (CrumbsDialog):
|
|||||||
if response_id == gtk.RESPONSE_YES:
|
if response_id == gtk.RESPONSE_YES:
|
||||||
combo_item = self.usb_combo.get_active_text()
|
combo_item = self.usb_combo.get_active_text()
|
||||||
if combo_item and combo_item != self.__dummy_usb__:
|
if combo_item and combo_item != self.__dummy_usb__:
|
||||||
cmdline = "/usr/bin/xterm -e "
|
cmdline = bb.ui.crumbs.utils.which_terminal()
|
||||||
cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\""
|
if cmdline:
|
||||||
subprocess.Popen(args=shlex.split(cmdline))
|
cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "\""
|
||||||
|
subprocess.Popen(args=shlex.split(cmdline))
|
||||||
|
|
||||||
def update_progress_bar(self, title, fraction, status=True):
|
def update_progress_bar(self, title, fraction, status=None):
|
||||||
self.progress_bar.update(fraction)
|
self.progress_bar.update(fraction)
|
||||||
self.progress_bar.set_title(title)
|
self.progress_bar.set_title(title)
|
||||||
self.progress_bar.set_rcstyle(status)
|
self.progress_bar.set_rcstyle(status)
|
||||||
@@ -952,7 +974,10 @@ class LayerSelectionDialog (CrumbsDialog):
|
|||||||
layers.append(model.get_value(it, 0))
|
layers.append(model.get_value(it, 0))
|
||||||
it = model.iter_next(it)
|
it = model.iter_next(it)
|
||||||
|
|
||||||
self.layers_changed = (self.layers != layers)
|
orig_layers = sorted(self.layers)
|
||||||
|
layers.sort()
|
||||||
|
|
||||||
|
self.layers_changed = (orig_layers != layers)
|
||||||
self.layers = layers
|
self.layers = layers
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -1091,7 +1116,7 @@ class ImageSelectionDialog (CrumbsDialog):
|
|||||||
for image_type in self.image_types:
|
for image_type in self.image_types:
|
||||||
for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[image_type]:
|
for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[image_type]:
|
||||||
if f.endswith('.' + real_image_type):
|
if f.endswith('.' + real_image_type):
|
||||||
imageset.add(f.rsplit('.' + real_image_type)[0])
|
imageset.add(f.rsplit('.' + real_image_type)[0].rsplit('.rootfs')[0])
|
||||||
self.image_list.append(f)
|
self.image_list.append(f)
|
||||||
|
|
||||||
for image in imageset:
|
for image in imageset:
|
||||||
|
|||||||
@@ -21,17 +21,15 @@
|
|||||||
class HobColors:
|
class HobColors:
|
||||||
WHITE = "#ffffff"
|
WHITE = "#ffffff"
|
||||||
PALE_GREEN = "#aaffaa"
|
PALE_GREEN = "#aaffaa"
|
||||||
ORANGE = "#ff7c24"
|
ORANGE = "#eb8e68"
|
||||||
PALE_RED = "#ffaaaa"
|
PALE_RED = "#ffaaaa"
|
||||||
GRAY = "#aaaaaa"
|
GRAY = "#aaaaaa"
|
||||||
LIGHT_GRAY = "#dddddd"
|
LIGHT_GRAY = "#dddddd"
|
||||||
DEEP_GRAY = "#7c7c77"
|
|
||||||
SLIGHT_DARK = "#5f5f5f"
|
SLIGHT_DARK = "#5f5f5f"
|
||||||
DARK = "#3c3b37"
|
DARK = "#3c3b37"
|
||||||
BLACK = "#000000"
|
BLACK = "#000000"
|
||||||
LIGHT_ORANGE = "#f7a787"
|
|
||||||
YELLOW = "#ffff00"
|
|
||||||
PALE_BLUE = "#53b8ff"
|
PALE_BLUE = "#53b8ff"
|
||||||
|
DEEP_RED = "#aa3e3e"
|
||||||
|
|
||||||
OK = WHITE
|
OK = WHITE
|
||||||
RUNNING = PALE_GREEN
|
RUNNING = PALE_GREEN
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ class HobHandler(gobject.GObject):
|
|||||||
This object does BitBake event handling for the hob gui.
|
This object does BitBake event handling for the hob gui.
|
||||||
"""
|
"""
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
"layers-updated" : (gobject.SIGNAL_RUN_LAST,
|
|
||||||
gobject.TYPE_NONE,
|
|
||||||
(gobject.TYPE_PYOBJECT,)),
|
|
||||||
"package-formats-updated" : (gobject.SIGNAL_RUN_LAST,
|
"package-formats-updated" : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
(gobject.TYPE_PYOBJECT,)),
|
(gobject.TYPE_PYOBJECT,)),
|
||||||
@@ -45,6 +42,9 @@ class HobHandler(gobject.GObject):
|
|||||||
"command-failed" : (gobject.SIGNAL_RUN_LAST,
|
"command-failed" : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
(gobject.TYPE_STRING,)),
|
(gobject.TYPE_STRING,)),
|
||||||
|
"sanity-failed" : (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_NONE,
|
||||||
|
(gobject.TYPE_STRING,)),
|
||||||
"generating-data" : (gobject.SIGNAL_RUN_LAST,
|
"generating-data" : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
()),
|
()),
|
||||||
@@ -60,10 +60,16 @@ class HobHandler(gobject.GObject):
|
|||||||
"parsing-completed" : (gobject.SIGNAL_RUN_LAST,
|
"parsing-completed" : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
(gobject.TYPE_PYOBJECT,)),
|
(gobject.TYPE_PYOBJECT,)),
|
||||||
|
"recipe-populated" : (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_NONE,
|
||||||
|
()),
|
||||||
|
"package-populated" : (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_NONE,
|
||||||
|
()),
|
||||||
}
|
}
|
||||||
|
|
||||||
(PARSE_CONFIG, GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(6)
|
(GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO, SANITY_CHECK) = range(6)
|
||||||
(SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(10)
|
(SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_SANITY_CHECK, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(11)
|
||||||
|
|
||||||
def __init__(self, server, recipe_model, package_model):
|
def __init__(self, server, recipe_model, package_model):
|
||||||
super(HobHandler, self).__init__()
|
super(HobHandler, self).__init__()
|
||||||
@@ -94,6 +100,15 @@ class HobHandler(gobject.GObject):
|
|||||||
self.emit("data-generated")
|
self.emit("data-generated")
|
||||||
self.generating = False
|
self.generating = False
|
||||||
|
|
||||||
|
def runCommand(self, commandline):
|
||||||
|
try:
|
||||||
|
return self.server.runCommand(commandline)
|
||||||
|
except Exception as e:
|
||||||
|
self.commands_async = []
|
||||||
|
self.clear_busy()
|
||||||
|
self.emit("command-failed", "Hob Exception - %s" % (str(e)))
|
||||||
|
return None
|
||||||
|
|
||||||
def run_next_command(self, initcmd=None):
|
def run_next_command(self, initcmd=None):
|
||||||
if initcmd != None:
|
if initcmd != None:
|
||||||
self.initcmd = initcmd
|
self.initcmd = initcmd
|
||||||
@@ -108,37 +123,39 @@ class HobHandler(gobject.GObject):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if next_command == self.SUB_PATH_LAYERS:
|
if next_command == self.SUB_PATH_LAYERS:
|
||||||
self.server.runCommand(["findConfigFilePath", "bblayers.conf"])
|
self.runCommand(["findConfigFilePath", "bblayers.conf"])
|
||||||
elif next_command == self.SUB_FILES_DISTRO:
|
elif next_command == self.SUB_FILES_DISTRO:
|
||||||
self.server.runCommand(["findConfigFiles", "DISTRO"])
|
self.runCommand(["findConfigFiles", "DISTRO"])
|
||||||
elif next_command == self.SUB_FILES_MACH:
|
elif next_command == self.SUB_FILES_MACH:
|
||||||
self.server.runCommand(["findConfigFiles", "MACHINE"])
|
self.runCommand(["findConfigFiles", "MACHINE"])
|
||||||
elif next_command == self.SUB_FILES_SDKMACH:
|
elif next_command == self.SUB_FILES_SDKMACH:
|
||||||
self.server.runCommand(["findConfigFiles", "MACHINE-SDK"])
|
self.runCommand(["findConfigFiles", "MACHINE-SDK"])
|
||||||
elif next_command == self.SUB_MATCH_CLASS:
|
elif next_command == self.SUB_MATCH_CLASS:
|
||||||
self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
|
self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
|
||||||
elif next_command == self.SUB_PARSE_CONFIG:
|
elif next_command == self.SUB_PARSE_CONFIG:
|
||||||
self.server.runCommand(["parseConfigurationFiles", "", ""])
|
self.runCommand(["parseConfigurationFiles", "", ""])
|
||||||
elif next_command == self.SUB_GNERATE_TGTS:
|
elif next_command == self.SUB_GNERATE_TGTS:
|
||||||
self.server.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
|
self.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
|
||||||
elif next_command == self.SUB_GENERATE_PKGINFO:
|
elif next_command == self.SUB_GENERATE_PKGINFO:
|
||||||
self.server.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
|
self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
|
||||||
|
elif next_command == self.SUB_SANITY_CHECK:
|
||||||
|
self.runCommand(["triggerEvent", "bb.event.SanityCheck()"])
|
||||||
elif next_command == self.SUB_BUILD_RECIPES:
|
elif next_command == self.SUB_BUILD_RECIPES:
|
||||||
self.clear_busy()
|
self.clear_busy()
|
||||||
self.building = True
|
self.building = True
|
||||||
self.server.runCommand(["buildTargets", self.recipe_queue, "build"])
|
self.runCommand(["buildTargets", self.recipe_queue, self.default_task])
|
||||||
self.recipe_queue = []
|
self.recipe_queue = []
|
||||||
elif next_command == self.SUB_BUILD_IMAGE:
|
elif next_command == self.SUB_BUILD_IMAGE:
|
||||||
self.clear_busy()
|
self.clear_busy()
|
||||||
self.building = True
|
self.building = True
|
||||||
targets = ["hob-image"]
|
targets = [self.image]
|
||||||
self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
|
if self.package_queue:
|
||||||
self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
|
self.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
|
||||||
if self.toolchain_build:
|
self.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
|
||||||
pkgs = self.package_queue + [i+'-dev' for i in self.package_queue] + [i+'-dbg' for i in self.package_queue]
|
if self.toolchain_packages:
|
||||||
self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(pkgs)])
|
self.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)])
|
||||||
targets.append("hob-toolchain")
|
targets.append(self.toolchain)
|
||||||
self.server.runCommand(["buildTargets", targets, "build"])
|
self.runCommand(["buildTargets", targets, self.default_task])
|
||||||
|
|
||||||
def handle_event(self, event):
|
def handle_event(self, event):
|
||||||
if not event:
|
if not event:
|
||||||
@@ -150,20 +167,26 @@ class HobHandler(gobject.GObject):
|
|||||||
|
|
||||||
if isinstance(event, bb.event.PackageInfo):
|
if isinstance(event, bb.event.PackageInfo):
|
||||||
self.package_model.populate(event._pkginfolist)
|
self.package_model.populate(event._pkginfolist)
|
||||||
|
self.emit("package-populated")
|
||||||
self.run_next_command()
|
self.run_next_command()
|
||||||
|
|
||||||
elif(isinstance(event, logging.LogRecord)):
|
elif isinstance(event, bb.event.SanityCheckPassed):
|
||||||
|
self.run_next_command()
|
||||||
|
|
||||||
|
elif isinstance(event, bb.event.SanityCheckFailed):
|
||||||
|
self.emit("sanity-failed", event._msg)
|
||||||
|
|
||||||
|
elif isinstance(event, logging.LogRecord):
|
||||||
if event.levelno >= logging.ERROR:
|
if event.levelno >= logging.ERROR:
|
||||||
self.error_msg += event.msg + '\n'
|
formatter = bb.msg.BBLogFormatter()
|
||||||
|
formatter.format(event)
|
||||||
|
self.error_msg += event.message + '\n'
|
||||||
|
|
||||||
elif isinstance(event, bb.event.TargetsTreeGenerated):
|
elif isinstance(event, bb.event.TargetsTreeGenerated):
|
||||||
self.current_phase = "data generation"
|
self.current_phase = "data generation"
|
||||||
if event._model:
|
if event._model:
|
||||||
self.recipe_model.populate(event._model)
|
self.recipe_model.populate(event._model)
|
||||||
elif isinstance(event, bb.event.CoreBaseFilesFound):
|
self.emit("recipe-populated")
|
||||||
self.current_phase = "configuration lookup"
|
|
||||||
paths = event._paths
|
|
||||||
self.emit('layers-updated', paths)
|
|
||||||
elif isinstance(event, bb.event.ConfigFilesFound):
|
elif isinstance(event, bb.event.ConfigFilesFound):
|
||||||
self.current_phase = "configuration lookup"
|
self.current_phase = "configuration lookup"
|
||||||
var = event._variable
|
var = event._variable
|
||||||
@@ -187,31 +210,13 @@ class HobHandler(gobject.GObject):
|
|||||||
elif isinstance(event, bb.command.CommandCompleted):
|
elif isinstance(event, bb.command.CommandCompleted):
|
||||||
self.current_phase = None
|
self.current_phase = None
|
||||||
self.run_next_command()
|
self.run_next_command()
|
||||||
# TODO: Currently there are NoProvider issues when generate
|
|
||||||
# universe tree dependency for non-x86 architecture.
|
|
||||||
# Comment the follow code to enable the build of non-x86
|
|
||||||
# architectures in Hob.
|
|
||||||
#elif isinstance(event, bb.event.NoProvider):
|
|
||||||
# if event._runtime:
|
|
||||||
# r = "R"
|
|
||||||
# else:
|
|
||||||
# r = ""
|
|
||||||
# if event._dependees:
|
|
||||||
# self.error_msg += " Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)" % (r, event._item, ", ".join(event._dependees), r)
|
|
||||||
# else:
|
|
||||||
# self.error_msg += " Nothing %sPROVIDES '%s'" % (r, event._item)
|
|
||||||
# if event._reasons:
|
|
||||||
# for reason in event._reasons:
|
|
||||||
# self.error_msg += " %s" % reason
|
|
||||||
|
|
||||||
# self.commands_async = []
|
|
||||||
# self.emit("command-failed", self.error_msg)
|
|
||||||
# self.error_msg = ""
|
|
||||||
|
|
||||||
elif isinstance(event, bb.command.CommandFailed):
|
elif isinstance(event, bb.command.CommandFailed):
|
||||||
self.commands_async = []
|
self.commands_async = []
|
||||||
|
self.clear_busy()
|
||||||
self.emit("command-failed", self.error_msg)
|
self.emit("command-failed", self.error_msg)
|
||||||
self.error_msg = ""
|
self.error_msg = ""
|
||||||
|
if self.building:
|
||||||
|
self.building = False
|
||||||
elif isinstance(event, (bb.event.ParseStarted,
|
elif isinstance(event, (bb.event.ParseStarted,
|
||||||
bb.event.CacheLoadStarted,
|
bb.event.CacheLoadStarted,
|
||||||
bb.event.TreeDataPreparationStarted,
|
bb.event.TreeDataPreparationStarted,
|
||||||
@@ -244,100 +249,98 @@ class HobHandler(gobject.GObject):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def init_cooker(self):
|
def init_cooker(self):
|
||||||
self.server.runCommand(["initCooker"])
|
self.runCommand(["initCooker"])
|
||||||
|
|
||||||
def parse_config(self):
|
|
||||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
|
||||||
self.run_next_command(self.PARSE_CONFIG)
|
|
||||||
|
|
||||||
def refresh_layers(self, bblayers):
|
|
||||||
self.init_cooker()
|
|
||||||
self.set_bblayers(bblayers)
|
|
||||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
|
||||||
self.generate_configuration()
|
|
||||||
|
|
||||||
def set_extra_inherit(self, bbclass):
|
def set_extra_inherit(self, bbclass):
|
||||||
inherits = self.server.runCommand(["getVariable", "INHERIT"]) or ""
|
inherits = self.runCommand(["getVariable", "INHERIT"]) or ""
|
||||||
inherits = inherits + " " + bbclass
|
inherits = inherits + " " + bbclass
|
||||||
self.server.runCommand(["setVariable", "INHERIT", inherits])
|
self.runCommand(["setVariable", "INHERIT", inherits])
|
||||||
|
|
||||||
def set_bblayers(self, bblayers):
|
def set_bblayers(self, bblayers):
|
||||||
self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
|
self.runCommand(["setVariable", "BBLAYERS_HOB", " ".join(bblayers)])
|
||||||
|
|
||||||
def set_machine(self, machine):
|
def set_machine(self, machine):
|
||||||
self.server.runCommand(["setVariable", "MACHINE", machine])
|
if machine:
|
||||||
|
self.runCommand(["setVariable", "MACHINE_HOB", machine])
|
||||||
|
|
||||||
def set_sdk_machine(self, sdk_machine):
|
def set_sdk_machine(self, sdk_machine):
|
||||||
self.server.runCommand(["setVariable", "SDKMACHINE", sdk_machine])
|
self.runCommand(["setVariable", "SDKMACHINE_HOB", sdk_machine])
|
||||||
|
|
||||||
def set_image_fstypes(self, image_fstypes):
|
def set_image_fstypes(self, image_fstypes):
|
||||||
self.server.runCommand(["setVariable", "IMAGE_FSTYPES", " ".join(image_fstypes).lstrip(" ")])
|
self.runCommand(["setVariable", "IMAGE_FSTYPES", image_fstypes])
|
||||||
|
|
||||||
def set_distro(self, distro):
|
def set_distro(self, distro):
|
||||||
if distro != "defaultsetup":
|
self.runCommand(["setVariable", "DISTRO_HOB", distro])
|
||||||
self.server.runCommand(["setVariable", "DISTRO", distro])
|
|
||||||
|
|
||||||
def set_package_format(self, format):
|
def set_package_format(self, format):
|
||||||
package_classes = ""
|
package_classes = ""
|
||||||
for pkgfmt in format.split():
|
for pkgfmt in format.split():
|
||||||
package_classes += ("package_%s" % pkgfmt + " ")
|
package_classes += ("package_%s" % pkgfmt + " ")
|
||||||
self.server.runCommand(["setVariable", "PACKAGE_CLASSES", package_classes])
|
self.runCommand(["setVariable", "PACKAGE_CLASSES_HOB", package_classes])
|
||||||
|
|
||||||
def set_bbthreads(self, threads):
|
def set_bbthreads(self, threads):
|
||||||
self.server.runCommand(["setVariable", "BB_NUMBER_THREADS", threads])
|
self.runCommand(["setVariable", "BB_NUMBER_THREADS_HOB", threads])
|
||||||
|
|
||||||
def set_pmake(self, threads):
|
def set_pmake(self, threads):
|
||||||
pmake = "-j %s" % threads
|
pmake = "-j %s" % threads
|
||||||
self.server.runCommand(["setVariable", "PARALLEL_MAKE", pmake])
|
self.runCommand(["setVariable", "PARALLEL_MAKE_HOB", pmake])
|
||||||
|
|
||||||
def set_dl_dir(self, directory):
|
def set_dl_dir(self, directory):
|
||||||
self.server.runCommand(["setVariable", "DL_DIR", directory])
|
self.runCommand(["setVariable", "DL_DIR_HOB", directory])
|
||||||
|
|
||||||
def set_sstate_dir(self, directory):
|
def set_sstate_dir(self, directory):
|
||||||
self.server.runCommand(["setVariable", "SSTATE_DIR", directory])
|
self.runCommand(["setVariable", "SSTATE_DIR_HOB", directory])
|
||||||
|
|
||||||
def set_sstate_mirror(self, url):
|
def set_sstate_mirror(self, url):
|
||||||
self.server.runCommand(["setVariable", "SSTATE_MIRROR", url])
|
self.runCommand(["setVariable", "SSTATE_MIRROR_HOB", url])
|
||||||
|
|
||||||
def set_extra_size(self, image_extra_size):
|
def set_extra_size(self, image_extra_size):
|
||||||
self.server.runCommand(["setVariable", "IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size)])
|
self.runCommand(["setVariable", "IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size)])
|
||||||
|
|
||||||
def set_rootfs_size(self, image_rootfs_size):
|
def set_rootfs_size(self, image_rootfs_size):
|
||||||
self.server.runCommand(["setVariable", "IMAGE_ROOTFS_SIZE", str(image_rootfs_size)])
|
self.runCommand(["setVariable", "IMAGE_ROOTFS_SIZE", str(image_rootfs_size)])
|
||||||
|
|
||||||
def set_incompatible_license(self, incompat_license):
|
def set_incompatible_license(self, incompat_license):
|
||||||
self.server.runCommand(["setVariable", "INCOMPATIBLE_LICENSE", incompat_license])
|
self.runCommand(["setVariable", "INCOMPATIBLE_LICENSE_HOB", incompat_license])
|
||||||
|
|
||||||
def set_extra_config(self, extra_setting):
|
def set_extra_config(self, extra_setting):
|
||||||
for key in extra_setting.keys():
|
for key in extra_setting.keys():
|
||||||
value = extra_setting[key]
|
value = extra_setting[key]
|
||||||
self.server.runCommand(["setVariable", key, value])
|
self.runCommand(["setVariable", key, value])
|
||||||
|
|
||||||
|
def set_config_filter(self, config_filter):
|
||||||
|
self.runCommand(["setConfFilter", config_filter])
|
||||||
|
|
||||||
def set_http_proxy(self, http_proxy):
|
def set_http_proxy(self, http_proxy):
|
||||||
self.server.runCommand(["setVariable", "http_proxy", http_proxy])
|
self.runCommand(["setVariable", "http_proxy", http_proxy])
|
||||||
|
|
||||||
def set_https_proxy(self, https_proxy):
|
def set_https_proxy(self, https_proxy):
|
||||||
self.server.runCommand(["setVariable", "https_proxy", https_proxy])
|
self.runCommand(["setVariable", "https_proxy", https_proxy])
|
||||||
|
|
||||||
def set_ftp_proxy(self, ftp_proxy):
|
def set_ftp_proxy(self, ftp_proxy):
|
||||||
self.server.runCommand(["setVariable", "ftp_proxy", ftp_proxy])
|
self.runCommand(["setVariable", "ftp_proxy", ftp_proxy])
|
||||||
|
|
||||||
def set_all_proxy(self, all_proxy):
|
def set_all_proxy(self, all_proxy):
|
||||||
self.server.runCommand(["setVariable", "all_proxy", all_proxy])
|
self.runCommand(["setVariable", "all_proxy", all_proxy])
|
||||||
|
|
||||||
def set_git_proxy(self, host, port):
|
def set_git_proxy(self, host, port):
|
||||||
self.server.runCommand(["setVariable", "GIT_PROXY_HOST", host])
|
self.runCommand(["setVariable", "GIT_PROXY_HOST", host])
|
||||||
self.server.runCommand(["setVariable", "GIT_PROXY_PORT", port])
|
self.runCommand(["setVariable", "GIT_PROXY_PORT", port])
|
||||||
|
|
||||||
def set_cvs_proxy(self, host, port):
|
def set_cvs_proxy(self, host, port):
|
||||||
self.server.runCommand(["setVariable", "CVS_PROXY_HOST", host])
|
self.runCommand(["setVariable", "CVS_PROXY_HOST", host])
|
||||||
self.server.runCommand(["setVariable", "CVS_PROXY_PORT", port])
|
self.runCommand(["setVariable", "CVS_PROXY_PORT", port])
|
||||||
|
|
||||||
def request_package_info_async(self):
|
def request_package_info(self):
|
||||||
self.commands_async.append(self.SUB_GENERATE_PKGINFO)
|
self.commands_async.append(self.SUB_GENERATE_PKGINFO)
|
||||||
self.run_next_command(self.POPULATE_PACKAGEINFO)
|
self.run_next_command(self.POPULATE_PACKAGEINFO)
|
||||||
|
|
||||||
|
def trigger_sanity_check(self):
|
||||||
|
self.commands_async.append(self.SUB_SANITY_CHECK)
|
||||||
|
self.run_next_command(self.SANITY_CHECK)
|
||||||
|
|
||||||
def generate_configuration(self):
|
def generate_configuration(self):
|
||||||
|
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||||
self.commands_async.append(self.SUB_PATH_LAYERS)
|
self.commands_async.append(self.SUB_PATH_LAYERS)
|
||||||
self.commands_async.append(self.SUB_FILES_DISTRO)
|
self.commands_async.append(self.SUB_FILES_DISTRO)
|
||||||
self.commands_async.append(self.SUB_FILES_MACH)
|
self.commands_async.append(self.SUB_FILES_MACH)
|
||||||
@@ -350,132 +353,168 @@ class HobHandler(gobject.GObject):
|
|||||||
self.commands_async.append(self.SUB_GNERATE_TGTS)
|
self.commands_async.append(self.SUB_GNERATE_TGTS)
|
||||||
self.run_next_command(self.GENERATE_RECIPES)
|
self.run_next_command(self.GENERATE_RECIPES)
|
||||||
|
|
||||||
def generate_packages(self, tgts):
|
def generate_packages(self, tgts, default_task="build"):
|
||||||
targets = []
|
targets = []
|
||||||
targets.extend(tgts)
|
targets.extend(tgts)
|
||||||
self.recipe_queue = targets
|
self.recipe_queue = targets
|
||||||
|
self.default_task = default_task
|
||||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||||
self.commands_async.append(self.SUB_BUILD_RECIPES)
|
self.commands_async.append(self.SUB_BUILD_RECIPES)
|
||||||
self.run_next_command(self.GENERATE_PACKAGES)
|
self.run_next_command(self.GENERATE_PACKAGES)
|
||||||
|
|
||||||
def generate_image(self, tgts, toolchain_build=False):
|
def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[], default_task="build"):
|
||||||
self.package_queue = tgts
|
self.image = image
|
||||||
self.toolchain_build = toolchain_build
|
self.toolchain = toolchain
|
||||||
|
self.package_queue = image_packages
|
||||||
|
self.toolchain_packages = toolchain_packages
|
||||||
|
self.default_task = default_task
|
||||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||||
self.commands_async.append(self.SUB_BUILD_IMAGE)
|
self.commands_async.append(self.SUB_BUILD_IMAGE)
|
||||||
self.run_next_command(self.GENERATE_IMAGE)
|
self.run_next_command(self.GENERATE_IMAGE)
|
||||||
|
|
||||||
|
def build_succeeded_async(self):
|
||||||
|
self.building = False
|
||||||
|
|
||||||
def build_failed_async(self):
|
def build_failed_async(self):
|
||||||
self.initcmd = None
|
self.initcmd = None
|
||||||
self.commands_async = []
|
self.commands_async = []
|
||||||
self.building = False
|
self.building = False
|
||||||
|
|
||||||
def cancel_parse(self):
|
def cancel_parse(self):
|
||||||
self.server.runCommand(["stateStop"])
|
self.runCommand(["stateStop"])
|
||||||
|
|
||||||
def cancel_build(self, force=False):
|
def cancel_build(self, force=False):
|
||||||
if force:
|
if force:
|
||||||
# Force the cooker to stop as quickly as possible
|
# Force the cooker to stop as quickly as possible
|
||||||
self.server.runCommand(["stateStop"])
|
self.runCommand(["stateStop"])
|
||||||
else:
|
else:
|
||||||
# Wait for tasks to complete before shutting down, this helps
|
# Wait for tasks to complete before shutting down, this helps
|
||||||
# leave the workdir in a usable state
|
# leave the workdir in a usable state
|
||||||
self.server.runCommand(["stateShutdown"])
|
self.runCommand(["stateShutdown"])
|
||||||
|
|
||||||
def reset_build(self):
|
def reset_build(self):
|
||||||
self.build.reset()
|
self.build.reset()
|
||||||
|
|
||||||
|
def _remove_redundant(self, string):
|
||||||
|
ret = []
|
||||||
|
for i in string.split():
|
||||||
|
if i not in ret:
|
||||||
|
ret.append(i)
|
||||||
|
return " ".join(ret)
|
||||||
|
|
||||||
def get_parameters(self):
|
def get_parameters(self):
|
||||||
# retrieve the parameters from bitbake
|
# retrieve the parameters from bitbake
|
||||||
params = {}
|
params = {}
|
||||||
params["core_base"] = self.server.runCommand(["getVariable", "COREBASE"]) or ""
|
params["core_base"] = self.runCommand(["getVariable", "COREBASE"]) or ""
|
||||||
hob_layer = params["core_base"] + "/meta-hob"
|
hob_layer = params["core_base"] + "/meta-hob"
|
||||||
params["layer"] = (self.server.runCommand(["getVariable", "BBLAYERS"]) or "") + " " + hob_layer
|
params["layer"] = self.runCommand(["getVariable", "BBLAYERS"]) or ""
|
||||||
params["dldir"] = self.server.runCommand(["getVariable", "DL_DIR"]) or ""
|
if hob_layer not in params["layer"].split():
|
||||||
params["machine"] = self.server.runCommand(["getVariable", "MACHINE"]) or ""
|
params["layer"] += (" " + hob_layer)
|
||||||
params["distro"] = self.server.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
|
params["dldir"] = self.runCommand(["getVariable", "DL_DIR"]) or ""
|
||||||
params["pclass"] = self.server.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
|
params["machine"] = self.runCommand(["getVariable", "MACHINE"]) or ""
|
||||||
params["sstatedir"] = self.server.runCommand(["getVariable", "SSTATE_DIR"]) or ""
|
params["distro"] = self.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
|
||||||
params["sstatemirror"] = self.server.runCommand(["getVariable", "SSTATE_MIRROR"]) or ""
|
params["pclass"] = self.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
|
||||||
|
params["sstatedir"] = self.runCommand(["getVariable", "SSTATE_DIR"]) or ""
|
||||||
|
params["sstatemirror"] = self.runCommand(["getVariable", "SSTATE_MIRROR"]) or ""
|
||||||
|
|
||||||
num_threads = self.server.runCommand(["getCpuCount"])
|
num_threads = self.runCommand(["getCpuCount"])
|
||||||
if not num_threads:
|
if not num_threads:
|
||||||
num_threads = 1
|
num_threads = 1
|
||||||
max_threads = 65536
|
max_threads = 65536
|
||||||
else:
|
else:
|
||||||
num_threads = int(num_threads)
|
try:
|
||||||
max_threads = 16 * num_threads
|
num_threads = int(num_threads)
|
||||||
|
max_threads = 16 * num_threads
|
||||||
|
except:
|
||||||
|
num_threads = 1
|
||||||
|
max_threads = 65536
|
||||||
params["max_threads"] = max_threads
|
params["max_threads"] = max_threads
|
||||||
|
|
||||||
bbthread = self.server.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
bbthread = self.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
||||||
if not bbthread:
|
if not bbthread:
|
||||||
bbthread = num_threads
|
bbthread = num_threads
|
||||||
else:
|
else:
|
||||||
bbthread = int(bbthread)
|
try:
|
||||||
|
bbthread = int(bbthread)
|
||||||
|
except:
|
||||||
|
bbthread = num_threads
|
||||||
params["bbthread"] = bbthread
|
params["bbthread"] = bbthread
|
||||||
|
|
||||||
pmake = self.server.runCommand(["getVariable", "PARALLEL_MAKE"])
|
pmake = self.runCommand(["getVariable", "PARALLEL_MAKE"])
|
||||||
if not pmake:
|
if not pmake:
|
||||||
pmake = num_threads
|
pmake = num_threads
|
||||||
elif isinstance(pmake, int):
|
elif isinstance(pmake, int):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
pmake = int(pmake.lstrip("-j "))
|
try:
|
||||||
params["pmake"] = pmake
|
pmake = int(pmake.lstrip("-j "))
|
||||||
|
except:
|
||||||
|
pmake = num_threads
|
||||||
|
params["pmake"] = "-j %s" % pmake
|
||||||
|
|
||||||
params["image_addr"] = self.server.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""
|
params["image_addr"] = self.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""
|
||||||
|
|
||||||
image_extra_size = self.server.runCommand(["getVariable", "IMAGE_ROOTFS_EXTRA_SPACE"])
|
image_extra_size = self.runCommand(["getVariable", "IMAGE_ROOTFS_EXTRA_SPACE"])
|
||||||
if not image_extra_size:
|
if not image_extra_size:
|
||||||
image_extra_size = 0
|
image_extra_size = 0
|
||||||
else:
|
else:
|
||||||
image_extra_size = int(image_extra_size)
|
try:
|
||||||
|
image_extra_size = int(image_extra_size)
|
||||||
|
except:
|
||||||
|
image_extra_size = 0
|
||||||
params["image_extra_size"] = image_extra_size
|
params["image_extra_size"] = image_extra_size
|
||||||
|
|
||||||
image_rootfs_size = self.server.runCommand(["getVariable", "IMAGE_ROOTFS_SIZE"])
|
image_rootfs_size = self.runCommand(["getVariable", "IMAGE_ROOTFS_SIZE"])
|
||||||
if not image_rootfs_size:
|
if not image_rootfs_size:
|
||||||
image_rootfs_size = 0
|
image_rootfs_size = 0
|
||||||
else:
|
else:
|
||||||
image_rootfs_size = int(image_rootfs_size)
|
try:
|
||||||
|
image_rootfs_size = int(image_rootfs_size)
|
||||||
|
except:
|
||||||
|
image_rootfs_size = 0
|
||||||
params["image_rootfs_size"] = image_rootfs_size
|
params["image_rootfs_size"] = image_rootfs_size
|
||||||
|
|
||||||
image_overhead_factor = self.server.runCommand(["getVariable", "IMAGE_OVERHEAD_FACTOR"])
|
image_overhead_factor = self.runCommand(["getVariable", "IMAGE_OVERHEAD_FACTOR"])
|
||||||
if not image_overhead_factor:
|
if not image_overhead_factor:
|
||||||
image_overhead_factor = 1
|
image_overhead_factor = 1
|
||||||
else:
|
else:
|
||||||
image_overhead_factor = float(image_overhead_factor)
|
try:
|
||||||
|
image_overhead_factor = float(image_overhead_factor)
|
||||||
|
except:
|
||||||
|
image_overhead_factor = 1
|
||||||
params['image_overhead_factor'] = image_overhead_factor
|
params['image_overhead_factor'] = image_overhead_factor
|
||||||
|
|
||||||
params["incompat_license"] = self.server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or ""
|
params["incompat_license"] = self._remove_redundant(self.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "")
|
||||||
params["sdk_machine"] = self.server.runCommand(["getVariable", "SDKMACHINE"]) or self.server.runCommand(["getVariable", "SDK_ARCH"]) or ""
|
params["sdk_machine"] = self.runCommand(["getVariable", "SDKMACHINE"]) or self.runCommand(["getVariable", "SDK_ARCH"]) or ""
|
||||||
|
|
||||||
params["image_fstypes"] = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or ""
|
params["image_fstypes"] = self._remove_redundant(self.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "")
|
||||||
|
|
||||||
params["image_types"] = self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or ""
|
params["image_types"] = self._remove_redundant(self.runCommand(["getVariable", "IMAGE_TYPES"]) or "")
|
||||||
|
|
||||||
params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or ""
|
params["conf_version"] = self.runCommand(["getVariable", "CONF_VERSION"]) or ""
|
||||||
params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or ""
|
params["lconf_version"] = self.runCommand(["getVariable", "LCONF_VERSION"]) or ""
|
||||||
|
|
||||||
params["runnable_image_types"] = self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or ""
|
params["runnable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "")
|
||||||
params["runnable_machine_patterns"] = self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or ""
|
params["runnable_machine_patterns"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "")
|
||||||
params["deployable_image_types"] = self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or ""
|
params["deployable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "")
|
||||||
params["tmpdir"] = self.server.runCommand(["getVariable", "TMPDIR"]) or ""
|
params["tmpdir"] = self.runCommand(["getVariable", "TMPDIR"]) or ""
|
||||||
params["distro_version"] = self.server.runCommand(["getVariable", "DISTRO_VERSION"]) or ""
|
params["distro_version"] = self.runCommand(["getVariable", "DISTRO_VERSION"]) or ""
|
||||||
params["target_os"] = self.server.runCommand(["getVariable", "TARGET_OS"]) or ""
|
params["target_os"] = self.runCommand(["getVariable", "TARGET_OS"]) or ""
|
||||||
params["target_arch"] = self.server.runCommand(["getVariable", "TARGET_ARCH"]) or ""
|
params["target_arch"] = self.runCommand(["getVariable", "TARGET_ARCH"]) or ""
|
||||||
params["tune_pkgarch"] = self.server.runCommand(["getVariable", "TUNE_PKGARCH"]) or ""
|
params["tune_pkgarch"] = self.runCommand(["getVariable", "TUNE_PKGARCH"]) or ""
|
||||||
params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
|
params["bb_version"] = self.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
|
||||||
params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or ""
|
|
||||||
|
|
||||||
params["git_proxy_host"] = self.server.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
|
params["default_task"] = self.runCommand(["getVariable", "BB_DEFAULT_TASK"]) or "build"
|
||||||
params["git_proxy_port"] = self.server.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
|
|
||||||
|
|
||||||
params["http_proxy"] = self.server.runCommand(["getVariable", "http_proxy"]) or ""
|
params["git_proxy_host"] = self.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
|
||||||
params["ftp_proxy"] = self.server.runCommand(["getVariable", "ftp_proxy"]) or ""
|
params["git_proxy_port"] = self.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
|
||||||
params["https_proxy"] = self.server.runCommand(["getVariable", "https_proxy"]) or ""
|
|
||||||
params["all_proxy"] = self.server.runCommand(["getVariable", "all_proxy"]) or ""
|
|
||||||
|
|
||||||
params["cvs_proxy_host"] = self.server.runCommand(["getVariable", "CVS_PROXY_HOST"]) or ""
|
params["http_proxy"] = self.runCommand(["getVariable", "http_proxy"]) or ""
|
||||||
params["cvs_proxy_port"] = self.server.runCommand(["getVariable", "CVS_PROXY_PORT"]) or ""
|
params["ftp_proxy"] = self.runCommand(["getVariable", "ftp_proxy"]) or ""
|
||||||
|
params["https_proxy"] = self.runCommand(["getVariable", "https_proxy"]) or ""
|
||||||
|
params["all_proxy"] = self.runCommand(["getVariable", "all_proxy"]) or ""
|
||||||
|
|
||||||
|
params["cvs_proxy_host"] = self.runCommand(["getVariable", "CVS_PROXY_HOST"]) or ""
|
||||||
|
params["cvs_proxy_port"] = self.runCommand(["getVariable", "CVS_PROXY_PORT"]) or ""
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gobject
|
import gobject
|
||||||
|
from bb.ui.crumbs.hobpages import HobPage
|
||||||
|
|
||||||
#
|
#
|
||||||
# PackageListModel
|
# PackageListModel
|
||||||
@@ -33,7 +34,7 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
providing convenience functions to access gtk.TreeModel subclasses which
|
providing convenience functions to access gtk.TreeModel subclasses which
|
||||||
provide filtered views of the data.
|
provide filtered views of the data.
|
||||||
"""
|
"""
|
||||||
(COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC) = range(11)
|
(COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_BINB, COL_INC, COL_FADE_INC) = range(12)
|
||||||
|
|
||||||
__gsignals__ = {
|
__gsignals__ = {
|
||||||
"package-selection-changed" : (gobject.SIGNAL_RUN_LAST,
|
"package-selection-changed" : (gobject.SIGNAL_RUN_LAST,
|
||||||
@@ -41,6 +42,8 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
()),
|
()),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__toolchain_required_packages__ = ["task-core-standalone-sdk-target", "task-core-standalone-sdk-target-dbg"]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
self.contents = None
|
self.contents = None
|
||||||
@@ -61,6 +64,7 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
gobject.TYPE_STRING,
|
gobject.TYPE_STRING,
|
||||||
gobject.TYPE_STRING,
|
gobject.TYPE_STRING,
|
||||||
gobject.TYPE_STRING,
|
gobject.TYPE_STRING,
|
||||||
|
gobject.TYPE_BOOLEAN,
|
||||||
gobject.TYPE_BOOLEAN)
|
gobject.TYPE_BOOLEAN)
|
||||||
|
|
||||||
|
|
||||||
@@ -175,10 +179,8 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
if pkgsize == "0" and not allow_empty:
|
if pkgsize == "0" and not allow_empty:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if len(pkgsize) > 3:
|
# pkgsize is in KB
|
||||||
size = '%.1f' % (int(pkgsize)*1.0/1024) + ' MB'
|
size = HobPage._size_to_string(HobPage._string_to_size(pkgsize + ' KB'))
|
||||||
else:
|
|
||||||
size = pkgsize + ' KB'
|
|
||||||
|
|
||||||
it = self.append(pniter)
|
it = self.append(pniter)
|
||||||
self.pkg_path[pkg] = self.get_path(it)
|
self.pkg_path[pkg] = self.get_path(it)
|
||||||
@@ -342,6 +344,23 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
self.selection_change_notification()
|
self.selection_change_notification()
|
||||||
return left
|
return left
|
||||||
|
|
||||||
|
def get_user_selected_packages(self):
|
||||||
|
packagelist = []
|
||||||
|
|
||||||
|
it = self.get_iter_first()
|
||||||
|
while it:
|
||||||
|
child_it = self.iter_children(it)
|
||||||
|
while child_it:
|
||||||
|
if self.get_value(child_it, self.COL_INC):
|
||||||
|
binb = self.get_value(child_it, self.COL_BINB)
|
||||||
|
if not binb or binb == "User Selected":
|
||||||
|
name = self.get_value(child_it, self.COL_NAME)
|
||||||
|
packagelist.append(name)
|
||||||
|
child_it = self.iter_next(child_it)
|
||||||
|
it = self.iter_next(it)
|
||||||
|
|
||||||
|
return packagelist
|
||||||
|
|
||||||
def get_selected_packages(self):
|
def get_selected_packages(self):
|
||||||
packagelist = []
|
packagelist = []
|
||||||
|
|
||||||
@@ -357,8 +376,24 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
|
|
||||||
return packagelist
|
return packagelist
|
||||||
|
|
||||||
|
def get_selected_packages_toolchain(self):
|
||||||
|
packagelist = []
|
||||||
|
|
||||||
|
it = self.get_iter_first()
|
||||||
|
while it:
|
||||||
|
if self.get_value(it, self.COL_INC):
|
||||||
|
child_it = self.iter_children(it)
|
||||||
|
while child_it:
|
||||||
|
name = self.get_value(child_it, self.COL_NAME)
|
||||||
|
inc = self.get_value(child_it, self.COL_INC)
|
||||||
|
if inc or name.endswith("-dev") or name.endswith("-dbg"):
|
||||||
|
packagelist.append(name)
|
||||||
|
child_it = self.iter_next(child_it)
|
||||||
|
it = self.iter_next(it)
|
||||||
|
|
||||||
|
return list(set(packagelist + self.__toolchain_required_packages__));
|
||||||
"""
|
"""
|
||||||
Return the selected package size, unit is KB.
|
Return the selected package size, unit is B.
|
||||||
"""
|
"""
|
||||||
def get_packages_size(self):
|
def get_packages_size(self):
|
||||||
packages_size = 0
|
packages_size = 0
|
||||||
@@ -371,16 +406,11 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
if not str_size:
|
if not str_size:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
unit = str_size.split()
|
packages_size += HobPage._string_to_size(str_size)
|
||||||
if unit[1] == 'MB':
|
|
||||||
size = float(unit[0])*1024
|
|
||||||
else:
|
|
||||||
size = float(unit[0])
|
|
||||||
packages_size += size
|
|
||||||
|
|
||||||
child_it = self.iter_next(child_it)
|
child_it = self.iter_next(child_it)
|
||||||
it = self.iter_next(it)
|
it = self.iter_next(it)
|
||||||
return "%f" % packages_size
|
return packages_size
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Empty self.contents by setting the include of each entry to None
|
Empty self.contents by setting the include of each entry to None
|
||||||
@@ -400,6 +430,19 @@ class PackageListModel(gtk.TreeStore):
|
|||||||
|
|
||||||
self.selection_change_notification()
|
self.selection_change_notification()
|
||||||
|
|
||||||
|
"""
|
||||||
|
Resync the state of included items to a backup column before performing the fadeout visible effect
|
||||||
|
"""
|
||||||
|
def resync_fadeout_column(self, model_first_iter=None):
|
||||||
|
it = model_first_iter
|
||||||
|
while it:
|
||||||
|
active = self.get_value(it, self.COL_INC)
|
||||||
|
self.set(it, self.COL_FADE_INC, active)
|
||||||
|
if self.iter_has_child(it):
|
||||||
|
self.resync_fadeout_column(self.iter_children(it))
|
||||||
|
|
||||||
|
it = self.iter_next(it)
|
||||||
|
|
||||||
#
|
#
|
||||||
# RecipeListModel
|
# RecipeListModel
|
||||||
#
|
#
|
||||||
@@ -410,7 +453,7 @@ class RecipeListModel(gtk.ListStore):
|
|||||||
providing convenience functions to access gtk.TreeModel subclasses which
|
providing convenience functions to access gtk.TreeModel subclasses which
|
||||||
provide filtered views of the data.
|
provide filtered views of the data.
|
||||||
"""
|
"""
|
||||||
(COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN) = range(11)
|
(COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN, COL_FADE_INC) = range(12)
|
||||||
|
|
||||||
__dummy_image__ = "Create your own image"
|
__dummy_image__ = "Create your own image"
|
||||||
|
|
||||||
@@ -434,7 +477,8 @@ class RecipeListModel(gtk.ListStore):
|
|||||||
gobject.TYPE_BOOLEAN,
|
gobject.TYPE_BOOLEAN,
|
||||||
gobject.TYPE_BOOLEAN,
|
gobject.TYPE_BOOLEAN,
|
||||||
gobject.TYPE_STRING,
|
gobject.TYPE_STRING,
|
||||||
gobject.TYPE_STRING)
|
gobject.TYPE_STRING,
|
||||||
|
gobject.TYPE_BOOLEAN)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Find the model path for the item_name
|
Find the model path for the item_name
|
||||||
@@ -471,21 +515,25 @@ class RecipeListModel(gtk.ListStore):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def sort_func(self, model, iter1, iter2):
|
def exclude_item_sort_func(self, model, iter1, iter2):
|
||||||
val1 = model.get_value(iter1, RecipeListModel.COL_NAME)
|
val1 = model.get_value(iter1, RecipeListModel.COL_FADE_INC)
|
||||||
val2 = model.get_value(iter2, RecipeListModel.COL_NAME)
|
val2 = model.get_value(iter2, RecipeListModel.COL_INC)
|
||||||
return val1 > val2
|
return ((val1 == True) and (val2 == False))
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Create, if required, and return a filtered gtk.TreeModelSort
|
Create, if required, and return a filtered gtk.TreeModelSort
|
||||||
containing only the items which are items specified by filter
|
containing only the items which are items specified by filter
|
||||||
"""
|
"""
|
||||||
def tree_model(self, filter):
|
def tree_model(self, filter, excluded_items_ahead=False):
|
||||||
model = self.filter_new()
|
model = self.filter_new()
|
||||||
model.set_visible_func(self.tree_model_filter, filter)
|
model.set_visible_func(self.tree_model_filter, filter)
|
||||||
|
|
||||||
sort = gtk.TreeModelSort(model)
|
sort = gtk.TreeModelSort(model)
|
||||||
sort.set_default_sort_func(self.sort_func)
|
if excluded_items_ahead:
|
||||||
|
sort.set_default_sort_func(self.exclude_item_sort_func)
|
||||||
|
else:
|
||||||
|
sort.set_sort_column_id(RecipeListModel.COL_NAME, gtk.SORT_ASCENDING)
|
||||||
|
sort.set_default_sort_func(None)
|
||||||
return sort
|
return sort
|
||||||
|
|
||||||
def convert_vpath_to_path(self, view_model, view_path):
|
def convert_vpath_to_path(self, view_model, view_path):
|
||||||
@@ -517,7 +565,9 @@ class RecipeListModel(gtk.ListStore):
|
|||||||
|
|
||||||
# dummy image for prompt
|
# dummy image for prompt
|
||||||
self.set(self.append(), self.COL_NAME, self.__dummy_image__,
|
self.set(self.append(), self.COL_NAME, self.__dummy_image__,
|
||||||
self.COL_DESC, "",
|
self.COL_DESC, "Use the 'View recipes' and 'View packages' " \
|
||||||
|
"options to select what you want to include " \
|
||||||
|
"in your image.",
|
||||||
self.COL_LIC, "", self.COL_GROUP, "",
|
self.COL_LIC, "", self.COL_GROUP, "",
|
||||||
self.COL_DEPS, "", self.COL_BINB, "",
|
self.COL_DEPS, "", self.COL_BINB, "",
|
||||||
self.COL_TYPE, "image", self.COL_INC, False,
|
self.COL_TYPE, "image", self.COL_INC, False,
|
||||||
@@ -534,10 +584,7 @@ class RecipeListModel(gtk.ListStore):
|
|||||||
depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
|
depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
|
||||||
|
|
||||||
if ('task-' in name):
|
if ('task-' in name):
|
||||||
if ('lib32-' in name or 'lib64-' in name):
|
atype = 'task'
|
||||||
atype = 'mltask'
|
|
||||||
else:
|
|
||||||
atype = 'task'
|
|
||||||
elif ('image.bbclass' in " ".join(inherits)):
|
elif ('image.bbclass' in " ".join(inherits)):
|
||||||
if name != "hob-image":
|
if name != "hob-image":
|
||||||
atype = 'image'
|
atype = 'image'
|
||||||
@@ -547,10 +594,7 @@ class RecipeListModel(gtk.ListStore):
|
|||||||
elif (name == 'dummy-image' or name == 'dummy-toolchain'):
|
elif (name == 'dummy-image' or name == 'dummy-toolchain'):
|
||||||
atype = 'dummy'
|
atype = 'dummy'
|
||||||
else:
|
else:
|
||||||
if ('lib32-' in name or 'lib64-' in name):
|
atype = 'recipe'
|
||||||
atype = 'mlrecipe'
|
|
||||||
else:
|
|
||||||
atype = 'recipe'
|
|
||||||
|
|
||||||
self.set(self.append(), self.COL_NAME, item, self.COL_DESC, desc,
|
self.set(self.append(), self.COL_NAME, item, self.COL_DESC, desc,
|
||||||
self.COL_LIC, lic, self.COL_GROUP, group,
|
self.COL_LIC, lic, self.COL_GROUP, group,
|
||||||
@@ -575,22 +619,6 @@ class RecipeListModel(gtk.ListStore):
|
|||||||
def path_included(self, item_path):
|
def path_included(self, item_path):
|
||||||
return self[item_path][self.COL_INC]
|
return self[item_path][self.COL_INC]
|
||||||
|
|
||||||
"""
|
|
||||||
Append a certain image into the combobox
|
|
||||||
"""
|
|
||||||
def image_list_append(self, name, deps, install):
|
|
||||||
# check whether a certain image is there
|
|
||||||
if not name or self.find_path_for_item(name):
|
|
||||||
return
|
|
||||||
it = self.append()
|
|
||||||
self.set(it, self.COL_NAME, name, self.COL_DESC, "",
|
|
||||||
self.COL_LIC, "", self.COL_GROUP, "",
|
|
||||||
self.COL_DEPS, deps, self.COL_BINB, "",
|
|
||||||
self.COL_TYPE, "image", self.COL_INC, False,
|
|
||||||
self.COL_IMG, False, self.COL_INSTALL, install,
|
|
||||||
self.COL_PN, name)
|
|
||||||
self.pn_path[name] = self.get_path(it)
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Add this item, and any of its dependencies, to the image contents
|
Add this item, and any of its dependencies, to the image contents
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class HobPage (gtk.VBox):
|
|||||||
self.builder_width, self.builder_height = self.builder.size_request()
|
self.builder_width, self.builder_height = self.builder.size_request()
|
||||||
|
|
||||||
if not title:
|
if not title:
|
||||||
self.title = "HOB -- Image Creator"
|
self.title = "Hob -- Image Creator"
|
||||||
else:
|
else:
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ class HobPage (gtk.VBox):
|
|||||||
hbox = gtk.HBox()
|
hbox = gtk.HBox()
|
||||||
|
|
||||||
label = gtk.Label()
|
label = gtk.Label()
|
||||||
label.set_markup("<span font_desc=\'14\'>%s</span>" % self.title)
|
label.set_markup("<span size='x-large'>%s</span>" % self.title)
|
||||||
hbox.pack_start(label, expand=False, fill=False, padding=20)
|
hbox.pack_start(label, expand=False, fill=False, padding=20)
|
||||||
|
|
||||||
if widget:
|
if widget:
|
||||||
@@ -69,8 +69,8 @@ class HobPage (gtk.VBox):
|
|||||||
|
|
||||||
return eventbox
|
return eventbox
|
||||||
|
|
||||||
def span_tag(self, px="12px", weight="normal", forground="#1c1c1c"):
|
def span_tag(self, size="medium", weight="normal", forground="#1c1c1c"):
|
||||||
span_tag = "weight=\'%s\' foreground=\'%s\' font_desc=\'%s\'" % (weight, forground, px)
|
span_tag = "weight='%s' foreground='%s' size='%s'" % (weight, forground, size)
|
||||||
return span_tag
|
return span_tag
|
||||||
|
|
||||||
def append_toolbar_button(self, toolbar, buttonname, icon_disp, icon_hovor, tip, cb):
|
def append_toolbar_button(self, toolbar, buttonname, icon_disp, icon_hovor, tip, cb):
|
||||||
@@ -83,3 +83,42 @@ class HobPage (gtk.VBox):
|
|||||||
tip_text = tip
|
tip_text = tip
|
||||||
button = toolbar.append_item(buttonname, tip, None, icon, cb)
|
button = toolbar.append_item(buttonname, tip, None, icon, cb)
|
||||||
return button
|
return button
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _size_to_string(size):
|
||||||
|
try:
|
||||||
|
if not size:
|
||||||
|
size_str = "0 B"
|
||||||
|
else:
|
||||||
|
if len(str(int(size))) > 6:
|
||||||
|
size_str = '%.1f' % (size*1.0/(1024*1024)) + ' MB'
|
||||||
|
elif len(str(int(size))) > 3:
|
||||||
|
size_str = '%.1f' % (size*1.0/1024) + ' KB'
|
||||||
|
else:
|
||||||
|
size_str = str(size) + ' B'
|
||||||
|
except:
|
||||||
|
size_str = "0 B"
|
||||||
|
return size_str
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _string_to_size(str_size):
|
||||||
|
try:
|
||||||
|
if not str_size:
|
||||||
|
size = 0
|
||||||
|
else:
|
||||||
|
unit = str_size.split()
|
||||||
|
if len(unit) > 1:
|
||||||
|
if unit[1] == 'MB':
|
||||||
|
size = float(unit[0])*1024*1024
|
||||||
|
elif unit[1] == 'KB':
|
||||||
|
size = float(unit[0])*1024
|
||||||
|
elif unit[1] == 'B':
|
||||||
|
size = float(unit[0])
|
||||||
|
else:
|
||||||
|
size = 0
|
||||||
|
else:
|
||||||
|
size = float(unit[0])
|
||||||
|
except:
|
||||||
|
size = 0
|
||||||
|
return size
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class hic:
|
|||||||
ICON_INFO_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_display.png'))
|
ICON_INFO_DISPLAY_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_display.png'))
|
||||||
ICON_INFO_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_hover.png'))
|
ICON_INFO_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('info/info_hover.png'))
|
||||||
ICON_INDI_CONFIRM_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/confirmation.png'))
|
ICON_INDI_CONFIRM_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/confirmation.png'))
|
||||||
ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/error.png'))
|
ICON_INDI_ERROR_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/denied.png'))
|
||||||
ICON_INDI_REMOVE_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove.png'))
|
ICON_INDI_REMOVE_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove.png'))
|
||||||
ICON_INDI_REMOVE_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove-hover.png'))
|
ICON_INDI_REMOVE_HOVER_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/remove-hover.png'))
|
||||||
ICON_INDI_ADD_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/add.png'))
|
ICON_INDI_ADD_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/add.png'))
|
||||||
@@ -60,6 +60,7 @@ class hic:
|
|||||||
ICON_INDI_REFRESH_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/refresh.png'))
|
ICON_INDI_REFRESH_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/refresh.png'))
|
||||||
ICON_INDI_ALERT_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/alert.png'))
|
ICON_INDI_ALERT_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/alert.png'))
|
||||||
ICON_INDI_TICK_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/tick.png'))
|
ICON_INDI_TICK_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/tick.png'))
|
||||||
|
ICON_INDI_INFO_FILE = os.path.join(HOB_ICON_BASE_DIR, ('indicators/info.png'))
|
||||||
|
|
||||||
class hcc:
|
class hcc:
|
||||||
|
|
||||||
@@ -104,6 +105,11 @@ class HobViewTable (gtk.VBox):
|
|||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
(gobject.TYPE_PYOBJECT,
|
(gobject.TYPE_PYOBJECT,
|
||||||
gobject.TYPE_PYOBJECT,)),
|
gobject.TYPE_PYOBJECT,)),
|
||||||
|
"cell-fadeinout-stopped" : (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_NONE,
|
||||||
|
(gobject.TYPE_PYOBJECT,
|
||||||
|
gobject.TYPE_PYOBJECT,
|
||||||
|
gobject.TYPE_PYOBJECT,)),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, columns):
|
def __init__(self, columns):
|
||||||
@@ -126,6 +132,8 @@ class HobViewTable (gtk.VBox):
|
|||||||
col.set_min_width(column['col_min'])
|
col.set_min_width(column['col_min'])
|
||||||
if 'col_max' in column.keys():
|
if 'col_max' in column.keys():
|
||||||
col.set_max_width(column['col_max'])
|
col.set_max_width(column['col_max'])
|
||||||
|
if 'expand' in column.keys():
|
||||||
|
col.set_expand(True)
|
||||||
self.table_tree.append_column(col)
|
self.table_tree.append_column(col)
|
||||||
|
|
||||||
if (not 'col_style' in column.keys()) or column['col_style'] == 'text':
|
if (not 'col_style' in column.keys()) or column['col_style'] == 'text':
|
||||||
@@ -133,9 +141,10 @@ class HobViewTable (gtk.VBox):
|
|||||||
col.pack_start(cell, True)
|
col.pack_start(cell, True)
|
||||||
col.set_attributes(cell, text=column['col_id'])
|
col.set_attributes(cell, text=column['col_id'])
|
||||||
elif column['col_style'] == 'check toggle':
|
elif column['col_style'] == 'check toggle':
|
||||||
cell = gtk.CellRendererToggle()
|
cell = HobCellRendererToggle()
|
||||||
cell.set_property('activatable', True)
|
cell.set_property('activatable', True)
|
||||||
cell.connect("toggled", self.toggled_cb, i, self.table_tree)
|
cell.connect("toggled", self.toggled_cb, i, self.table_tree)
|
||||||
|
cell.connect_render_state_changed(self.stop_cell_fadeinout_cb, self.table_tree)
|
||||||
self.toggle_id = i
|
self.toggle_id = i
|
||||||
col.pack_end(cell, True)
|
col.pack_end(cell, True)
|
||||||
col.set_attributes(cell, active=column['col_id'])
|
col.set_attributes(cell, active=column['col_id'])
|
||||||
@@ -149,13 +158,26 @@ class HobViewTable (gtk.VBox):
|
|||||||
col.pack_end(cell, True)
|
col.pack_end(cell, True)
|
||||||
col.set_attributes(cell, active=column['col_id'])
|
col.set_attributes(cell, active=column['col_id'])
|
||||||
self.toggle_columns.append(column['col_name'])
|
self.toggle_columns.append(column['col_name'])
|
||||||
|
elif column['col_style'] == 'binb':
|
||||||
|
cell = gtk.CellRendererText()
|
||||||
|
col.pack_start(cell, True)
|
||||||
|
col.set_cell_data_func(cell, self.display_binb_cb, column['col_id'])
|
||||||
|
|
||||||
scroll = gtk.ScrolledWindow()
|
scroll = gtk.ScrolledWindow()
|
||||||
scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
|
scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
|
||||||
scroll.set_shadow_type(gtk.SHADOW_IN)
|
|
||||||
scroll.add(self.table_tree)
|
scroll.add(self.table_tree)
|
||||||
self.pack_start(scroll, True, True, 0)
|
self.pack_start(scroll, True, True, 0)
|
||||||
|
|
||||||
|
def display_binb_cb(self, col, cell, model, it, col_id):
|
||||||
|
binb = model.get_value(it, col_id)
|
||||||
|
# Just display the first item
|
||||||
|
if binb:
|
||||||
|
bin = binb.split(', ')
|
||||||
|
cell.set_property('text', bin[0])
|
||||||
|
else:
|
||||||
|
cell.set_property('text', "")
|
||||||
|
return True
|
||||||
|
|
||||||
def set_model(self, tree_model):
|
def set_model(self, tree_model):
|
||||||
self.table_tree.set_model(tree_model)
|
self.table_tree.set_model(tree_model)
|
||||||
|
|
||||||
@@ -179,6 +201,9 @@ class HobViewTable (gtk.VBox):
|
|||||||
if not view_column.get_title() in self.toggle_columns:
|
if not view_column.get_title() in self.toggle_columns:
|
||||||
self.emit("row-activated", tree.get_model(), path)
|
self.emit("row-activated", tree.get_model(), path)
|
||||||
|
|
||||||
|
def stop_cell_fadeinout_cb(self, ctrl, cell, tree):
|
||||||
|
self.emit("cell-fadeinout-stopped", ctrl, cell, tree)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
A method to calculate a softened value for the colour of widget when in the
|
A method to calculate a softened value for the colour of widget when in the
|
||||||
provided state.
|
provided state.
|
||||||
@@ -240,7 +265,7 @@ class HobAltButton(gtk.Button):
|
|||||||
"""
|
"""
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def desensitise_on_state_change_cb(button, state):
|
def desensitise_on_state_change_cb(button, state):
|
||||||
if button.get_state() == gtk.STATE_INSENSITIVE:
|
if not button.get_property("sensitive"):
|
||||||
HobAltButton.set_text(button, False)
|
HobAltButton.set_text(button, False)
|
||||||
else:
|
else:
|
||||||
HobAltButton.set_text(button, True)
|
HobAltButton.set_text(button, True)
|
||||||
@@ -254,7 +279,7 @@ class HobAltButton(gtk.Button):
|
|||||||
colour = HobColors.PALE_BLUE
|
colour = HobColors.PALE_BLUE
|
||||||
else:
|
else:
|
||||||
colour = HobColors.LIGHT_GRAY
|
colour = HobColors.LIGHT_GRAY
|
||||||
button.set_label("<span color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(button.text)))
|
button.set_label("<span size='large' color='%s'><b>%s</b></span>" % (colour, gobject.markup_escape_text(button.text)))
|
||||||
button.child.set_use_markup(True)
|
button.child.set_use_markup(True)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -281,7 +306,7 @@ class HobImageButton(gtk.Button):
|
|||||||
self.icon_path = icon_path
|
self.icon_path = icon_path
|
||||||
self.hover_icon_path = hover_icon_path
|
self.hover_icon_path = hover_icon_path
|
||||||
|
|
||||||
hbox = gtk.HBox(False, 3)
|
hbox = gtk.HBox(False, 10)
|
||||||
hbox.show()
|
hbox.show()
|
||||||
self.add(hbox)
|
self.add(hbox)
|
||||||
self.icon = gtk.Image()
|
self.icon = gtk.Image()
|
||||||
@@ -295,7 +320,7 @@ class HobImageButton(gtk.Button):
|
|||||||
label = gtk.Label()
|
label = gtk.Label()
|
||||||
label.set_alignment(0.0, 0.5)
|
label.set_alignment(0.0, 0.5)
|
||||||
colour = soften_color(label)
|
colour = soften_color(label)
|
||||||
mark = "%s\n<span fgcolor='%s'><small>%s</small></span>" % (primary_text, colour, secondary_text)
|
mark = "<span size='x-large'>%s</span>\n<span size='medium' fgcolor='%s' weight='ultralight'>%s</span>" % (primary_text, colour, secondary_text)
|
||||||
label.set_markup(mark)
|
label.set_markup(mark)
|
||||||
label.show()
|
label.show()
|
||||||
hbox.pack_start(label, True, True, 0)
|
hbox.pack_start(label, True, True, 0)
|
||||||
@@ -400,6 +425,7 @@ class HobTabBar(gtk.DrawingArea):
|
|||||||
self.connect("expose-event", self.on_draw)
|
self.connect("expose-event", self.on_draw)
|
||||||
self.connect("button-press-event", self.button_pressed_cb)
|
self.connect("button-press-event", self.button_pressed_cb)
|
||||||
self.connect("button-release-event", self.button_released_cb)
|
self.connect("button-release-event", self.button_released_cb)
|
||||||
|
self.connect("query-tooltip", self.query_tooltip_cb)
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
def button_released_cb(self, widget, event):
|
def button_released_cb(self, widget, event):
|
||||||
@@ -463,7 +489,7 @@ class HobTabBar(gtk.DrawingArea):
|
|||||||
child["g"] = color.green
|
child["g"] = color.green
|
||||||
child["b"] = color.blue
|
child["b"] = color.blue
|
||||||
|
|
||||||
def append_tab_child(self, title, page):
|
def append_tab_child(self, title, page, tooltip=""):
|
||||||
num = len(self.children) + 1
|
num = len(self.children) + 1
|
||||||
self.tab_width = self.tab_width * len(self.children) / num
|
self.tab_width = self.tab_width * len(self.children) / num
|
||||||
|
|
||||||
@@ -488,8 +514,11 @@ class HobTabBar(gtk.DrawingArea):
|
|||||||
"title" : title,
|
"title" : title,
|
||||||
"indicator_show" : False,
|
"indicator_show" : False,
|
||||||
"indicator_number" : 0,
|
"indicator_number" : 0,
|
||||||
|
"tooltip_markup" : tooltip,
|
||||||
}
|
}
|
||||||
self.children.append(new_one)
|
self.children.append(new_one)
|
||||||
|
if tooltip and (not self.props.has_tooltip):
|
||||||
|
self.props.has_tooltip = True
|
||||||
# set the default current child
|
# set the default current child
|
||||||
if not self.current_child:
|
if not self.current_child:
|
||||||
self.current_child = new_one
|
self.current_child = new_one
|
||||||
@@ -558,7 +587,10 @@ class HobTabBar(gtk.DrawingArea):
|
|||||||
off_y = (self.tab_height - fonth) / 2
|
off_y = (self.tab_height - fonth) / 2
|
||||||
x = child["x"] + off_x
|
x = child["x"] + off_x
|
||||||
y = child["y"] + off_y
|
y = child["y"] + off_y
|
||||||
self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout)
|
if not child == self.current_child:
|
||||||
|
self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout, gtk.gdk.Color(HobColors.WHITE))
|
||||||
|
else:
|
||||||
|
self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), pangolayout)
|
||||||
|
|
||||||
def draw_toggled_tab(self, cr):
|
def draw_toggled_tab(self, cr):
|
||||||
if not self.current_child:
|
if not self.current_child:
|
||||||
@@ -616,7 +648,10 @@ class HobTabBar(gtk.DrawingArea):
|
|||||||
y = tab_y + self.tab_height/2 - dest_h/2
|
y = tab_y + self.tab_height/2 - dest_h/2
|
||||||
|
|
||||||
r = min(dest_w, dest_h)/2
|
r = min(dest_w, dest_h)/2
|
||||||
color = cr.set_source_color(gtk.gdk.color_parse(HobColors.ORANGE))
|
if not child == self.current_child:
|
||||||
|
color = cr.set_source_color(gtk.gdk.color_parse(HobColors.DEEP_RED))
|
||||||
|
else:
|
||||||
|
color = cr.set_source_color(gtk.gdk.color_parse(HobColors.GRAY))
|
||||||
# check round back area can contain the text or not
|
# check round back area can contain the text or not
|
||||||
back_round_can_contain_width = float(2 * r * 0.707)
|
back_round_can_contain_width = float(2 * r * 0.707)
|
||||||
if float(textw) > back_round_can_contain_width:
|
if float(textw) > back_round_can_contain_width:
|
||||||
@@ -635,7 +670,7 @@ class HobTabBar(gtk.DrawingArea):
|
|||||||
x = x + (dest_w/2)-(textw/2)
|
x = x + (dest_w/2)-(textw/2)
|
||||||
y = y + (dest_h/2) - (texth/2)
|
y = y + (dest_h/2) - (texth/2)
|
||||||
cr.move_to(x, y)
|
cr.move_to(x, y)
|
||||||
self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), layout)
|
self.window.draw_layout(self.style.fg_gc[gtk.STATE_NORMAL], int(x), int(y), layout, gtk.gdk.Color(HobColors.WHITE))
|
||||||
|
|
||||||
def show_indicator_icon(self, child, number):
|
def show_indicator_icon(self, child, number):
|
||||||
child["indicator_show"] = True
|
child["indicator_show"] = True
|
||||||
@@ -652,6 +687,18 @@ class HobTabBar(gtk.DrawingArea):
|
|||||||
|
|
||||||
return gtk.gdk.Rectangle(x, y, w, h)
|
return gtk.gdk.Rectangle(x, y, w, h)
|
||||||
|
|
||||||
|
def query_tooltip_cb(self, widget, x, y, keyboardtip, tooltip):
|
||||||
|
if keyboardtip or (not tooltip):
|
||||||
|
return False
|
||||||
|
# check which tab be clicked
|
||||||
|
for child in self.children:
|
||||||
|
if (child["x"] < x) and (x < child["x"] + self.tab_width) \
|
||||||
|
and (child["y"] < y) and (y < child["y"] + self.tab_height):
|
||||||
|
tooltip.set_markup(child["tooltip_markup"])
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
class HobNotebook(gtk.VBox):
|
class HobNotebook(gtk.VBox):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -736,13 +783,15 @@ class HobNotebook(gtk.VBox):
|
|||||||
if not notebook:
|
if not notebook:
|
||||||
return
|
return
|
||||||
title = notebook.get_tab_label_text(notebook_child)
|
title = notebook.get_tab_label_text(notebook_child)
|
||||||
|
label = notebook.get_tab_label(notebook_child)
|
||||||
|
tooltip_markup = label.get_tooltip_markup()
|
||||||
if not title:
|
if not title:
|
||||||
return
|
return
|
||||||
for child in self.tabbar.children:
|
for child in self.tabbar.children:
|
||||||
if child["title"] == title:
|
if child["title"] == title:
|
||||||
child["toggled_page"] = page
|
child["toggled_page"] = page
|
||||||
return
|
return
|
||||||
self.tabbar.append_tab_child(title, page)
|
self.tabbar.append_tab_child(title, page, tooltip_markup)
|
||||||
|
|
||||||
def page_removed_cb(self, notebook, notebook_child, page, title=""):
|
def page_removed_cb(self, notebook, notebook_child, page, title=""):
|
||||||
for child in self.tabbar.children:
|
for child in self.tabbar.children:
|
||||||
@@ -820,7 +869,7 @@ class HobIconChecker(hic):
|
|||||||
"""
|
"""
|
||||||
def check_stock_icon(self, stock_name=""):
|
def check_stock_icon(self, stock_name=""):
|
||||||
HOB_CHECK_STOCK_NAME = {
|
HOB_CHECK_STOCK_NAME = {
|
||||||
('hic-dialog-info', 'gtk-dialog-info', 'dialog-info') : self.ICON_INFO_DISPLAY_FILE,
|
('hic-dialog-info', 'gtk-dialog-info', 'dialog-info') : self.ICON_INDI_INFO_FILE,
|
||||||
('hic-ok', 'gtk-ok', 'ok') : self.ICON_INDI_TICK_FILE,
|
('hic-ok', 'gtk-ok', 'ok') : self.ICON_INDI_TICK_FILE,
|
||||||
('hic-dialog-error', 'gtk-dialog-error', 'dialog-error') : self.ICON_INDI_ERROR_FILE,
|
('hic-dialog-error', 'gtk-dialog-error', 'dialog-error') : self.ICON_INDI_ERROR_FILE,
|
||||||
('hic-dialog-warning', 'gtk-dialog-warning', 'dialog-warning') : self.ICON_INDI_ALERT_FILE,
|
('hic-dialog-warning', 'gtk-dialog-warning', 'dialog-warning') : self.ICON_INDI_ALERT_FILE,
|
||||||
@@ -836,14 +885,23 @@ class HobIconChecker(hic):
|
|||||||
|
|
||||||
return valid_stock_id
|
return valid_stock_id
|
||||||
|
|
||||||
class RefreshRuningController(gobject.GObject):
|
class HobCellRendererController(gobject.GObject):
|
||||||
def __init__(self, widget=None, iter=None):
|
(MODE_CYCLE_RUNNING, MODE_ONE_SHORT) = range(2)
|
||||||
|
__gsignals__ = {
|
||||||
|
"run-timer-stopped" : (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_NONE,
|
||||||
|
()),
|
||||||
|
}
|
||||||
|
def __init__(self, runningmode=MODE_CYCLE_RUNNING, is_draw_row=False):
|
||||||
gobject.GObject.__init__(self)
|
gobject.GObject.__init__(self)
|
||||||
self.timeout_id = None
|
self.timeout_id = None
|
||||||
self.current_angle_pos = 0.0
|
self.current_angle_pos = 0.0
|
||||||
self.step_angle = 0.0
|
self.step_angle = 0.0
|
||||||
self.tree_headers_height = 0
|
self.tree_headers_height = 0
|
||||||
self.running_cell_areas = []
|
self.running_cell_areas = []
|
||||||
|
self.running_mode = runningmode
|
||||||
|
self.is_queue_draw_row_area = is_draw_row
|
||||||
|
self.force_stop_enable = False
|
||||||
|
|
||||||
def is_active(self):
|
def is_active(self):
|
||||||
if self.timeout_id:
|
if self.timeout_id:
|
||||||
@@ -851,10 +909,10 @@ class RefreshRuningController(gobject.GObject):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def reset(self):
|
def reset_run(self):
|
||||||
self.force_stop(True)
|
self.force_stop()
|
||||||
|
self.running_cell_areas = []
|
||||||
self.current_angle_pos = 0.0
|
self.current_angle_pos = 0.0
|
||||||
self.timeout_id = None
|
|
||||||
self.step_angle = 0.0
|
self.step_angle = 0.0
|
||||||
|
|
||||||
''' time_iterval: (1~1000)ms, which will be as the basic interval count for timer
|
''' time_iterval: (1~1000)ms, which will be as the basic interval count for timer
|
||||||
@@ -874,15 +932,16 @@ class RefreshRuningController(gobject.GObject):
|
|||||||
self.timeout_id = gobject.timeout_add(int(time_iterval),
|
self.timeout_id = gobject.timeout_add(int(time_iterval),
|
||||||
self.make_image_on_progressing_cb, tree)
|
self.make_image_on_progressing_cb, tree)
|
||||||
self.tree_headers_height = self.get_treeview_headers_height(tree)
|
self.tree_headers_height = self.get_treeview_headers_height(tree)
|
||||||
|
self.force_stop_enable = False
|
||||||
|
|
||||||
def force_stop(self, after_hide_or_not=False):
|
def force_stop(self):
|
||||||
|
self.emit("run-timer-stopped")
|
||||||
|
self.force_stop_enable = True
|
||||||
if self.timeout_id:
|
if self.timeout_id:
|
||||||
gobject.source_remove(self.timeout_id)
|
if gobject.source_remove(self.timeout_id):
|
||||||
self.timeout_id = None
|
self.timeout_id = None
|
||||||
if self.running_cell_areas:
|
|
||||||
self.running_cell_areas = []
|
|
||||||
|
|
||||||
def on_draw_cb(self, pixbuf, cr, x, y, img_width, img_height, do_refresh=True):
|
def on_draw_pixbuf_cb(self, pixbuf, cr, x, y, img_width, img_height, do_refresh=True):
|
||||||
if pixbuf:
|
if pixbuf:
|
||||||
r = max(img_width/2, img_height/2)
|
r = max(img_width/2, img_height/2)
|
||||||
cr.translate(x + r, y + r)
|
cr.translate(x + r, y + r)
|
||||||
@@ -892,6 +951,16 @@ class RefreshRuningController(gobject.GObject):
|
|||||||
cr.set_source_pixbuf(pixbuf, -img_width/2, -img_height/2)
|
cr.set_source_pixbuf(pixbuf, -img_width/2, -img_height/2)
|
||||||
cr.paint()
|
cr.paint()
|
||||||
|
|
||||||
|
def on_draw_fadeinout_cb(self, cr, color, x, y, width, height, do_fadeout=True):
|
||||||
|
if do_fadeout:
|
||||||
|
alpha = self.current_angle_pos * 0.8
|
||||||
|
else:
|
||||||
|
alpha = (1.0 - self.current_angle_pos) * 0.8
|
||||||
|
|
||||||
|
cr.set_source_rgba(color.red, color.green, color.blue, alpha)
|
||||||
|
cr.rectangle(x, y, width, height)
|
||||||
|
cr.fill()
|
||||||
|
|
||||||
def get_treeview_headers_height(self, tree):
|
def get_treeview_headers_height(self, tree):
|
||||||
if tree and (tree.get_property("headers-visible") == True):
|
if tree and (tree.get_property("headers-visible") == True):
|
||||||
height = tree.get_allocation().height - tree.get_bin_window().get_size()[1]
|
height = tree.get_allocation().height - tree.get_bin_window().get_size()[1]
|
||||||
@@ -901,13 +970,24 @@ class RefreshRuningController(gobject.GObject):
|
|||||||
|
|
||||||
def make_image_on_progressing_cb(self, tree):
|
def make_image_on_progressing_cb(self, tree):
|
||||||
self.current_angle_pos += self.step_angle
|
self.current_angle_pos += self.step_angle
|
||||||
if (self.current_angle_pos >= 1):
|
if self.running_mode == self.MODE_CYCLE_RUNNING:
|
||||||
self.current_angle_pos = self.step_angle
|
if (self.current_angle_pos >= 1):
|
||||||
|
self.current_angle_pos = self.step_angle
|
||||||
|
else:
|
||||||
|
if self.current_angle_pos > 1:
|
||||||
|
self.force_stop()
|
||||||
|
return False
|
||||||
|
|
||||||
for rect in self.running_cell_areas:
|
if self.is_queue_draw_row_area:
|
||||||
tree.queue_draw_area(rect.x, rect.y + self.tree_headers_height, rect.width, rect.height)
|
for path in self.running_cell_areas:
|
||||||
|
rect = tree.get_cell_area(path, tree.get_column(0))
|
||||||
|
row_x, _, row_width, _ = tree.get_visible_rect()
|
||||||
|
tree.queue_draw_area(row_x, rect.y + self.tree_headers_height, row_width, rect.height)
|
||||||
|
else:
|
||||||
|
for rect in self.running_cell_areas:
|
||||||
|
tree.queue_draw_area(rect.x, rect.y + self.tree_headers_height, rect.width, rect.height)
|
||||||
|
|
||||||
return True
|
return (not self.force_stop_enable)
|
||||||
|
|
||||||
def append_running_cell_area(self, cell_area):
|
def append_running_cell_area(self, cell_area):
|
||||||
if cell_area and (cell_area not in self.running_cell_areas):
|
if cell_area and (cell_area not in self.running_cell_areas):
|
||||||
@@ -917,16 +997,17 @@ class RefreshRuningController(gobject.GObject):
|
|||||||
if cell_area in self.running_cell_areas:
|
if cell_area in self.running_cell_areas:
|
||||||
self.running_cell_areas.remove(cell_area)
|
self.running_cell_areas.remove(cell_area)
|
||||||
if not self.running_cell_areas:
|
if not self.running_cell_areas:
|
||||||
self.reset()
|
self.reset_run()
|
||||||
|
|
||||||
gobject.type_register(RefreshRuningController)
|
gobject.type_register(HobCellRendererController)
|
||||||
|
|
||||||
class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
|
class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
gtk.CellRendererPixbuf.__init__(self)
|
gtk.CellRendererPixbuf.__init__(self)
|
||||||
self.control = RefreshRuningController()
|
self.control = HobCellRendererController()
|
||||||
# add icon checker for make the gtk-icon transfer to hob-icon
|
# add icon checker for make the gtk-icon transfer to hob-icon
|
||||||
self.checker = HobIconChecker()
|
self.checker = HobIconChecker()
|
||||||
|
self.set_property("stock-size", gtk.ICON_SIZE_DND)
|
||||||
|
|
||||||
def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG):
|
def get_pixbuf_from_stock_icon(self, widget, stock_id="", size=gtk.ICON_SIZE_DIALOG):
|
||||||
if widget and stock_id and gtk.icon_factory_lookup_default(stock_id):
|
if widget and stock_id and gtk.icon_factory_lookup_default(stock_id):
|
||||||
@@ -974,18 +1055,73 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
|
|||||||
if stock_id == 'hic-task-refresh':
|
if stock_id == 'hic-task-refresh':
|
||||||
self.control.append_running_cell_area(cell_area)
|
self.control.append_running_cell_area(cell_area)
|
||||||
if self.control.is_active():
|
if self.control.is_active():
|
||||||
self.control.on_draw_cb(pix, window.cairo_create(), x, y, w, h, True)
|
self.control.on_draw_pixbuf_cb(pix, window.cairo_create(), x, y, w, h, True)
|
||||||
else:
|
else:
|
||||||
self.control.start_run(200, 0, 0, 1000, 200, tree)
|
self.control.start_run(200, 0, 0, 1000, 150, tree)
|
||||||
else:
|
else:
|
||||||
self.control.remove_running_cell_area(cell_area)
|
self.control.remove_running_cell_area(cell_area)
|
||||||
self.control.on_draw_cb(pix, window.cairo_create(), x, y, w, h, False)
|
self.control.on_draw_pixbuf_cb(pix, window.cairo_create(), x, y, w, h, False)
|
||||||
|
|
||||||
def on_get_size(self, widget, cell_area):
|
def on_get_size(self, widget, cell_area):
|
||||||
if self.props.icon_name or self.props.pixbuf or self.props.stock_id:
|
if self.props.icon_name or self.props.pixbuf or self.props.stock_id:
|
||||||
w, h = gtk.icon_size_lookup(self.props.stock_size)
|
w, h = gtk.icon_size_lookup(self.props.stock_size)
|
||||||
return 0, 0, w, h
|
calc_width = self.get_property("xpad") * 2 + w
|
||||||
|
calc_height = self.get_property("ypad") * 2 + h
|
||||||
|
x_offset = 0
|
||||||
|
y_offset = 0
|
||||||
|
if cell_area and w > 0 and h > 0:
|
||||||
|
x_offset = self.get_property("xalign") * (cell_area.width - calc_width - self.get_property("xpad"))
|
||||||
|
y_offset = self.get_property("yalign") * (cell_area.height - calc_height - self.get_property("ypad"))
|
||||||
|
|
||||||
|
return x_offset, y_offset, w, h
|
||||||
|
|
||||||
return 0, 0, 0, 0
|
return 0, 0, 0, 0
|
||||||
|
|
||||||
gobject.type_register(HobCellRendererPixbuf)
|
gobject.type_register(HobCellRendererPixbuf)
|
||||||
|
|
||||||
|
class HobCellRendererToggle(gtk.CellRendererToggle):
|
||||||
|
def __init__(self):
|
||||||
|
gtk.CellRendererToggle.__init__(self)
|
||||||
|
self.ctrl = HobCellRendererController(is_draw_row=True)
|
||||||
|
self.ctrl.running_mode = self.ctrl.MODE_ONE_SHORT
|
||||||
|
self.cell_attr = {"fadeout": False}
|
||||||
|
|
||||||
|
def do_render(self, window, widget, background_area, cell_area, expose_area, flags):
|
||||||
|
if (not self.ctrl) or (not widget):
|
||||||
|
return
|
||||||
|
if self.ctrl.is_active():
|
||||||
|
path = widget.get_path_at_pos(cell_area.x + cell_area.width/2, cell_area.y + cell_area.height/2)
|
||||||
|
# sometimes the parameters of cell_area will be a negative number,such as pull up down the scroll bar
|
||||||
|
# it's over the tree container range, so the path will be bad
|
||||||
|
if not path: return
|
||||||
|
path = path[0]
|
||||||
|
if path in self.ctrl.running_cell_areas:
|
||||||
|
cr = window.cairo_create()
|
||||||
|
color = gtk.gdk.Color(HobColors.WHITE)
|
||||||
|
|
||||||
|
row_x, _, row_width, _ = widget.get_visible_rect()
|
||||||
|
border_y = self.get_property("ypad")
|
||||||
|
self.ctrl.on_draw_fadeinout_cb(cr, color, row_x, cell_area.y - border_y, row_width, \
|
||||||
|
cell_area.height + border_y * 2, self.cell_attr["fadeout"])
|
||||||
|
|
||||||
|
return gtk.CellRendererToggle.do_render(self, window, widget, background_area, cell_area, expose_area, flags)
|
||||||
|
|
||||||
|
'''delay: normally delay time is 1000ms
|
||||||
|
cell_list: whilch cells need to be render
|
||||||
|
'''
|
||||||
|
def fadeout(self, tree, delay, cell_list=None):
|
||||||
|
if (delay < 200) or (not tree):
|
||||||
|
return
|
||||||
|
self.cell_attr["fadeout"] = True
|
||||||
|
self.ctrl.running_cell_areas = cell_list
|
||||||
|
self.ctrl.start_run(200, 0, 0, delay, (delay * 200 / 1000), tree)
|
||||||
|
|
||||||
|
def connect_render_state_changed(self, func, usrdata=None):
|
||||||
|
if not func:
|
||||||
|
return
|
||||||
|
if usrdata:
|
||||||
|
self.ctrl.connect("run-timer-stopped", func, self, usrdata)
|
||||||
|
else:
|
||||||
|
self.ctrl.connect("run-timer-stopped", func, self)
|
||||||
|
|
||||||
|
gobject.type_register(HobCellRendererToggle)
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ class ImageConfigurationPage (HobPage):
|
|||||||
super(ImageConfigurationPage, self).__init__(builder, "Image configuration")
|
super(ImageConfigurationPage, self).__init__(builder, "Image configuration")
|
||||||
|
|
||||||
self.image_combo_id = None
|
self.image_combo_id = None
|
||||||
|
# we use machine_combo_changed_by_manual to identify the machine is changed by code
|
||||||
|
# or by manual. If by manual, all user's recipe selection and package selection are
|
||||||
|
# cleared.
|
||||||
|
self.machine_combo_changed_by_manual = True
|
||||||
self.create_visual_elements()
|
self.create_visual_elements()
|
||||||
|
|
||||||
def create_visual_elements(self):
|
def create_visual_elements(self):
|
||||||
@@ -49,19 +53,19 @@ class ImageConfigurationPage (HobPage):
|
|||||||
"Templates",
|
"Templates",
|
||||||
hic.ICON_TEMPLATES_DISPLAY_FILE,
|
hic.ICON_TEMPLATES_DISPLAY_FILE,
|
||||||
hic.ICON_TEMPLATES_HOVER_FILE,
|
hic.ICON_TEMPLATES_HOVER_FILE,
|
||||||
"Load a hob building template saved before",
|
"Load a previously saved template",
|
||||||
self.template_button_clicked_cb)
|
self.template_button_clicked_cb)
|
||||||
my_images_button = self.append_toolbar_button(self.toolbar,
|
my_images_button = self.append_toolbar_button(self.toolbar,
|
||||||
"My images",
|
"Images",
|
||||||
hic.ICON_IMAGES_DISPLAY_FILE,
|
hic.ICON_IMAGES_DISPLAY_FILE,
|
||||||
hic.ICON_IMAGES_HOVER_FILE,
|
hic.ICON_IMAGES_HOVER_FILE,
|
||||||
"Open images built out previously for running or deployment",
|
"Open previously built images",
|
||||||
self.my_images_button_clicked_cb)
|
self.my_images_button_clicked_cb)
|
||||||
settings_button = self.append_toolbar_button(self.toolbar,
|
settings_button = self.append_toolbar_button(self.toolbar,
|
||||||
"Settings",
|
"Settings",
|
||||||
hic.ICON_SETTINGS_DISPLAY_FILE,
|
hic.ICON_SETTINGS_DISPLAY_FILE,
|
||||||
hic.ICON_SETTINGS_HOVER_FILE,
|
hic.ICON_SETTINGS_HOVER_FILE,
|
||||||
"Other advanced settings for build",
|
"View additional build settings",
|
||||||
self.settings_button_clicked_cb)
|
self.settings_button_clicked_cb)
|
||||||
|
|
||||||
self.config_top_button = self.add_onto_top_bar(self.toolbar)
|
self.config_top_button = self.add_onto_top_bar(self.toolbar)
|
||||||
@@ -105,7 +109,7 @@ class ImageConfigurationPage (HobPage):
|
|||||||
self.set_config_machine_layout(show_progress_bar = False)
|
self.set_config_machine_layout(show_progress_bar = False)
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
def update_progress_bar(self, title, fraction, status=True):
|
def update_progress_bar(self, title, fraction, status=None):
|
||||||
self.progress_bar.update(fraction)
|
self.progress_bar.update(fraction)
|
||||||
self.progress_bar.set_title(title)
|
self.progress_bar.set_title(title)
|
||||||
self.progress_bar.set_rcstyle(status)
|
self.progress_bar.set_rcstyle(status)
|
||||||
@@ -133,16 +137,17 @@ class ImageConfigurationPage (HobPage):
|
|||||||
def create_config_machine(self):
|
def create_config_machine(self):
|
||||||
self.machine_title = gtk.Label()
|
self.machine_title = gtk.Label()
|
||||||
self.machine_title.set_alignment(0.0, 0.5)
|
self.machine_title.set_alignment(0.0, 0.5)
|
||||||
mark = "<span %s>Select a machine</span>" % self.span_tag('24px', 'bold')
|
mark = "<span %s>Select a machine</span>" % self.span_tag('x-large', 'bold')
|
||||||
self.machine_title.set_markup(mark)
|
self.machine_title.set_markup(mark)
|
||||||
|
|
||||||
self.machine_title_desc = gtk.Label()
|
self.machine_title_desc = gtk.Label()
|
||||||
self.machine_title_desc.set_alignment(0, 0.5)
|
self.machine_title_desc.set_alignment(0.0, 0.5)
|
||||||
mark = ("<span %s>This is the profile of the target machine for which you"
|
mark = ("<span %s>Your selection is the profile of the target machine for which you"
|
||||||
" are building the image.\n</span>") % (self.span_tag(px='14px'))
|
" are building the image.\n</span>") % (self.span_tag('medium'))
|
||||||
self.machine_title_desc.set_markup(mark)
|
self.machine_title_desc.set_markup(mark)
|
||||||
|
|
||||||
self.machine_combo = gtk.combo_box_new_text()
|
self.machine_combo = gtk.combo_box_new_text()
|
||||||
|
self.machine_combo.set_wrap_width(1)
|
||||||
self.machine_combo.connect("changed", self.machine_combo_changed_cb)
|
self.machine_combo.connect("changed", self.machine_combo_changed_cb)
|
||||||
|
|
||||||
icon_file = hic.ICON_LAYERS_DISPLAY_FILE
|
icon_file = hic.ICON_LAYERS_DISPLAY_FILE
|
||||||
@@ -154,8 +159,8 @@ class ImageConfigurationPage (HobPage):
|
|||||||
markup = "Layers are a powerful mechanism to extend the Yocto Project "
|
markup = "Layers are a powerful mechanism to extend the Yocto Project "
|
||||||
markup += "with your own functionality.\n"
|
markup += "with your own functionality.\n"
|
||||||
markup += "For more on layers, check the <a href=\""
|
markup += "For more on layers, check the <a href=\""
|
||||||
markup += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
|
markup += "http://www.yoctoproject.org/docs/current/dev-manual/"
|
||||||
markup += "poky-ref-manual.html#usingpoky-changes-layers\">reference manual</a>."
|
markup += "dev-manual.html#understanding-and-using-layers\">reference manual</a>."
|
||||||
self.layer_info_icon = HobInfoButton(markup, self.get_parent())
|
self.layer_info_icon = HobInfoButton(markup, self.get_parent())
|
||||||
|
|
||||||
self.progress_box = gtk.HBox(False, 6)
|
self.progress_box = gtk.HBox(False, 6)
|
||||||
@@ -170,37 +175,38 @@ class ImageConfigurationPage (HobPage):
|
|||||||
def set_config_machine_layout(self, show_progress_bar = False):
|
def set_config_machine_layout(self, show_progress_bar = False):
|
||||||
self.gtable.attach(self.machine_title, 0, 40, 0, 4)
|
self.gtable.attach(self.machine_title, 0, 40, 0, 4)
|
||||||
self.gtable.attach(self.machine_title_desc, 0, 40, 4, 6)
|
self.gtable.attach(self.machine_title_desc, 0, 40, 4, 6)
|
||||||
self.gtable.attach(self.machine_combo, 0, 12, 6, 9)
|
self.gtable.attach(self.machine_combo, 0, 12, 7, 10)
|
||||||
self.gtable.attach(self.layer_button, 12, 36, 6, 11)
|
self.gtable.attach(self.layer_button, 14, 36, 7, 12)
|
||||||
self.gtable.attach(self.layer_info_icon, 36, 40, 6, 10)
|
self.gtable.attach(self.layer_info_icon, 36, 40, 7, 11)
|
||||||
if show_progress_bar:
|
if show_progress_bar:
|
||||||
self.gtable.attach(self.progress_box, 0, 40, 13, 17)
|
self.gtable.attach(self.progress_box, 0, 40, 15, 19)
|
||||||
self.gtable.attach(self.machine_separator, 0, 40, 12, 13)
|
self.gtable.attach(self.machine_separator, 0, 40, 13, 14)
|
||||||
|
|
||||||
def create_config_baseimg(self):
|
def create_config_baseimg(self):
|
||||||
self.image_title = gtk.Label()
|
self.image_title = gtk.Label()
|
||||||
self.image_title.set_alignment(0, 1.0)
|
self.image_title.set_alignment(0, 1.0)
|
||||||
mark = "<span %s>Select a base image</span>" % self.span_tag('24px', 'bold')
|
mark = "<span %s>Select a base image</span>" % self.span_tag('x-large', 'bold')
|
||||||
self.image_title.set_markup(mark)
|
self.image_title.set_markup(mark)
|
||||||
|
|
||||||
self.image_title_desc = gtk.Label()
|
self.image_title_desc = gtk.Label()
|
||||||
self.image_title_desc.set_alignment(0, 0.5)
|
self.image_title_desc.set_alignment(0, 0.5)
|
||||||
mark = ("<span %s>Base images are a starting point for the type of image you want. "
|
mark = ("<span %s>Base images are a starting point for the type of image you want. "
|
||||||
"You can build them as \n"
|
"You can build them as \n"
|
||||||
"they are or customize them to your specific needs.\n</span>") % self.span_tag('14px')
|
"they are or customize them to your specific needs.\n</span>") % self.span_tag('medium')
|
||||||
self.image_title_desc.set_markup(mark)
|
self.image_title_desc.set_markup(mark)
|
||||||
|
|
||||||
self.image_combo = gtk.combo_box_new_text()
|
self.image_combo = gtk.combo_box_new_text()
|
||||||
|
self.image_combo.set_wrap_width(1)
|
||||||
self.image_combo_id = self.image_combo.connect("changed", self.image_combo_changed_cb)
|
self.image_combo_id = self.image_combo.connect("changed", self.image_combo_changed_cb)
|
||||||
|
|
||||||
self.image_desc = gtk.Label()
|
self.image_desc = gtk.Label()
|
||||||
self.image_desc.set_alignment(0, 0.5)
|
self.image_desc.set_alignment(0.0, 0.5)
|
||||||
self.image_desc.set_line_wrap(True)
|
self.image_desc.set_line_wrap(True)
|
||||||
|
|
||||||
# button to view recipes
|
# button to view recipes
|
||||||
icon_file = hic.ICON_RCIPE_DISPLAY_FILE
|
icon_file = hic.ICON_RCIPE_DISPLAY_FILE
|
||||||
hover_file = hic.ICON_RCIPE_HOVER_FILE
|
hover_file = hic.ICON_RCIPE_HOVER_FILE
|
||||||
self.view_recipes_button = HobImageButton("View Recipes",
|
self.view_recipes_button = HobImageButton("View recipes",
|
||||||
"Add/remove recipes and tasks",
|
"Add/remove recipes and tasks",
|
||||||
icon_file, hover_file)
|
icon_file, hover_file)
|
||||||
self.view_recipes_button.connect("clicked", self.view_recipes_button_clicked_cb)
|
self.view_recipes_button.connect("clicked", self.view_recipes_button_clicked_cb)
|
||||||
@@ -208,7 +214,7 @@ class ImageConfigurationPage (HobPage):
|
|||||||
# button to view packages
|
# button to view packages
|
||||||
icon_file = hic.ICON_PACKAGES_DISPLAY_FILE
|
icon_file = hic.ICON_PACKAGES_DISPLAY_FILE
|
||||||
hover_file = hic.ICON_PACKAGES_HOVER_FILE
|
hover_file = hic.ICON_PACKAGES_HOVER_FILE
|
||||||
self.view_packages_button = HobImageButton("View Packages",
|
self.view_packages_button = HobImageButton("View packages",
|
||||||
"Add/remove previously built packages",
|
"Add/remove previously built packages",
|
||||||
icon_file, hover_file)
|
icon_file, hover_file)
|
||||||
self.view_packages_button.connect("clicked", self.view_packages_button_clicked_cb)
|
self.view_packages_button.connect("clicked", self.view_packages_button_clicked_cb)
|
||||||
@@ -216,24 +222,24 @@ class ImageConfigurationPage (HobPage):
|
|||||||
self.image_separator = gtk.HSeparator()
|
self.image_separator = gtk.HSeparator()
|
||||||
|
|
||||||
def set_config_baseimg_layout(self):
|
def set_config_baseimg_layout(self):
|
||||||
self.gtable.attach(self.image_title, 0, 40, 13, 17)
|
self.gtable.attach(self.image_title, 0, 40, 15, 17)
|
||||||
self.gtable.attach(self.image_title_desc, 0, 40, 18, 23)
|
self.gtable.attach(self.image_title_desc, 0, 40, 18, 22)
|
||||||
self.gtable.attach(self.image_combo, 0, 12, 24, 27)
|
self.gtable.attach(self.image_combo, 0, 12, 23, 26)
|
||||||
self.gtable.attach(self.image_desc, 14, 38, 24, 29)
|
self.gtable.attach(self.image_desc, 13, 38, 23, 28)
|
||||||
self.gtable.attach(self.image_separator, 0, 40, 35, 36)
|
self.gtable.attach(self.image_separator, 0, 40, 35, 36)
|
||||||
|
|
||||||
def set_rcppkg_layout(self):
|
def set_rcppkg_layout(self):
|
||||||
self.gtable.attach(self.view_recipes_button, 0, 20, 30, 35)
|
self.gtable.attach(self.view_recipes_button, 0, 20, 28, 33)
|
||||||
self.gtable.attach(self.view_packages_button, 20, 40, 30, 35)
|
self.gtable.attach(self.view_packages_button, 20, 40, 28, 33)
|
||||||
|
|
||||||
def create_config_build_button(self):
|
def create_config_build_button(self):
|
||||||
# Create the "Build packages" and "Just bake" buttons at the bottom
|
# Create the "Build packages" and "Build image" buttons at the bottom
|
||||||
button_box = gtk.HBox(False, 6)
|
button_box = gtk.HBox(False, 6)
|
||||||
|
|
||||||
# create button "Just bake"
|
# create button "Build image"
|
||||||
just_bake_button = HobButton("Just bake")
|
just_bake_button = HobButton("Build image")
|
||||||
just_bake_button.set_size_request(205, 49)
|
just_bake_button.set_size_request(205, 49)
|
||||||
just_bake_button.set_tooltip_text("Build image to get your target image")
|
just_bake_button.set_tooltip_text("Build target image")
|
||||||
just_bake_button.connect("clicked", self.just_bake_button_clicked_cb)
|
just_bake_button.connect("clicked", self.just_bake_button_clicked_cb)
|
||||||
button_box.pack_end(just_bake_button, expand=False, fill=False)
|
button_box.pack_end(just_bake_button, expand=False, fill=False)
|
||||||
|
|
||||||
@@ -241,14 +247,15 @@ class ImageConfigurationPage (HobPage):
|
|||||||
button_box.pack_end(label, expand=False, fill=False)
|
button_box.pack_end(label, expand=False, fill=False)
|
||||||
|
|
||||||
# create button "Build Packages"
|
# create button "Build Packages"
|
||||||
build_packages_button = HobAltButton("Build Packages")
|
build_packages_button = HobAltButton("Build packages")
|
||||||
build_packages_button.connect("clicked", self.build_packages_button_clicked_cb)
|
build_packages_button.connect("clicked", self.build_packages_button_clicked_cb)
|
||||||
|
build_packages_button.set_tooltip_text("Build recipes into packages")
|
||||||
button_box.pack_end(build_packages_button, expand=False, fill=False)
|
button_box.pack_end(build_packages_button, expand=False, fill=False)
|
||||||
|
|
||||||
return button_box
|
return button_box
|
||||||
|
|
||||||
def stop_button_clicked_cb(self, button):
|
def stop_button_clicked_cb(self, button):
|
||||||
self.builder.stop_parse()
|
self.builder.cancel_parse_sync()
|
||||||
|
|
||||||
def machine_combo_changed_cb(self, machine_combo):
|
def machine_combo_changed_cb(self, machine_combo):
|
||||||
combo_item = machine_combo.get_active_text()
|
combo_item = machine_combo.get_active_text()
|
||||||
@@ -256,8 +263,13 @@ class ImageConfigurationPage (HobPage):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.builder.configuration.curr_mach = combo_item
|
self.builder.configuration.curr_mach = combo_item
|
||||||
|
if self.machine_combo_changed_by_manual:
|
||||||
|
self.builder.configuration.clear_selection()
|
||||||
|
# reset machine_combo_changed_by_manual
|
||||||
|
self.machine_combo_changed_by_manual = True
|
||||||
|
|
||||||
# Do reparse recipes
|
# Do reparse recipes
|
||||||
self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
|
self.builder.populate_recipe_package_info_async()
|
||||||
|
|
||||||
def update_machine_combo(self):
|
def update_machine_combo(self):
|
||||||
all_machines = self.builder.parameters.all_machines
|
all_machines = self.builder.parameters.all_machines
|
||||||
@@ -269,6 +281,7 @@ class ImageConfigurationPage (HobPage):
|
|||||||
self.machine_combo.set_active(-1)
|
self.machine_combo.set_active(-1)
|
||||||
|
|
||||||
def switch_machine_combo(self):
|
def switch_machine_combo(self):
|
||||||
|
self.machine_combo_changed_by_manual = False
|
||||||
model = self.machine_combo.get_model()
|
model = self.machine_combo.get_model()
|
||||||
active = 0
|
active = 0
|
||||||
while active < len(model):
|
while active < len(model):
|
||||||
@@ -278,6 +291,16 @@ class ImageConfigurationPage (HobPage):
|
|||||||
active += 1
|
active += 1
|
||||||
self.machine_combo.set_active(-1)
|
self.machine_combo.set_active(-1)
|
||||||
|
|
||||||
|
def update_image_desc(self, selected_image):
|
||||||
|
desc = ""
|
||||||
|
if selected_image and selected_image in self.builder.recipe_model.pn_path.keys():
|
||||||
|
image_path = self.builder.recipe_model.pn_path[selected_image]
|
||||||
|
image_iter = self.builder.recipe_model.get_iter(image_path)
|
||||||
|
desc = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_DESC)
|
||||||
|
|
||||||
|
mark = ("<span %s>%s</span>\n") % (self.span_tag('small'), desc)
|
||||||
|
self.image_desc.set_markup(mark)
|
||||||
|
|
||||||
def image_combo_changed_idle_cb(self, selected_image, selected_recipes, selected_packages):
|
def image_combo_changed_idle_cb(self, selected_image, selected_recipes, selected_packages):
|
||||||
self.builder.update_recipe_model(selected_image, selected_recipes)
|
self.builder.update_recipe_model(selected_image, selected_recipes)
|
||||||
self.builder.update_package_model(selected_packages)
|
self.builder.update_package_model(selected_packages)
|
||||||
@@ -289,14 +312,14 @@ class ImageConfigurationPage (HobPage):
|
|||||||
if not selected_image:
|
if not selected_image:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self.builder.customized = False
|
||||||
|
|
||||||
selected_recipes = []
|
selected_recipes = []
|
||||||
|
|
||||||
image_path = self.builder.recipe_model.pn_path[selected_image]
|
image_path = self.builder.recipe_model.pn_path[selected_image]
|
||||||
image_iter = self.builder.recipe_model.get_iter(image_path)
|
image_iter = self.builder.recipe_model.get_iter(image_path)
|
||||||
selected_packages = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_INSTALL).split()
|
selected_packages = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_INSTALL).split()
|
||||||
|
self.update_image_desc(selected_image)
|
||||||
mark = ("<span %s>%s</span>\n") % (self.span_tag('14px'), self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_DESC))
|
|
||||||
self.image_desc.set_markup(mark)
|
|
||||||
|
|
||||||
self.builder.recipe_model.reset()
|
self.builder.recipe_model.reset()
|
||||||
self.builder.package_model.reset()
|
self.builder.package_model.reset()
|
||||||
@@ -338,11 +361,17 @@ class ImageConfigurationPage (HobPage):
|
|||||||
active = cnt
|
active = cnt
|
||||||
cnt = cnt + 1
|
cnt = cnt + 1
|
||||||
self.image_combo.append_text(self.builder.recipe_model.__dummy_image__)
|
self.image_combo.append_text(self.builder.recipe_model.__dummy_image__)
|
||||||
self._image_combo_connect_signal()
|
if selected_image == self.builder.recipe_model.__dummy_image__:
|
||||||
|
active = cnt
|
||||||
|
|
||||||
self.image_combo.set_active(-1)
|
self.image_combo.set_active(-1)
|
||||||
self.image_combo.set_active(active)
|
self.image_combo.set_active(active)
|
||||||
|
|
||||||
|
if active != -1:
|
||||||
|
self.show_baseimg_selected()
|
||||||
|
|
||||||
|
self._image_combo_connect_signal()
|
||||||
|
|
||||||
def layer_button_clicked_cb(self, button):
|
def layer_button_clicked_cb(self, button):
|
||||||
# Create a layer selection dialog
|
# Create a layer selection dialog
|
||||||
self.builder.show_layer_selection_dialog()
|
self.builder.show_layer_selection_dialog()
|
||||||
@@ -360,11 +389,19 @@ class ImageConfigurationPage (HobPage):
|
|||||||
self.builder.build_packages()
|
self.builder.build_packages()
|
||||||
|
|
||||||
def template_button_clicked_cb(self, button):
|
def template_button_clicked_cb(self, button):
|
||||||
self.builder.show_load_template_dialog()
|
response, path = self.builder.show_load_template_dialog()
|
||||||
|
if not response:
|
||||||
|
return
|
||||||
|
if path:
|
||||||
|
self.builder.load_template(path)
|
||||||
|
|
||||||
def my_images_button_clicked_cb(self, button):
|
def my_images_button_clicked_cb(self, button):
|
||||||
self.builder.show_load_my_images_dialog()
|
self.builder.show_load_my_images_dialog()
|
||||||
|
|
||||||
def settings_button_clicked_cb(self, button):
|
def settings_button_clicked_cb(self, button):
|
||||||
# Create an advanced settings dialog
|
# Create an advanced settings dialog
|
||||||
self.builder.show_adv_settings_dialog()
|
response, settings_changed = self.builder.show_adv_settings_dialog()
|
||||||
|
if not response:
|
||||||
|
return
|
||||||
|
if settings_changed:
|
||||||
|
self.builder.reparse_post_adv_settings()
|
||||||
|
|||||||
@@ -113,6 +113,8 @@ class ImageDetailsPage (HobPage):
|
|||||||
super(ImageDetailsPage, self).__init__(builder, "Image details")
|
super(ImageDetailsPage, self).__init__(builder, "Image details")
|
||||||
|
|
||||||
self.image_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_BOOLEAN)
|
self.image_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_BOOLEAN)
|
||||||
|
self.button_ids = {}
|
||||||
|
self.details_bottom_buttons = gtk.HBox(False, 6)
|
||||||
self.create_visual_elements()
|
self.create_visual_elements()
|
||||||
|
|
||||||
def create_visual_elements(self):
|
def create_visual_elements(self):
|
||||||
@@ -122,12 +124,24 @@ class ImageDetailsPage (HobPage):
|
|||||||
self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
|
self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
|
||||||
self.toolbar.set_style(gtk.TOOLBAR_BOTH)
|
self.toolbar.set_style(gtk.TOOLBAR_BOTH)
|
||||||
|
|
||||||
|
template_button = self.append_toolbar_button(self.toolbar,
|
||||||
|
"Templates",
|
||||||
|
hic.ICON_TEMPLATES_DISPLAY_FILE,
|
||||||
|
hic.ICON_TEMPLATES_HOVER_FILE,
|
||||||
|
"Load a previously saved template",
|
||||||
|
self.template_button_clicked_cb)
|
||||||
my_images_button = self.append_toolbar_button(self.toolbar,
|
my_images_button = self.append_toolbar_button(self.toolbar,
|
||||||
"My images",
|
"Images",
|
||||||
hic.ICON_IMAGES_DISPLAY_FILE,
|
hic.ICON_IMAGES_DISPLAY_FILE,
|
||||||
hic.ICON_IMAGES_HOVER_FILE,
|
hic.ICON_IMAGES_HOVER_FILE,
|
||||||
"Open images built out previously for running or deployment",
|
"Open previously built images",
|
||||||
self.my_images_button_clicked_cb)
|
self.my_images_button_clicked_cb)
|
||||||
|
settings_button = self.append_toolbar_button(self.toolbar,
|
||||||
|
"Settings",
|
||||||
|
hic.ICON_SETTINGS_DISPLAY_FILE,
|
||||||
|
hic.ICON_SETTINGS_HOVER_FILE,
|
||||||
|
"View additional build settings",
|
||||||
|
self.settings_button_clicked_cb)
|
||||||
|
|
||||||
self.details_top_buttons = self.add_onto_top_bar(self.toolbar)
|
self.details_top_buttons = self.add_onto_top_bar(self.toolbar)
|
||||||
|
|
||||||
@@ -138,15 +152,9 @@ class ImageDetailsPage (HobPage):
|
|||||||
children = self.box_group_area.get_children() or []
|
children = self.box_group_area.get_children() or []
|
||||||
for child in children:
|
for child in children:
|
||||||
self.box_group_area.remove(child)
|
self.box_group_area.remove(child)
|
||||||
|
children = self.details_bottom_buttons.get_children() or []
|
||||||
def _size_to_string(self, size):
|
for child in children:
|
||||||
if len(str(int(size))) > 6:
|
self.details_bottom_buttons.remove(child)
|
||||||
size_str = '%.1f' % (size*1.0/(1024*1024)) + ' MB'
|
|
||||||
elif len(str(int(size))) > 3:
|
|
||||||
size_str = '%.1f' % (size*1.0/1024) + ' KB'
|
|
||||||
else:
|
|
||||||
size_str = str(size) + ' B'
|
|
||||||
return size_str
|
|
||||||
|
|
||||||
def show_page(self, step):
|
def show_page(self, step):
|
||||||
build_succeeded = (step == self.builder.IMAGE_GENERATED)
|
build_succeeded = (step == self.builder.IMAGE_GENERATED)
|
||||||
@@ -160,10 +168,15 @@ class ImageDetailsPage (HobPage):
|
|||||||
else:
|
else:
|
||||||
pkg_num = "N/A"
|
pkg_num = "N/A"
|
||||||
|
|
||||||
|
# remove
|
||||||
|
for button_id, button in self.button_ids.items():
|
||||||
|
button.disconnect(button_id)
|
||||||
self._remove_all_widget()
|
self._remove_all_widget()
|
||||||
|
# repack
|
||||||
self.pack_start(self.details_top_buttons, expand=False, fill=False)
|
self.pack_start(self.details_top_buttons, expand=False, fill=False)
|
||||||
self.pack_start(self.group_align, expand=True, fill=True)
|
self.pack_start(self.group_align, expand=True, fill=True)
|
||||||
|
|
||||||
|
self.build_result = None
|
||||||
if build_succeeded:
|
if build_succeeded:
|
||||||
# building is the previous step
|
# building is the previous step
|
||||||
icon = gtk.Image()
|
icon = gtk.Image()
|
||||||
@@ -173,26 +186,48 @@ class ImageDetailsPage (HobPage):
|
|||||||
icon.set_from_pixbuf(pix_buffer)
|
icon.set_from_pixbuf(pix_buffer)
|
||||||
varlist = [""]
|
varlist = [""]
|
||||||
vallist = ["Your image is ready"]
|
vallist = ["Your image is ready"]
|
||||||
build_result = self.DetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
|
self.build_result = self.DetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
|
||||||
self.box_group_area.pack_start(build_result, expand=False, fill=False)
|
self.box_group_area.pack_start(self.build_result, expand=False, fill=False)
|
||||||
|
|
||||||
|
# create the buttons at the bottom first because the buttons are used in apply_button_per_image()
|
||||||
|
if build_succeeded:
|
||||||
|
self.buttonlist = ["Build new image", "Save as template", "Run image", "Deploy image"]
|
||||||
|
else: # get to this page from "My images"
|
||||||
|
self.buttonlist = ["Build new image", "Run image", "Deploy image"]
|
||||||
|
|
||||||
# Name
|
# Name
|
||||||
self.image_store.clear()
|
self.image_store.clear()
|
||||||
|
default_toggled = False
|
||||||
|
default_image_size = 0
|
||||||
|
i = 0
|
||||||
for image_name in image_names:
|
for image_name in image_names:
|
||||||
image_size = self._size_to_string(os.stat(os.path.join(image_addr, image_name)).st_size)
|
image_size = HobPage._size_to_string(os.stat(os.path.join(image_addr, image_name)).st_size)
|
||||||
self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, False)
|
if not default_toggled:
|
||||||
|
default_toggled = (self.test_type_runnable(image_name) and self.test_mach_runnable(image_name)) \
|
||||||
|
or self.test_deployable(image_name)
|
||||||
|
if i == (len(image_names) - 1):
|
||||||
|
default_toggled = True
|
||||||
|
self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, default_toggled)
|
||||||
|
if default_toggled:
|
||||||
|
default_image_size = image_size
|
||||||
|
self.create_bottom_buttons(self.buttonlist, image_name)
|
||||||
|
else:
|
||||||
|
self.image_store.set(self.image_store.append(), 0, image_name, 1, image_size, 2, False)
|
||||||
|
i = i + 1
|
||||||
image_table = HobViewTable(self.__columns__)
|
image_table = HobViewTable(self.__columns__)
|
||||||
image_table.set_model(self.image_store)
|
image_table.set_model(self.image_store)
|
||||||
image_size = self._size_to_string(os.stat(os.path.join(image_addr, image_names[0])).st_size)
|
|
||||||
image_table.connect("toggled", self.toggled_cb)
|
image_table.connect("toggled", self.toggled_cb)
|
||||||
view_files_button = HobAltButton("View files")
|
view_files_button = HobAltButton("View files")
|
||||||
view_files_button.connect("clicked", self.view_files_clicked_cb, image_addr)
|
view_files_button.connect("clicked", self.view_files_clicked_cb, image_addr)
|
||||||
self.box_group_area.pack_start(self.DetailBox(widget=image_table, button=view_files_button), expand=True, fill=True)
|
view_files_button.set_tooltip_text("Open the directory containing the image files")
|
||||||
|
self.image_detail = self.DetailBox(widget=image_table, button=view_files_button)
|
||||||
|
self.box_group_area.pack_start(self.image_detail, expand=True, fill=True)
|
||||||
|
|
||||||
# Machine, Base image and Layers
|
# Machine, Base image and Layers
|
||||||
layer_num_limit = 15
|
layer_num_limit = 15
|
||||||
varlist = ["Machine: ", "Base image: ", "Layers: "]
|
varlist = ["Machine: ", "Base image: ", "Layers: "]
|
||||||
vallist = []
|
vallist = []
|
||||||
|
self.setting_detail = None
|
||||||
if build_succeeded:
|
if build_succeeded:
|
||||||
vallist.append(machine)
|
vallist.append(machine)
|
||||||
vallist.append(base_image)
|
vallist.append(base_image)
|
||||||
@@ -214,29 +249,27 @@ class ImageDetailsPage (HobPage):
|
|||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
edit_config_button = HobAltButton("Edit configuration")
|
edit_config_button = HobAltButton("Edit configuration")
|
||||||
|
edit_config_button.set_tooltip_text("Edit machine, base image and recipes")
|
||||||
edit_config_button.connect("clicked", self.edit_config_button_clicked_cb)
|
edit_config_button.connect("clicked", self.edit_config_button_clicked_cb)
|
||||||
setting_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_config_button)
|
self.setting_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_config_button)
|
||||||
self.box_group_area.pack_start(setting_detail, expand=False, fill=False)
|
self.box_group_area.pack_start(self.setting_detail, expand=False, fill=False)
|
||||||
|
|
||||||
# Packages included, and Total image size
|
# Packages included, and Total image size
|
||||||
varlist = ["Packages included: ", "Total image size: "]
|
varlist = ["Packages included: ", "Total image size: "]
|
||||||
vallist = []
|
vallist = []
|
||||||
vallist.append(pkg_num)
|
vallist.append(pkg_num)
|
||||||
vallist.append(image_size)
|
vallist.append(default_image_size)
|
||||||
if build_succeeded:
|
if build_succeeded:
|
||||||
edit_packages_button = HobAltButton("Edit packages")
|
edit_packages_button = HobAltButton("Edit packages")
|
||||||
|
edit_packages_button.set_tooltip_text("Edit the packages included in your image")
|
||||||
edit_packages_button.connect("clicked", self.edit_packages_button_clicked_cb)
|
edit_packages_button.connect("clicked", self.edit_packages_button_clicked_cb)
|
||||||
else: # get to this page from "My images"
|
else: # get to this page from "My images"
|
||||||
edit_packages_button = None
|
edit_packages_button = None
|
||||||
self.package_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_packages_button)
|
self.package_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_packages_button)
|
||||||
self.box_group_area.pack_start(self.package_detail, expand=False, fill=False)
|
self.box_group_area.pack_start(self.package_detail, expand=False, fill=False)
|
||||||
|
|
||||||
if build_succeeded:
|
# pack the buttons at the bottom, at this time they are already created.
|
||||||
buttonlist = ["Build new image", "Save as template", "Run image", "Deploy image"]
|
self.box_group_area.pack_end(self.details_bottom_buttons, expand=False, fill=False)
|
||||||
else: # get to this page from "My images"
|
|
||||||
buttonlist = ["Build new image", "Run image", "Deploy image"]
|
|
||||||
details_bottom_buttons = self.create_bottom_buttons(buttonlist)
|
|
||||||
self.box_group_area.pack_end(details_bottom_buttons, expand=False, fill=False)
|
|
||||||
|
|
||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
@@ -246,6 +279,30 @@ class ImageDetailsPage (HobPage):
|
|||||||
def refresh_package_detail_box(self, image_size):
|
def refresh_package_detail_box(self, image_size):
|
||||||
self.package_detail.update_line_widgets("Total image size: ", image_size)
|
self.package_detail.update_line_widgets("Total image size: ", image_size)
|
||||||
|
|
||||||
|
def test_type_runnable(self, image_name):
|
||||||
|
type_runnable = False
|
||||||
|
for t in self.builder.parameters.runnable_image_types:
|
||||||
|
if image_name.endswith(t):
|
||||||
|
type_runnable = True
|
||||||
|
break
|
||||||
|
return type_runnable
|
||||||
|
|
||||||
|
def test_mach_runnable(self, image_name):
|
||||||
|
mach_runnable = False
|
||||||
|
for t in self.builder.parameters.runnable_machine_patterns:
|
||||||
|
if t in image_name:
|
||||||
|
mach_runnable = True
|
||||||
|
break
|
||||||
|
return mach_runnable
|
||||||
|
|
||||||
|
def test_deployable(self, image_name):
|
||||||
|
deployable = False
|
||||||
|
for t in self.builder.parameters.deployable_image_types:
|
||||||
|
if image_name.endswith(t):
|
||||||
|
deployable = True
|
||||||
|
break
|
||||||
|
return deployable
|
||||||
|
|
||||||
def toggled_cb(self, table, cell, path, columnid, tree):
|
def toggled_cb(self, table, cell, path, columnid, tree):
|
||||||
model = tree.get_model()
|
model = tree.get_model()
|
||||||
if not model:
|
if not model:
|
||||||
@@ -259,80 +316,97 @@ class ImageDetailsPage (HobPage):
|
|||||||
model[path][columnid] = True
|
model[path][columnid] = True
|
||||||
self.refresh_package_detail_box(model[path][1])
|
self.refresh_package_detail_box(model[path][1])
|
||||||
|
|
||||||
type_runnable = False
|
|
||||||
mach_runnable = False
|
|
||||||
image_name = model[path][0]
|
image_name = model[path][0]
|
||||||
for t in self.builder.parameters.runnable_image_types:
|
|
||||||
if image_name.endswith(t):
|
|
||||||
type_runnable = True
|
|
||||||
break
|
|
||||||
|
|
||||||
for t in self.builder.parameters.runnable_machine_patterns:
|
# remove
|
||||||
if t in image_name:
|
for button_id, button in self.button_ids.items():
|
||||||
mach_runnable = True
|
button.disconnect(button_id)
|
||||||
break
|
self._remove_all_widget()
|
||||||
|
# repack
|
||||||
|
self.pack_start(self.details_top_buttons, expand=False, fill=False)
|
||||||
|
self.pack_start(self.group_align, expand=True, fill=True)
|
||||||
|
if self.build_result:
|
||||||
|
self.box_group_area.pack_start(self.build_result, expand=False, fill=False)
|
||||||
|
self.box_group_area.pack_start(self.image_detail, expand=True, fill=True)
|
||||||
|
if self.setting_detail:
|
||||||
|
self.box_group_area.pack_start(self.setting_detail, expand=False, fill=False)
|
||||||
|
self.box_group_area.pack_start(self.package_detail, expand=False, fill=False)
|
||||||
|
self.create_bottom_buttons(self.buttonlist, image_name)
|
||||||
|
self.box_group_area.pack_end(self.details_bottom_buttons, expand=False, fill=False)
|
||||||
|
self.show_all()
|
||||||
|
|
||||||
self.run_button.set_sensitive(type_runnable and mach_runnable)
|
def create_bottom_buttons(self, buttonlist, image_name):
|
||||||
|
|
||||||
deployable = False
|
|
||||||
for t in self.builder.parameters.deployable_image_types:
|
|
||||||
if image_name.endswith(t):
|
|
||||||
deployable = True
|
|
||||||
break
|
|
||||||
|
|
||||||
self.deploy_button.set_sensitive(deployable)
|
|
||||||
|
|
||||||
def create_bottom_buttons(self, buttonlist):
|
|
||||||
# Create the buttons at the bottom
|
# Create the buttons at the bottom
|
||||||
bottom_buttons = gtk.HBox(False, 6)
|
|
||||||
created = False
|
created = False
|
||||||
|
packed = False
|
||||||
|
self.button_ids = {}
|
||||||
|
|
||||||
# create button "Deploy image"
|
# create button "Deploy image"
|
||||||
name = "Deploy image"
|
name = "Deploy image"
|
||||||
if name in buttonlist:
|
if name in buttonlist and self.test_deployable(image_name):
|
||||||
self.deploy_button = HobButton('Deploy image')
|
deploy_button = HobButton('Deploy image')
|
||||||
self.deploy_button.set_size_request(205, 49)
|
deploy_button.set_size_request(205, 49)
|
||||||
self.deploy_button.set_tooltip_text("Deploy image to get your target board")
|
deploy_button.set_tooltip_text("Burn a live image to a USB drive or flash memory")
|
||||||
self.deploy_button.set_flags(gtk.CAN_DEFAULT)
|
deploy_button.set_flags(gtk.CAN_DEFAULT)
|
||||||
self.deploy_button.grab_default()
|
button_id = deploy_button.connect("clicked", self.deploy_button_clicked_cb)
|
||||||
self.deploy_button.connect("clicked", self.deploy_button_clicked_cb)
|
self.button_ids[button_id] = deploy_button
|
||||||
bottom_buttons.pack_end(self.deploy_button, expand=False, fill=False)
|
self.details_bottom_buttons.pack_end(deploy_button, expand=False, fill=False)
|
||||||
created = True
|
created = True
|
||||||
|
packed = True
|
||||||
|
|
||||||
name = "Run image"
|
name = "Run image"
|
||||||
if name in buttonlist:
|
if name in buttonlist and self.test_type_runnable(image_name) and self.test_mach_runnable(image_name):
|
||||||
if created == True:
|
if created == True:
|
||||||
# separator
|
# separator
|
||||||
label = gtk.Label(" or ")
|
label = gtk.Label(" or ")
|
||||||
bottom_buttons.pack_end(label, expand=False, fill=False)
|
self.details_bottom_buttons.pack_end(label, expand=False, fill=False)
|
||||||
|
|
||||||
# create button "Run image"
|
# create button "Run image"
|
||||||
self.run_button = HobAltButton("Run image")
|
run_button = HobAltButton("Run image")
|
||||||
self.run_button.connect("clicked", self.run_button_clicked_cb)
|
else:
|
||||||
bottom_buttons.pack_end(self.run_button, expand=False, fill=False)
|
# create button "Run image" as the primary button
|
||||||
|
run_button = HobButton("Run image")
|
||||||
|
run_button.set_size_request(205, 49)
|
||||||
|
run_button.set_flags(gtk.CAN_DEFAULT)
|
||||||
|
packed = True
|
||||||
|
run_button.set_tooltip_text("Start up an image with qemu emulator")
|
||||||
|
button_id = run_button.connect("clicked", self.run_button_clicked_cb)
|
||||||
|
self.button_ids[button_id] = run_button
|
||||||
|
self.details_bottom_buttons.pack_end(run_button, expand=False, fill=False)
|
||||||
created = True
|
created = True
|
||||||
|
|
||||||
|
if not packed:
|
||||||
|
box = gtk.HBox(False, 6)
|
||||||
|
box.show()
|
||||||
|
subbox = gtk.HBox(False, 0)
|
||||||
|
subbox.set_size_request(205, 49)
|
||||||
|
subbox.show()
|
||||||
|
box.add(subbox)
|
||||||
|
self.details_bottom_buttons.pack_end(box, False, False)
|
||||||
|
|
||||||
name = "Save as template"
|
name = "Save as template"
|
||||||
if name in buttonlist:
|
if name in buttonlist:
|
||||||
if created == True:
|
if created == True:
|
||||||
# separator
|
# separator
|
||||||
label = gtk.Label(" or ")
|
label = gtk.Label(" or ")
|
||||||
bottom_buttons.pack_end(label, expand=False, fill=False)
|
self.details_bottom_buttons.pack_end(label, expand=False, fill=False)
|
||||||
|
|
||||||
# create button "Save as template"
|
# create button "Save as template"
|
||||||
save_button = HobAltButton("Save as template")
|
save_button = HobAltButton("Save as template")
|
||||||
save_button.connect("clicked", self.save_button_clicked_cb)
|
save_button.set_tooltip_text("Save the image configuration for reuse")
|
||||||
bottom_buttons.pack_end(save_button, expand=False, fill=False)
|
button_id = save_button.connect("clicked", self.save_button_clicked_cb)
|
||||||
|
self.button_ids[button_id] = save_button
|
||||||
|
self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False)
|
||||||
create = True
|
create = True
|
||||||
|
|
||||||
name = "Build new image"
|
name = "Build new image"
|
||||||
if name in buttonlist:
|
if name in buttonlist:
|
||||||
# create button "Build new image"
|
# create button "Build new image"
|
||||||
build_new_button = HobAltButton("Build new image")
|
build_new_button = HobAltButton("Build new image")
|
||||||
build_new_button.connect("clicked", self.build_new_button_clicked_cb)
|
build_new_button.set_tooltip_text("Create a new image from scratch")
|
||||||
bottom_buttons.pack_start(build_new_button, expand=False, fill=False)
|
button_id = build_new_button.connect("clicked", self.build_new_button_clicked_cb)
|
||||||
|
self.button_ids[button_id] = build_new_button
|
||||||
return bottom_buttons
|
self.details_bottom_buttons.pack_start(build_new_button, expand=False, fill=False)
|
||||||
|
|
||||||
def _get_selected_image(self):
|
def _get_selected_image(self):
|
||||||
image_name = ""
|
image_name = ""
|
||||||
@@ -358,7 +432,7 @@ class ImageDetailsPage (HobPage):
|
|||||||
self.builder.runqemu_image(image_name)
|
self.builder.runqemu_image(image_name)
|
||||||
|
|
||||||
def build_new_button_clicked_cb(self, button):
|
def build_new_button_clicked_cb(self, button):
|
||||||
self.builder.initiate_new_build()
|
self.builder.initiate_new_build_async()
|
||||||
|
|
||||||
def edit_config_button_clicked_cb(self, button):
|
def edit_config_button_clicked_cb(self, button):
|
||||||
self.builder.show_configuration()
|
self.builder.show_configuration()
|
||||||
@@ -366,5 +440,20 @@ class ImageDetailsPage (HobPage):
|
|||||||
def edit_packages_button_clicked_cb(self, button):
|
def edit_packages_button_clicked_cb(self, button):
|
||||||
self.builder.show_packages(ask=False)
|
self.builder.show_packages(ask=False)
|
||||||
|
|
||||||
|
def template_button_clicked_cb(self, button):
|
||||||
|
response, path = self.builder.show_load_template_dialog()
|
||||||
|
if not response:
|
||||||
|
return
|
||||||
|
if path:
|
||||||
|
self.builder.load_template(path)
|
||||||
|
|
||||||
def my_images_button_clicked_cb(self, button):
|
def my_images_button_clicked_cb(self, button):
|
||||||
self.builder.show_load_my_images_dialog()
|
self.builder.show_load_my_images_dialog()
|
||||||
|
|
||||||
|
def settings_button_clicked_cb(self, button):
|
||||||
|
# Create an advanced settings dialog
|
||||||
|
response, settings_changed = self.builder.show_adv_settings_dialog()
|
||||||
|
if not response:
|
||||||
|
return
|
||||||
|
if settings_changed:
|
||||||
|
self.builder.reparse_post_adv_settings()
|
||||||
|
|||||||
@@ -37,51 +37,56 @@ class PackageSelectionPage (HobPage):
|
|||||||
'name' : 'Included',
|
'name' : 'Included',
|
||||||
'filter' : { PackageListModel.COL_INC : [True] },
|
'filter' : { PackageListModel.COL_INC : [True] },
|
||||||
'columns' : [{
|
'columns' : [{
|
||||||
'col_name' : 'Package Name',
|
'col_name' : 'Package name',
|
||||||
'col_id' : PackageListModel.COL_NAME,
|
'col_id' : PackageListModel.COL_NAME,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 300
|
'col_max' : 300,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Brought in by',
|
'col_name' : 'Brought in by',
|
||||||
'col_id' : PackageListModel.COL_BINB,
|
'col_id' : PackageListModel.COL_BINB,
|
||||||
'col_style': 'text',
|
'col_style': 'binb',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 350
|
'col_max' : 350,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Size',
|
'col_name' : 'Size',
|
||||||
'col_id' : PackageListModel.COL_SIZE,
|
'col_id' : PackageListModel.COL_SIZE,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 300
|
'col_max' : 300,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Included',
|
'col_name' : 'Included',
|
||||||
'col_id' : PackageListModel.COL_INC,
|
'col_id' : PackageListModel.COL_INC,
|
||||||
'col_style': 'check toggle',
|
'col_style': 'check toggle',
|
||||||
'col_min' : 50,
|
'col_min' : 100,
|
||||||
'col_max' : 50
|
'col_max' : 100
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
'name' : 'All packages',
|
'name' : 'All packages',
|
||||||
'filter' : {},
|
'filter' : {},
|
||||||
'columns' : [{
|
'columns' : [{
|
||||||
'col_name' : 'Package Name',
|
'col_name' : 'Package name',
|
||||||
'col_id' : PackageListModel.COL_NAME,
|
'col_id' : PackageListModel.COL_NAME,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 400
|
'col_max' : 400,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Size',
|
'col_name' : 'Size',
|
||||||
'col_id' : PackageListModel.COL_SIZE,
|
'col_id' : PackageListModel.COL_SIZE,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 500
|
'col_max' : 500,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Included',
|
'col_name' : 'Included',
|
||||||
'col_id' : PackageListModel.COL_INC,
|
'col_id' : PackageListModel.COL_INC,
|
||||||
'col_style': 'check toggle',
|
'col_style': 'check toggle',
|
||||||
'col_min' : 50,
|
'col_min' : 100,
|
||||||
'col_max' : 50
|
'col_max' : 100
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -90,6 +95,7 @@ class PackageSelectionPage (HobPage):
|
|||||||
super(PackageSelectionPage, self).__init__(builder, "Packages")
|
super(PackageSelectionPage, self).__init__(builder, "Packages")
|
||||||
|
|
||||||
# set invisiable members
|
# set invisiable members
|
||||||
|
self.recipe_model = self.builder.recipe_model
|
||||||
self.package_model = self.builder.package_model
|
self.package_model = self.builder.package_model
|
||||||
|
|
||||||
# create visual elements
|
# create visual elements
|
||||||
@@ -110,10 +116,10 @@ class PackageSelectionPage (HobPage):
|
|||||||
tab = HobViewTable(columns)
|
tab = HobViewTable(columns)
|
||||||
filter = page['filter']
|
filter = page['filter']
|
||||||
tab.set_model(self.package_model.tree_model(filter))
|
tab.set_model(self.package_model.tree_model(filter))
|
||||||
tab.connect("toggled", self.table_toggled_cb)
|
tab.connect("toggled", self.table_toggled_cb, page['name'])
|
||||||
if page['name'] == "Included":
|
if page['name'] == "Included":
|
||||||
tab.connect("row-activated", self.tree_row_activated_cb)
|
tab.connect("button-release-event", self.button_click_cb)
|
||||||
|
tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include)
|
||||||
label = gtk.Label(page['name'])
|
label = gtk.Label(page['name'])
|
||||||
self.ins.append_page(tab, label)
|
self.ins.append_page(tab, label)
|
||||||
self.tables.append(tab)
|
self.tables.append(tab)
|
||||||
@@ -131,7 +137,7 @@ class PackageSelectionPage (HobPage):
|
|||||||
|
|
||||||
self.build_image_button = HobButton('Build image')
|
self.build_image_button = HobButton('Build image')
|
||||||
self.build_image_button.set_size_request(205, 49)
|
self.build_image_button.set_size_request(205, 49)
|
||||||
self.build_image_button.set_tooltip_text("Build image to get your target image")
|
self.build_image_button.set_tooltip_text("Build target image")
|
||||||
self.build_image_button.set_flags(gtk.CAN_DEFAULT)
|
self.build_image_button.set_flags(gtk.CAN_DEFAULT)
|
||||||
self.build_image_button.grab_default()
|
self.build_image_button.grab_default()
|
||||||
self.build_image_button.connect("clicked", self.build_image_clicked_cb)
|
self.build_image_button.connect("clicked", self.build_image_clicked_cb)
|
||||||
@@ -141,10 +147,13 @@ class PackageSelectionPage (HobPage):
|
|||||||
self.back_button.connect("clicked", self.back_button_clicked_cb)
|
self.back_button.connect("clicked", self.back_button_clicked_cb)
|
||||||
button_box.pack_start(self.back_button, expand=False, fill=False)
|
button_box.pack_start(self.back_button, expand=False, fill=False)
|
||||||
|
|
||||||
def tree_row_activated_cb(self, table, tree_model, path):
|
def button_click_cb(self, widget, event):
|
||||||
binb = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_BINB)
|
path, col = widget.table_tree.get_cursor()
|
||||||
if binb:
|
tree_model = widget.table_tree.get_model()
|
||||||
self.builder.show_binb_dialog(binb)
|
if path: # else activation is likely a removal
|
||||||
|
binb = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_BINB)
|
||||||
|
if binb:
|
||||||
|
self.builder.show_binb_dialog(binb)
|
||||||
|
|
||||||
def build_image_clicked_cb(self, button):
|
def build_image_clicked_cb(self, button):
|
||||||
self.builder.build_image()
|
self.builder.build_image()
|
||||||
@@ -160,44 +169,81 @@ class PackageSelectionPage (HobPage):
|
|||||||
self._expand_all()
|
self._expand_all()
|
||||||
|
|
||||||
self.builder.configuration.selected_packages = self.package_model.get_selected_packages()
|
self.builder.configuration.selected_packages = self.package_model.get_selected_packages()
|
||||||
|
self.builder.configuration.user_selected_packages = self.package_model.get_user_selected_packages()
|
||||||
selected_packages_num = len(self.builder.configuration.selected_packages)
|
selected_packages_num = len(self.builder.configuration.selected_packages)
|
||||||
selected_packages_size = float(self.package_model.get_packages_size())
|
selected_packages_size = self.package_model.get_packages_size()
|
||||||
selected_packages_size_str = self._size_to_string(selected_packages_size)
|
selected_packages_size_str = HobPage._size_to_string(selected_packages_size)
|
||||||
|
|
||||||
image_overhead_factor = self.builder.configuration.image_overhead_factor
|
image_overhead_factor = self.builder.configuration.image_overhead_factor
|
||||||
image_rootfs_size = self.builder.configuration.image_rootfs_size
|
image_rootfs_size = self.builder.configuration.image_rootfs_size * 1024 # image_rootfs_size is KB
|
||||||
image_extra_size = self.builder.configuration.image_extra_size
|
image_extra_size = self.builder.configuration.image_extra_size * 1024 # image_extra_size is KB
|
||||||
base_size = image_overhead_factor * selected_packages_size
|
base_size = image_overhead_factor * selected_packages_size
|
||||||
image_total_size = max(base_size, image_rootfs_size) + image_extra_size
|
image_total_size = max(base_size, image_rootfs_size) + image_extra_size
|
||||||
image_total_size_str = self._size_to_string(image_total_size)
|
if "zypper" in self.builder.configuration.selected_packages:
|
||||||
|
image_total_size += (51200 * 1024)
|
||||||
|
image_total_size_str = HobPage._size_to_string(image_total_size)
|
||||||
|
|
||||||
self.label.set_text("Packages included: %s\nSelected packages size: %s\nTotal image size: %s" %
|
self.label.set_text("Packages included: %s\nSelected packages size: %s\nTotal image size: %s" %
|
||||||
(selected_packages_num, selected_packages_size_str, image_total_size_str))
|
(selected_packages_num, selected_packages_size_str, image_total_size_str))
|
||||||
self.ins.show_indicator_icon("Included", selected_packages_num)
|
self.ins.show_indicator_icon("Included", selected_packages_num)
|
||||||
|
|
||||||
"""
|
def toggle_item_idle_cb(self, path, view_tree, cell, pagename):
|
||||||
Helper function to convert the package size to string format.
|
|
||||||
The unit of size is KB
|
|
||||||
"""
|
|
||||||
def _size_to_string(self, size):
|
|
||||||
if len(str(int(size))) > 3:
|
|
||||||
size_str = '%.1f' % (size*1.0/1024) + ' MB'
|
|
||||||
else:
|
|
||||||
size_str = str(size) + ' KB'
|
|
||||||
return size_str
|
|
||||||
|
|
||||||
def toggle_item_idle_cb(self, path):
|
|
||||||
if not self.package_model.path_included(path):
|
if not self.package_model.path_included(path):
|
||||||
self.package_model.include_item(item_path=path, binb="User Selected")
|
self.package_model.include_item(item_path=path, binb="User Selected")
|
||||||
else:
|
else:
|
||||||
self.package_model.exclude_item(item_path=path)
|
if pagename == "Included":
|
||||||
|
self.pre_fadeout_checkout_include(view_tree)
|
||||||
|
self.package_model.exclude_item(item_path=path)
|
||||||
|
self.render_fadeout(view_tree, cell)
|
||||||
|
else:
|
||||||
|
self.package_model.exclude_item(item_path=path)
|
||||||
|
|
||||||
self.refresh_selection()
|
self.refresh_selection()
|
||||||
|
if not self.builder.customized:
|
||||||
|
self.builder.customized = True
|
||||||
|
self.builder.configuration.selected_image = self.recipe_model.__dummy_image__
|
||||||
|
self.builder.rcppkglist_populated()
|
||||||
|
|
||||||
self.builder.window_sensitive(True)
|
self.builder.window_sensitive(True)
|
||||||
|
|
||||||
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
|
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree, pagename):
|
||||||
# Click to include a package
|
# Click to include a package
|
||||||
self.builder.window_sensitive(False)
|
self.builder.window_sensitive(False)
|
||||||
view_model = view_tree.get_model()
|
view_model = view_tree.get_model()
|
||||||
path = self.package_model.convert_vpath_to_path(view_model, view_path)
|
path = self.package_model.convert_vpath_to_path(view_model, view_path)
|
||||||
glib.idle_add(self.toggle_item_idle_cb, path)
|
glib.idle_add(self.toggle_item_idle_cb, path, view_tree, cell, pagename)
|
||||||
|
|
||||||
|
def pre_fadeout_checkout_include(self, tree):
|
||||||
|
self.package_model.resync_fadeout_column(self.package_model.get_iter_first())
|
||||||
|
# Check out a model which base on the column COL_FADE_INC,
|
||||||
|
# it's save the prev state of column COL_INC before do exclude_item
|
||||||
|
filter = { PackageListModel.COL_FADE_INC : [True]}
|
||||||
|
new_model = self.package_model.tree_model(filter)
|
||||||
|
tree.set_model(new_model)
|
||||||
|
tree.expand_all()
|
||||||
|
|
||||||
|
def get_excluded_rows(self, to_render_cells, model, it):
|
||||||
|
while it:
|
||||||
|
path = model.get_path(it)
|
||||||
|
prev_cell_is_active = model.get_value(it, PackageListModel.COL_FADE_INC)
|
||||||
|
curr_cell_is_active = model.get_value(it, PackageListModel.COL_INC)
|
||||||
|
if (prev_cell_is_active == True) and (curr_cell_is_active == False):
|
||||||
|
to_render_cells.append(path)
|
||||||
|
if model.iter_has_child(it):
|
||||||
|
self.get_excluded_rows(to_render_cells, model, model.iter_children(it))
|
||||||
|
it = model.iter_next(it)
|
||||||
|
|
||||||
|
return to_render_cells
|
||||||
|
|
||||||
|
def render_fadeout(self, tree, cell):
|
||||||
|
if (not cell) or (not tree):
|
||||||
|
return
|
||||||
|
to_render_cells = []
|
||||||
|
view_model = tree.get_model()
|
||||||
|
self.get_excluded_rows(to_render_cells, view_model, view_model.get_iter_first())
|
||||||
|
|
||||||
|
cell.fadeout(tree, 1000, to_render_cells)
|
||||||
|
|
||||||
|
def after_fadeout_checkin_include(self, table, ctrl, cell, tree):
|
||||||
|
tree.set_model(self.package_model.tree_model(self.pages[0]['filter']))
|
||||||
|
tree.expand_all()
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class PersistentTooltip(gtk.Window):
|
|||||||
|
|
||||||
markup: some Pango text markup to display in the tooltip
|
markup: some Pango text markup to display in the tooltip
|
||||||
"""
|
"""
|
||||||
def __init__(self, markup):
|
def __init__(self, markup, parent_win=None):
|
||||||
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
|
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
|
||||||
|
|
||||||
# Inherit the system theme for a tooltip
|
# Inherit the system theme for a tooltip
|
||||||
@@ -76,6 +76,10 @@ class PersistentTooltip(gtk.Window):
|
|||||||
# Ensure a reasonable minimum size
|
# Ensure a reasonable minimum size
|
||||||
self.set_geometry_hints(self, 100, 50)
|
self.set_geometry_hints(self, 100, 50)
|
||||||
|
|
||||||
|
# Set this window as a transient window for parent(main window)
|
||||||
|
if parent_win:
|
||||||
|
self.set_transient_for(parent_win)
|
||||||
|
self.set_destroy_with_parent(True)
|
||||||
# Draw our label and close buttons
|
# Draw our label and close buttons
|
||||||
hbox = gtk.HBox(False, 0)
|
hbox = gtk.HBox(False, 0)
|
||||||
hbox.show()
|
hbox.show()
|
||||||
@@ -87,7 +91,7 @@ class PersistentTooltip(gtk.Window):
|
|||||||
self.button = gtk.Button()
|
self.button = gtk.Button()
|
||||||
self.button.set_image(img)
|
self.button.set_image(img)
|
||||||
self.button.connect("clicked", self._dismiss_cb)
|
self.button.connect("clicked", self._dismiss_cb)
|
||||||
self.button.set_can_default(True)
|
self.button.set_flags(gtk.CAN_DEFAULT)
|
||||||
self.button.grab_focus()
|
self.button.grab_focus()
|
||||||
self.button.show()
|
self.button.show()
|
||||||
vbox = gtk.VBox(False, 0)
|
vbox = gtk.VBox(False, 0)
|
||||||
@@ -121,11 +125,17 @@ class PersistentTooltip(gtk.Window):
|
|||||||
style.fg[gtk.STATE_NORMAL] = gtk.gdk.color_parse(val)
|
style.fg[gtk.STATE_NORMAL] = gtk.gdk.color_parse(val)
|
||||||
self.label.set_style(style)
|
self.label.set_style(style)
|
||||||
break # we only care for the tooltip_fg_color
|
break # we only care for the tooltip_fg_color
|
||||||
|
|
||||||
self.label.set_markup(markup)
|
self.label.set_markup(markup)
|
||||||
self.label.show()
|
self.label.show()
|
||||||
bin.add(self.label)
|
bin.add(self.label)
|
||||||
hbox.pack_end(bin, True, True, 6)
|
hbox.pack_end(bin, True, True, 6)
|
||||||
|
|
||||||
|
# add the original URL display for user reference
|
||||||
|
if 'a href' in markup:
|
||||||
|
hbox.set_tooltip_text(self.get_markup_url(markup))
|
||||||
|
hbox.show()
|
||||||
|
|
||||||
self.connect("key-press-event", self._catch_esc_cb)
|
self.connect("key-press-event", self._catch_esc_cb)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -161,3 +171,16 @@ class PersistentTooltip(gtk.Window):
|
|||||||
def hide(self):
|
def hide(self):
|
||||||
self.shown = False
|
self.shown = False
|
||||||
gtk.Window.hide(self)
|
gtk.Window.hide(self)
|
||||||
|
|
||||||
|
"""
|
||||||
|
Called to get the hyperlink URL from markup text.
|
||||||
|
"""
|
||||||
|
def get_markup_url(self, markup):
|
||||||
|
url = "http:"
|
||||||
|
if markup and type(markup) == str:
|
||||||
|
s = markup
|
||||||
|
if 'http:' in s:
|
||||||
|
import re
|
||||||
|
url = re.search('(http:[^,\\ "]+)', s).group(0)
|
||||||
|
|
||||||
|
return url
|
||||||
|
|||||||
@@ -29,10 +29,12 @@ class HobProgressBar (gtk.ProgressBar):
|
|||||||
def set_rcstyle(self, status):
|
def set_rcstyle(self, status):
|
||||||
rcstyle = gtk.RcStyle()
|
rcstyle = gtk.RcStyle()
|
||||||
rcstyle.fg[2] = gtk.gdk.Color(HobColors.BLACK)
|
rcstyle.fg[2] = gtk.gdk.Color(HobColors.BLACK)
|
||||||
if status:
|
if status == "stop":
|
||||||
rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING)
|
rcstyle.bg[3] = gtk.gdk.Color(HobColors.WARNING)
|
||||||
else:
|
elif status == "fail":
|
||||||
rcstyle.bg[3] = gtk.gdk.Color(HobColors.ERROR)
|
rcstyle.bg[3] = gtk.gdk.Color(HobColors.ERROR)
|
||||||
|
else:
|
||||||
|
rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING)
|
||||||
self.modify_style(rcstyle)
|
self.modify_style(rcstyle)
|
||||||
|
|
||||||
def set_title(self, text=None):
|
def set_title(self, text=None):
|
||||||
|
|||||||
@@ -34,76 +34,93 @@ class RecipeSelectionPage (HobPage):
|
|||||||
pages = [
|
pages = [
|
||||||
{
|
{
|
||||||
'name' : 'Included',
|
'name' : 'Included',
|
||||||
|
'tooltip' : 'The recipes currently included for your image',
|
||||||
'filter' : { RecipeListModel.COL_INC : [True],
|
'filter' : { RecipeListModel.COL_INC : [True],
|
||||||
RecipeListModel.COL_TYPE : ['recipe', 'task'] },
|
RecipeListModel.COL_TYPE : ['recipe', 'task'] },
|
||||||
'columns' : [{
|
'columns' : [{
|
||||||
'col_name' : 'Recipe Name',
|
'col_name' : 'Recipe name',
|
||||||
'col_id' : RecipeListModel.COL_NAME,
|
'col_id' : RecipeListModel.COL_NAME,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 400
|
'col_max' : 400,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Brought in by',
|
'col_name' : 'Brought in by',
|
||||||
'col_id' : RecipeListModel.COL_BINB,
|
'col_id' : RecipeListModel.COL_BINB,
|
||||||
'col_style': 'text',
|
'col_style': 'binb',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 500
|
'col_max' : 500,
|
||||||
}, {
|
'expand' : 'True'
|
||||||
'col_name' : 'Included',
|
|
||||||
'col_id' : RecipeListModel.COL_INC,
|
|
||||||
'col_style': 'check toggle',
|
|
||||||
'col_min' : 50,
|
|
||||||
'col_max' : 50
|
|
||||||
}]
|
|
||||||
}, {
|
|
||||||
'name' : 'All recipes',
|
|
||||||
'filter' : { RecipeListModel.COL_TYPE : ['recipe'] },
|
|
||||||
'columns' : [{
|
|
||||||
'col_name' : 'Recipe Name',
|
|
||||||
'col_id' : RecipeListModel.COL_NAME,
|
|
||||||
'col_style': 'text',
|
|
||||||
'col_min' : 100,
|
|
||||||
'col_max' : 400
|
|
||||||
}, {
|
|
||||||
'col_name' : 'License',
|
|
||||||
'col_id' : RecipeListModel.COL_LIC,
|
|
||||||
'col_style': 'text',
|
|
||||||
'col_min' : 100,
|
|
||||||
'col_max' : 400
|
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Group',
|
'col_name' : 'Group',
|
||||||
'col_id' : RecipeListModel.COL_GROUP,
|
'col_id' : RecipeListModel.COL_GROUP,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 400
|
'col_max' : 300,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Included',
|
'col_name' : 'Included',
|
||||||
'col_id' : RecipeListModel.COL_INC,
|
'col_id' : RecipeListModel.COL_INC,
|
||||||
'col_style': 'check toggle',
|
'col_style': 'check toggle',
|
||||||
'col_min' : 50,
|
'col_min' : 100,
|
||||||
'col_max' : 50
|
'col_max' : 100
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
'name' : 'Tasks',
|
'name' : 'All recipes',
|
||||||
'filter' : { RecipeListModel.COL_TYPE : ['task'] },
|
'tooltip' : 'All recipes available in the Yocto Project',
|
||||||
|
'filter' : { RecipeListModel.COL_TYPE : ['recipe'] },
|
||||||
'columns' : [{
|
'columns' : [{
|
||||||
'col_name' : 'Task Name',
|
'col_name' : 'Recipe name',
|
||||||
'col_id' : RecipeListModel.COL_NAME,
|
'col_id' : RecipeListModel.COL_NAME,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 400
|
'col_max' : 400,
|
||||||
|
'expand' : 'True'
|
||||||
|
}, {
|
||||||
|
'col_name' : 'License',
|
||||||
|
'col_id' : RecipeListModel.COL_LIC,
|
||||||
|
'col_style': 'text',
|
||||||
|
'col_min' : 100,
|
||||||
|
'col_max' : 400,
|
||||||
|
'expand' : 'True'
|
||||||
|
}, {
|
||||||
|
'col_name' : 'Group',
|
||||||
|
'col_id' : RecipeListModel.COL_GROUP,
|
||||||
|
'col_style': 'text',
|
||||||
|
'col_min' : 100,
|
||||||
|
'col_max' : 400,
|
||||||
|
'expand' : 'True'
|
||||||
|
}, {
|
||||||
|
'col_name' : 'Included',
|
||||||
|
'col_id' : RecipeListModel.COL_INC,
|
||||||
|
'col_style': 'check toggle',
|
||||||
|
'col_min' : 100,
|
||||||
|
'col_max' : 100
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
'name' : 'Tasks',
|
||||||
|
'tooltip' : 'All tasks available in the Yocto Project',
|
||||||
|
'filter' : { RecipeListModel.COL_TYPE : ['task'] },
|
||||||
|
'columns' : [{
|
||||||
|
'col_name' : 'Task name',
|
||||||
|
'col_id' : RecipeListModel.COL_NAME,
|
||||||
|
'col_style': 'text',
|
||||||
|
'col_min' : 100,
|
||||||
|
'col_max' : 400,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Description',
|
'col_name' : 'Description',
|
||||||
'col_id' : RecipeListModel.COL_DESC,
|
'col_id' : RecipeListModel.COL_DESC,
|
||||||
'col_style': 'text',
|
'col_style': 'text',
|
||||||
'col_min' : 100,
|
'col_min' : 100,
|
||||||
'col_max' : 400
|
'col_max' : 400,
|
||||||
|
'expand' : 'True'
|
||||||
}, {
|
}, {
|
||||||
'col_name' : 'Included',
|
'col_name' : 'Included',
|
||||||
'col_id' : RecipeListModel.COL_INC,
|
'col_id' : RecipeListModel.COL_INC,
|
||||||
'col_style': 'check toggle',
|
'col_style': 'check toggle',
|
||||||
'col_min' : 50,
|
'col_min' : 100,
|
||||||
'col_max' : 50
|
'col_max' : 100
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -132,17 +149,22 @@ class RecipeSelectionPage (HobPage):
|
|||||||
tab = HobViewTable(columns)
|
tab = HobViewTable(columns)
|
||||||
filter = page['filter']
|
filter = page['filter']
|
||||||
tab.set_model(self.recipe_model.tree_model(filter))
|
tab.set_model(self.recipe_model.tree_model(filter))
|
||||||
tab.connect("toggled", self.table_toggled_cb)
|
tab.connect("toggled", self.table_toggled_cb, page['name'])
|
||||||
if page['name'] == "Included":
|
if page['name'] == "Included":
|
||||||
tab.connect("row-activated", self.tree_row_activated_cb)
|
tab.connect("button-release-event", self.button_click_cb)
|
||||||
|
tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include)
|
||||||
label = gtk.Label(page['name'])
|
label = gtk.Label(page['name'])
|
||||||
|
label.set_selectable(False)
|
||||||
|
label.set_tooltip_text(page['tooltip'])
|
||||||
self.ins.append_page(tab, label)
|
self.ins.append_page(tab, label)
|
||||||
self.tables.append(tab)
|
self.tables.append(tab)
|
||||||
|
|
||||||
self.ins.set_entry("Search recipes:")
|
self.ins.set_entry("Search recipes:")
|
||||||
# set the search entry for each table
|
# set the search entry for each table
|
||||||
for tab in self.tables:
|
for tab in self.tables:
|
||||||
|
search_tip = "Enter a recipe's or task's name to find it"
|
||||||
|
self.ins.search.set_tooltip_text(search_tip)
|
||||||
|
self.ins.search.props.has_tooltip = True
|
||||||
tab.set_search_entry(0, self.ins.search)
|
tab.set_search_entry(0, self.ins.search)
|
||||||
|
|
||||||
# add all into the window
|
# add all into the window
|
||||||
@@ -153,7 +175,7 @@ class RecipeSelectionPage (HobPage):
|
|||||||
|
|
||||||
self.build_packages_button = HobButton('Build packages')
|
self.build_packages_button = HobButton('Build packages')
|
||||||
self.build_packages_button.set_size_request(205, 49)
|
self.build_packages_button.set_size_request(205, 49)
|
||||||
self.build_packages_button.set_tooltip_text("Build packages for customization")
|
self.build_packages_button.set_tooltip_text("Build selected recipes into packages")
|
||||||
self.build_packages_button.set_flags(gtk.CAN_DEFAULT)
|
self.build_packages_button.set_flags(gtk.CAN_DEFAULT)
|
||||||
self.build_packages_button.grab_default()
|
self.build_packages_button.grab_default()
|
||||||
self.build_packages_button.connect("clicked", self.build_packages_clicked_cb)
|
self.build_packages_button.connect("clicked", self.build_packages_clicked_cb)
|
||||||
@@ -163,10 +185,13 @@ class RecipeSelectionPage (HobPage):
|
|||||||
self.back_button.connect("clicked", self.back_button_clicked_cb)
|
self.back_button.connect("clicked", self.back_button_clicked_cb)
|
||||||
button_box.pack_start(self.back_button, expand=False, fill=False)
|
button_box.pack_start(self.back_button, expand=False, fill=False)
|
||||||
|
|
||||||
def tree_row_activated_cb(self, table, tree_model, path):
|
def button_click_cb(self, widget, event):
|
||||||
binb = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BINB)
|
path, col = widget.table_tree.get_cursor()
|
||||||
if binb:
|
tree_model = widget.table_tree.get_model()
|
||||||
self.builder.show_binb_dialog(binb)
|
if path: # else activation is likely a removal
|
||||||
|
binb = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BINB)
|
||||||
|
if binb:
|
||||||
|
self.builder.show_binb_dialog(binb)
|
||||||
|
|
||||||
def build_packages_clicked_cb(self, button):
|
def build_packages_clicked_cb(self, button):
|
||||||
self.builder.build_packages()
|
self.builder.build_packages()
|
||||||
@@ -180,18 +205,61 @@ class RecipeSelectionPage (HobPage):
|
|||||||
self.label.set_text("Recipes included: %s" % len(self.builder.configuration.selected_recipes))
|
self.label.set_text("Recipes included: %s" % len(self.builder.configuration.selected_recipes))
|
||||||
self.ins.show_indicator_icon("Included", len(self.builder.configuration.selected_recipes))
|
self.ins.show_indicator_icon("Included", len(self.builder.configuration.selected_recipes))
|
||||||
|
|
||||||
def toggle_item_idle_cb(self, path):
|
def toggle_item_idle_cb(self, path, view_tree, cell, pagename):
|
||||||
if not self.recipe_model.path_included(path):
|
if not self.recipe_model.path_included(path):
|
||||||
self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)
|
self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)
|
||||||
else:
|
else:
|
||||||
self.recipe_model.exclude_item(item_path=path)
|
if pagename == "Included":
|
||||||
|
self.pre_fadeout_checkout_include(view_tree)
|
||||||
|
self.recipe_model.exclude_item(item_path=path)
|
||||||
|
self.render_fadeout(view_tree, cell)
|
||||||
|
else:
|
||||||
|
self.recipe_model.exclude_item(item_path=path)
|
||||||
|
|
||||||
self.refresh_selection()
|
self.refresh_selection()
|
||||||
|
if not self.builder.customized:
|
||||||
|
self.builder.customized = True
|
||||||
|
self.builder.configuration.selected_image = self.recipe_model.__dummy_image__
|
||||||
|
self.builder.rcppkglist_populated()
|
||||||
|
|
||||||
self.builder.window_sensitive(True)
|
self.builder.window_sensitive(True)
|
||||||
|
|
||||||
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree):
|
def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree, pagename):
|
||||||
# Click to include a recipe
|
# Click to include a recipe
|
||||||
self.builder.window_sensitive(False)
|
self.builder.window_sensitive(False)
|
||||||
view_model = view_tree.get_model()
|
view_model = view_tree.get_model()
|
||||||
path = self.recipe_model.convert_vpath_to_path(view_model, view_path)
|
path = self.recipe_model.convert_vpath_to_path(view_model, view_path)
|
||||||
glib.idle_add(self.toggle_item_idle_cb, path)
|
glib.idle_add(self.toggle_item_idle_cb, path, view_tree, cell, pagename)
|
||||||
|
|
||||||
|
def pre_fadeout_checkout_include(self, tree):
|
||||||
|
#resync the included items to a backup fade include column
|
||||||
|
it = self.recipe_model.get_iter_first()
|
||||||
|
while it:
|
||||||
|
active = self.recipe_model.get_value(it, self.recipe_model.COL_INC)
|
||||||
|
self.recipe_model.set(it, self.recipe_model.COL_FADE_INC, active)
|
||||||
|
it = self.recipe_model.iter_next(it)
|
||||||
|
# Check out a model which base on the column COL_FADE_INC,
|
||||||
|
# it's save the prev state of column COL_INC before do exclude_item
|
||||||
|
filter = { RecipeListModel.COL_FADE_INC : [True],
|
||||||
|
RecipeListModel.COL_TYPE : ['recipe', 'task'] }
|
||||||
|
new_model = self.recipe_model.tree_model(filter, excluded_items_ahead=True)
|
||||||
|
tree.set_model(new_model)
|
||||||
|
|
||||||
|
def render_fadeout(self, tree, cell):
|
||||||
|
if (not cell) or (not tree):
|
||||||
|
return
|
||||||
|
to_render_cells = []
|
||||||
|
model = tree.get_model()
|
||||||
|
it = model.get_iter_first()
|
||||||
|
while it:
|
||||||
|
path = model.get_path(it)
|
||||||
|
prev_cell_is_active = model.get_value(it, RecipeListModel.COL_FADE_INC)
|
||||||
|
curr_cell_is_active = model.get_value(it, RecipeListModel.COL_INC)
|
||||||
|
if (prev_cell_is_active == True) and (curr_cell_is_active == False):
|
||||||
|
to_render_cells.append(path)
|
||||||
|
it = model.iter_next(it)
|
||||||
|
|
||||||
|
cell.fadeout(tree, 1000, to_render_cells)
|
||||||
|
|
||||||
|
def after_fadeout_checkin_include(self, table, ctrl, cell, tree):
|
||||||
|
tree.set_model(self.recipe_model.tree_model(self.pages[0]['filter']))
|
||||||
|
|||||||
@@ -82,6 +82,9 @@ class RunningBuild (gobject.GObject):
|
|||||||
'log-error' : (gobject.SIGNAL_RUN_LAST,
|
'log-error' : (gobject.SIGNAL_RUN_LAST,
|
||||||
gobject.TYPE_NONE,
|
gobject.TYPE_NONE,
|
||||||
()),
|
()),
|
||||||
|
'no-provider' : (gobject.SIGNAL_RUN_LAST,
|
||||||
|
gobject.TYPE_NONE,
|
||||||
|
(gobject.TYPE_PYOBJECT,)),
|
||||||
}
|
}
|
||||||
pids_to_task = {}
|
pids_to_task = {}
|
||||||
tasks_to_iter = {}
|
tasks_to_iter = {}
|
||||||
@@ -320,6 +323,20 @@ class RunningBuild (gobject.GObject):
|
|||||||
message["title"] = ""
|
message["title"] = ""
|
||||||
message["task"] = event.taskstring
|
message["task"] = event.taskstring
|
||||||
self.emit("task-started", message)
|
self.emit("task-started", message)
|
||||||
|
elif isinstance(event, bb.event.NoProvider):
|
||||||
|
msg = ""
|
||||||
|
if event._runtime:
|
||||||
|
r = "R"
|
||||||
|
else:
|
||||||
|
r = ""
|
||||||
|
if event._dependees:
|
||||||
|
msg = "Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)\n" % (r, event._item, ", ".join(event._dependees), r)
|
||||||
|
else:
|
||||||
|
msg = "Nothing %sPROVIDES '%s'\n" % (r, event._item)
|
||||||
|
if event._reasons:
|
||||||
|
for reason in event._reasons:
|
||||||
|
msg += ("%s\n" % reason)
|
||||||
|
self.emit("no-provider", msg)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -425,7 +442,7 @@ class BuildFailureTreeView(gtk.TreeView):
|
|||||||
self.get_selection().set_mode(gtk.SELECTION_SINGLE)
|
self.get_selection().set_mode(gtk.SELECTION_SINGLE)
|
||||||
|
|
||||||
# The icon that indicates whether we're building or failed.
|
# The icon that indicates whether we're building or failed.
|
||||||
renderer = gtk.CellRendererPixbuf ()
|
renderer = HobCellRendererPixbuf ()
|
||||||
col = gtk.TreeViewColumn ("Status", renderer)
|
col = gtk.TreeViewColumn ("Status", renderer)
|
||||||
col.add_attribute (renderer, "icon-name", RunningBuildModel.COL_ICON)
|
col.add_attribute (renderer, "icon-name", RunningBuildModel.COL_ICON)
|
||||||
self.append_column (col)
|
self.append_column (col)
|
||||||
|
|||||||
@@ -136,11 +136,27 @@ class TemplateMgr(gobject.GObject):
|
|||||||
self.local_conf = None
|
self.local_conf = None
|
||||||
self.image_bb = None
|
self.image_bb = None
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def convert_to_template_pathfilename(cls, filename, path):
|
||||||
|
return "%s/%s%s%s" % (path, "template-", filename, ".hob")
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def convert_to_bblayers_pathfilename(cls, filename, path):
|
||||||
|
return "%s/%s%s%s" % (path, "bblayers-", filename, ".conf")
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def convert_to_local_pathfilename(cls, filename, path):
|
||||||
|
return "%s/%s%s%s" % (path, "local-", filename, ".conf")
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def convert_to_image_pathfilename(cls, filename, path):
|
||||||
|
return "%s/%s%s%s" % (path, "hob-image-", filename, ".bb")
|
||||||
|
|
||||||
def open(self, filename, path):
|
def open(self, filename, path):
|
||||||
self.template_hob = HobTemplateFile("%s/%s%s%s" % (path, "template-", filename, ".hob"))
|
self.template_hob = HobTemplateFile(TemplateMgr.convert_to_template_pathfilename(filename, path))
|
||||||
self.bblayers_conf = ConfigFile("%s/%s%s%s" % (path, "bblayers-", filename, ".conf"))
|
self.bblayers_conf = ConfigFile(TemplateMgr.convert_to_bblayers_pathfilename(filename, path))
|
||||||
self.local_conf = ConfigFile("%s/%s%s%s" % (path, "local-", filename, ".conf"))
|
self.local_conf = ConfigFile(TemplateMgr.convert_to_local_pathfilename(filename, path))
|
||||||
self.image_bb = RecipeFile("%s/%s%s%s" % (path, "hob-image-", filename, ".bb"))
|
self.image_bb = RecipeFile(TemplateMgr.convert_to_image_pathfilename(filename, path))
|
||||||
|
|
||||||
def setVar(self, var, val):
|
def setVar(self, var, val):
|
||||||
if var in TemplateMgr.__gLocalVars__:
|
if var in TemplateMgr.__gLocalVars__:
|
||||||
|
|||||||
33
bitbake/lib/bb/ui/crumbs/utils.py
Normal file
33
bitbake/lib/bb/ui/crumbs/utils.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#
|
||||||
|
# BitBake UI Utils
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Intel Corporation
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
|
# published by the Free Software Foundation.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
# This utility method looks for xterm or vte and return the
|
||||||
|
# frist to exist, currently we are keeping this simple, but
|
||||||
|
# we will likely move the oe.terminal implementation into
|
||||||
|
# bitbake which will allow more flexibility.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
def which_terminal():
|
||||||
|
term = bb.utils.which(os.environ["PATH"], "xterm")
|
||||||
|
if term:
|
||||||
|
return term + " -e "
|
||||||
|
term = bb.utils.which(os.environ["PATH"], "vte")
|
||||||
|
if term:
|
||||||
|
return term + " -c "
|
||||||
|
return None
|
||||||
@@ -20,10 +20,22 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
import gobject
|
|
||||||
import gtk
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
requirements = "FATAL: Gtk+, PyGtk and PyGobject are required to use Hob"
|
||||||
|
try:
|
||||||
|
import gobject
|
||||||
|
import gtk
|
||||||
|
import pygtk
|
||||||
|
pygtk.require('2.0') # to be certain we don't have gtk+ 1.x !?!
|
||||||
|
gtkver = gtk.gtk_version
|
||||||
|
pygtkver = gtk.pygtk_version
|
||||||
|
if gtkver < (2, 18, 0) or pygtkver < (2, 16, 0):
|
||||||
|
sys.exit("%s,\nYou have Gtk+ %s and PyGtk %s." % (requirements,
|
||||||
|
".".join(map(str, gtkver)),
|
||||||
|
".".join(map(str, pygtkver))))
|
||||||
|
except ImportError as exc:
|
||||||
|
sys.exit("%s (%s)." % (requirements, str(exc)))
|
||||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
|
||||||
try:
|
try:
|
||||||
import bb
|
import bb
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Handling output to TTYs or files (no TTY)
|
# Handling output to TTYs or files (no TTY)
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2007 Richard Purdie
|
# Copyright (C) 2006-2012 Richard Purdie
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -70,7 +70,41 @@ def pluralise(singular, plural, qty):
|
|||||||
else:
|
else:
|
||||||
return plural % qty
|
return plural % qty
|
||||||
|
|
||||||
def main(server, eventHandler):
|
class TerminalFilter(object):
|
||||||
|
def __init__(self, main, helper, console, format):
|
||||||
|
self.main = main
|
||||||
|
self.helper = helper
|
||||||
|
|
||||||
|
def clearFooter(self):
|
||||||
|
return
|
||||||
|
|
||||||
|
def updateFooter(self):
|
||||||
|
if not main.shutdown or not self.helper.needUpdate:
|
||||||
|
return
|
||||||
|
|
||||||
|
activetasks = self.helper.running_tasks
|
||||||
|
runningpids = self.helper.running_pids
|
||||||
|
|
||||||
|
if len(runningpids) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
self.helper.getTasks()
|
||||||
|
|
||||||
|
tasks = []
|
||||||
|
for t in runningpids:
|
||||||
|
tasks.append("%s (pid %s)" % (activetasks[t]["title"], t))
|
||||||
|
|
||||||
|
if main.shutdown:
|
||||||
|
print("Waiting for %s running tasks to finish:" % len(activetasks))
|
||||||
|
else:
|
||||||
|
print("Currently %s running tasks (%s of %s):" % (len(activetasks), self.helper.tasknumber_current, self.helper.tasknumber_total))
|
||||||
|
for tasknum, task in enumerate(tasks):
|
||||||
|
print("%s: %s" % (tasknum, task))
|
||||||
|
|
||||||
|
def finish(self):
|
||||||
|
return
|
||||||
|
|
||||||
|
def main(server, eventHandler, tf = TerminalFilter):
|
||||||
|
|
||||||
# Get values of variables which control our output
|
# Get values of variables which control our output
|
||||||
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
|
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
|
||||||
@@ -106,32 +140,29 @@ def main(server, eventHandler):
|
|||||||
print("XMLRPC Fault getting commandline:\n %s" % x)
|
print("XMLRPC Fault getting commandline:\n %s" % x)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
parseprogress = None
|
parseprogress = None
|
||||||
cacheprogress = None
|
cacheprogress = None
|
||||||
shutdown = 0
|
main.shutdown = 0
|
||||||
interrupted = False
|
interrupted = False
|
||||||
return_value = 0
|
return_value = 0
|
||||||
errors = 0
|
errors = 0
|
||||||
warnings = 0
|
warnings = 0
|
||||||
taskfailures = []
|
taskfailures = []
|
||||||
|
|
||||||
|
termfilter = tf(main, helper, console, format)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
termfilter.updateFooter()
|
||||||
event = eventHandler.waitEvent(0.25)
|
event = eventHandler.waitEvent(0.25)
|
||||||
if event is None:
|
if event is None:
|
||||||
if shutdown > 1:
|
if main.shutdown > 1:
|
||||||
break
|
break
|
||||||
continue
|
continue
|
||||||
helper.eventHandler(event)
|
helper.eventHandler(event)
|
||||||
if isinstance(event, bb.runqueue.runQueueExitWait):
|
if isinstance(event, bb.runqueue.runQueueExitWait):
|
||||||
if not shutdown:
|
if not main.shutdown:
|
||||||
shutdown = 1
|
main.shutdown = 1
|
||||||
if shutdown and helper.needUpdate:
|
|
||||||
activetasks, failedtasks = helper.getTasks()
|
|
||||||
if activetasks:
|
|
||||||
print("Waiting for %s active tasks to finish:" % len(activetasks))
|
|
||||||
for tasknum, task in enumerate(activetasks):
|
|
||||||
print("%s: %s (pid %s)" % (tasknum, activetasks[task]["title"], task))
|
|
||||||
|
|
||||||
if isinstance(event, logging.LogRecord):
|
if isinstance(event, logging.LogRecord):
|
||||||
if event.levelno >= format.ERROR:
|
if event.levelno >= format.ERROR:
|
||||||
@@ -151,6 +182,7 @@ def main(server, eventHandler):
|
|||||||
return_value = 1
|
return_value = 1
|
||||||
logfile = event.logfile
|
logfile = event.logfile
|
||||||
if logfile and os.path.exists(logfile):
|
if logfile and os.path.exists(logfile):
|
||||||
|
termfilter.clearFooter()
|
||||||
print("ERROR: Logfile of failure stored in: %s" % logfile)
|
print("ERROR: Logfile of failure stored in: %s" % logfile)
|
||||||
if includelogs and not event.errprinted:
|
if includelogs and not event.errprinted:
|
||||||
print("Log data follows:")
|
print("Log data follows:")
|
||||||
@@ -206,14 +238,14 @@ def main(server, eventHandler):
|
|||||||
return_value = event.exitcode
|
return_value = event.exitcode
|
||||||
errors = errors + 1
|
errors = errors + 1
|
||||||
logger.error("Command execution failed: %s", event.error)
|
logger.error("Command execution failed: %s", event.error)
|
||||||
shutdown = 2
|
main.shutdown = 2
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.command.CommandExit):
|
if isinstance(event, bb.command.CommandExit):
|
||||||
if not return_value:
|
if not return_value:
|
||||||
return_value = event.exitcode
|
return_value = event.exitcode
|
||||||
continue
|
continue
|
||||||
if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
|
if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
|
||||||
shutdown = 2
|
main.shutdown = 2
|
||||||
continue
|
continue
|
||||||
if isinstance(event, bb.event.MultipleProviders):
|
if isinstance(event, bb.event.MultipleProviders):
|
||||||
logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "",
|
logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "",
|
||||||
@@ -281,18 +313,20 @@ def main(server, eventHandler):
|
|||||||
logger.error("Unknown event: %s", event)
|
logger.error("Unknown event: %s", event)
|
||||||
|
|
||||||
except EnvironmentError as ioerror:
|
except EnvironmentError as ioerror:
|
||||||
|
termfilter.clearFooter()
|
||||||
# ignore interrupted io
|
# ignore interrupted io
|
||||||
if ioerror.args[0] == 4:
|
if ioerror.args[0] == 4:
|
||||||
pass
|
pass
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
if shutdown == 1:
|
termfilter.clearFooter()
|
||||||
|
if main.shutdown == 1:
|
||||||
print("\nSecond Keyboard Interrupt, stopping...\n")
|
print("\nSecond Keyboard Interrupt, stopping...\n")
|
||||||
server.runCommand(["stateStop"])
|
server.runCommand(["stateStop"])
|
||||||
if shutdown == 0:
|
if main.shutdown == 0:
|
||||||
interrupted = True
|
interrupted = True
|
||||||
print("\nKeyboard Interrupt, closing down...\n")
|
print("\nKeyboard Interrupt, closing down...\n")
|
||||||
server.runCommand(["stateShutdown"])
|
server.runCommand(["stateShutdown"])
|
||||||
shutdown = shutdown + 1
|
main.shutdown = main.shutdown + 1
|
||||||
pass
|
pass
|
||||||
|
|
||||||
summary = ""
|
summary = ""
|
||||||
@@ -315,4 +349,6 @@ def main(server, eventHandler):
|
|||||||
if return_value == 0:
|
if return_value == 0:
|
||||||
return_value = 1
|
return_value = 1
|
||||||
|
|
||||||
|
termfilter.finish()
|
||||||
|
|
||||||
return return_value
|
return return_value
|
||||||
|
|||||||
109
bitbake/lib/bb/ui/knotty2.py
Normal file
109
bitbake/lib/bb/ui/knotty2.py
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
#
|
||||||
|
# BitBake (No)TTY UI Implementation (v2)
|
||||||
|
#
|
||||||
|
# Handling output to TTYs or files (no TTY)
|
||||||
|
#
|
||||||
|
# Copyright (C) 2012 Richard Purdie
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
|
# published by the Free Software Foundation.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License along
|
||||||
|
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
from bb.ui import knotty
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
logger = logging.getLogger("BitBake")
|
||||||
|
|
||||||
|
class InteractConsoleLogFilter(logging.Filter):
|
||||||
|
def __init__(self, tf, format):
|
||||||
|
self.tf = tf
|
||||||
|
self.format = format
|
||||||
|
|
||||||
|
def filter(self, record):
|
||||||
|
if record.levelno == self.format.NOTE and (record.msg.startswith("Running") or record.msg.startswith("package ")):
|
||||||
|
return False
|
||||||
|
self.tf.clearFooter()
|
||||||
|
return True
|
||||||
|
|
||||||
|
class TerminalFilter2(object):
|
||||||
|
def __init__(self, main, helper, console, format):
|
||||||
|
self.main = main
|
||||||
|
self.helper = helper
|
||||||
|
self.cuu = None
|
||||||
|
self.stdinbackup = None
|
||||||
|
self.interactive = sys.stdout.isatty()
|
||||||
|
self.footer_present = False
|
||||||
|
self.lastpids = []
|
||||||
|
|
||||||
|
if not self.interactive:
|
||||||
|
return
|
||||||
|
|
||||||
|
import curses
|
||||||
|
import termios
|
||||||
|
import copy
|
||||||
|
self.curses = curses
|
||||||
|
self.termios = termios
|
||||||
|
try:
|
||||||
|
fd = sys.stdin.fileno()
|
||||||
|
self.stdinbackup = termios.tcgetattr(fd)
|
||||||
|
new = copy.deepcopy(self.stdinbackup)
|
||||||
|
new[3] = new[3] & ~termios.ECHO
|
||||||
|
termios.tcsetattr(fd, termios.TCSADRAIN, new)
|
||||||
|
curses.setupterm()
|
||||||
|
self.ed = curses.tigetstr("ed")
|
||||||
|
if self.ed:
|
||||||
|
self.cuu = curses.tigetstr("cuu")
|
||||||
|
except:
|
||||||
|
self.cuu = None
|
||||||
|
console.addFilter(InteractConsoleLogFilter(self, format))
|
||||||
|
|
||||||
|
def clearFooter(self):
|
||||||
|
if self.footer_present:
|
||||||
|
lines = self.footer_present
|
||||||
|
sys.stdout.write(self.curses.tparm(self.cuu, lines))
|
||||||
|
sys.stdout.write(self.curses.tparm(self.ed))
|
||||||
|
self.footer_present = False
|
||||||
|
|
||||||
|
def updateFooter(self):
|
||||||
|
if not self.cuu:
|
||||||
|
return
|
||||||
|
activetasks = self.helper.running_tasks
|
||||||
|
failedtasks = self.helper.failed_tasks
|
||||||
|
runningpids = self.helper.running_pids
|
||||||
|
if self.footer_present and (self.lastpids == runningpids):
|
||||||
|
return
|
||||||
|
if self.footer_present:
|
||||||
|
self.clearFooter()
|
||||||
|
if not activetasks:
|
||||||
|
return
|
||||||
|
lines = 1
|
||||||
|
tasks = []
|
||||||
|
for t in runningpids:
|
||||||
|
tasks.append("%s (pid %s)" % (activetasks[t]["title"], t))
|
||||||
|
|
||||||
|
if self.main.shutdown:
|
||||||
|
print("Waiting for %s running tasks to finish:" % len(activetasks))
|
||||||
|
else:
|
||||||
|
print("Currently %s running tasks (%s of %s):" % (len(activetasks), self.helper.tasknumber_current, self.helper.tasknumber_total))
|
||||||
|
for tasknum, task in enumerate(tasks):
|
||||||
|
print("%s: %s" % (tasknum, task))
|
||||||
|
lines = lines + 1
|
||||||
|
self.footer_present = lines
|
||||||
|
self.lastpids = runningpids[:]
|
||||||
|
|
||||||
|
def finish(self):
|
||||||
|
if self.stdinbackup:
|
||||||
|
fd = sys.stdin.fileno()
|
||||||
|
self.termios.tcsetattr(fd, self.termios.TCSADRAIN, self.stdinbackup)
|
||||||
|
|
||||||
|
def main(server, eventHandler):
|
||||||
|
bb.ui.knotty.main(server, eventHandler, TerminalFilter2)
|
||||||
@@ -23,6 +23,8 @@ class BBUIHelper:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.needUpdate = False
|
self.needUpdate = False
|
||||||
self.running_tasks = {}
|
self.running_tasks = {}
|
||||||
|
# Running PIDs preserves the order tasks were executed in
|
||||||
|
self.running_pids = []
|
||||||
self.failed_tasks = []
|
self.failed_tasks = []
|
||||||
self.tasknumber_current = 0
|
self.tasknumber_current = 0
|
||||||
self.tasknumber_total = 0
|
self.tasknumber_total = 0
|
||||||
@@ -30,16 +32,20 @@ class BBUIHelper:
|
|||||||
def eventHandler(self, event):
|
def eventHandler(self, event):
|
||||||
if isinstance(event, bb.build.TaskStarted):
|
if isinstance(event, bb.build.TaskStarted):
|
||||||
self.running_tasks[event.pid] = { 'title' : "%s %s" % (event._package, event._task) }
|
self.running_tasks[event.pid] = { 'title' : "%s %s" % (event._package, event._task) }
|
||||||
|
self.running_pids.append(event.pid)
|
||||||
self.needUpdate = True
|
self.needUpdate = True
|
||||||
if isinstance(event, bb.build.TaskSucceeded):
|
if isinstance(event, bb.build.TaskSucceeded):
|
||||||
del self.running_tasks[event.pid]
|
del self.running_tasks[event.pid]
|
||||||
|
self.running_pids.remove(event.pid)
|
||||||
self.needUpdate = True
|
self.needUpdate = True
|
||||||
if isinstance(event, bb.build.TaskFailedSilent):
|
if isinstance(event, bb.build.TaskFailedSilent):
|
||||||
del self.running_tasks[event.pid]
|
del self.running_tasks[event.pid]
|
||||||
|
self.running_pids.remove(event.pid)
|
||||||
# Don't add to the failed tasks list since this is e.g. a setscene task failure
|
# Don't add to the failed tasks list since this is e.g. a setscene task failure
|
||||||
self.needUpdate = True
|
self.needUpdate = True
|
||||||
if isinstance(event, bb.build.TaskFailed):
|
if isinstance(event, bb.build.TaskFailed):
|
||||||
del self.running_tasks[event.pid]
|
del self.running_tasks[event.pid]
|
||||||
|
self.running_pids.remove(event.pid)
|
||||||
self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
|
self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
|
||||||
self.needUpdate = True
|
self.needUpdate = True
|
||||||
if isinstance(event, bb.runqueue.runQueueTaskStarted):
|
if isinstance(event, bb.runqueue.runQueueTaskStarted):
|
||||||
|
|||||||
@@ -31,9 +31,6 @@ from contextlib import contextmanager
|
|||||||
|
|
||||||
logger = logging.getLogger("BitBake.Util")
|
logger = logging.getLogger("BitBake.Util")
|
||||||
|
|
||||||
# Version comparison
|
|
||||||
separators = ".-"
|
|
||||||
|
|
||||||
# Context used in better_exec, eval
|
# Context used in better_exec, eval
|
||||||
_context = {
|
_context = {
|
||||||
"os": os,
|
"os": os,
|
||||||
@@ -48,15 +45,18 @@ def explode_version(s):
|
|||||||
while (s != ''):
|
while (s != ''):
|
||||||
if s[0] in string.digits:
|
if s[0] in string.digits:
|
||||||
m = numeric_regexp.match(s)
|
m = numeric_regexp.match(s)
|
||||||
r.append(int(m.group(1)))
|
r.append((0, int(m.group(1))))
|
||||||
s = m.group(2)
|
s = m.group(2)
|
||||||
continue
|
continue
|
||||||
if s[0] in string.letters:
|
if s[0] in string.letters:
|
||||||
m = alpha_regexp.match(s)
|
m = alpha_regexp.match(s)
|
||||||
r.append(m.group(1))
|
r.append((1, m.group(1)))
|
||||||
s = m.group(2)
|
s = m.group(2)
|
||||||
continue
|
continue
|
||||||
r.append(s[0])
|
if s[0] == '~':
|
||||||
|
r.append((-1, s[0]))
|
||||||
|
else:
|
||||||
|
r.append((2, s[0]))
|
||||||
s = s[1:]
|
s = s[1:]
|
||||||
return r
|
return r
|
||||||
|
|
||||||
@@ -77,33 +77,25 @@ def split_version(s):
|
|||||||
def vercmp_part(a, b):
|
def vercmp_part(a, b):
|
||||||
va = explode_version(a)
|
va = explode_version(a)
|
||||||
vb = explode_version(b)
|
vb = explode_version(b)
|
||||||
sa = False
|
|
||||||
sb = False
|
|
||||||
while True:
|
while True:
|
||||||
if va == []:
|
if va == []:
|
||||||
ca = None
|
(oa, ca) = (0, None)
|
||||||
else:
|
else:
|
||||||
ca = va.pop(0)
|
(oa, ca) = va.pop(0)
|
||||||
if vb == []:
|
if vb == []:
|
||||||
cb = None
|
(ob, cb) = (0, None)
|
||||||
else:
|
else:
|
||||||
cb = vb.pop(0)
|
(ob, cb) = vb.pop(0)
|
||||||
if ca == None and cb == None:
|
if (oa, ca) == (0, None) and (ob, cb) == (0, None):
|
||||||
return 0
|
return 0
|
||||||
|
if oa < ob:
|
||||||
if isinstance(ca, basestring):
|
|
||||||
sa = ca in separators
|
|
||||||
if isinstance(cb, basestring):
|
|
||||||
sb = cb in separators
|
|
||||||
if sa and not sb:
|
|
||||||
return -1
|
return -1
|
||||||
if not sa and sb:
|
elif oa > ob:
|
||||||
return 1
|
return 1
|
||||||
|
elif ca < cb:
|
||||||
if ca > cb:
|
|
||||||
return 1
|
|
||||||
if ca < cb:
|
|
||||||
return -1
|
return -1
|
||||||
|
elif ca > cb:
|
||||||
|
return 1
|
||||||
|
|
||||||
def vercmp(ta, tb):
|
def vercmp(ta, tb):
|
||||||
(ea, va, ra) = ta
|
(ea, va, ra) = ta
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ ALLPREQ = html pdf tarball
|
|||||||
#
|
#
|
||||||
# Note that the tarfile might produce the "Cannot stat: No such file or directory" error
|
# Note that the tarfile might produce the "Cannot stat: No such file or directory" error
|
||||||
# message for .PNG files that are not present when building a particular branch. The
|
# message for .PNG files that are not present when building a particular branch. The
|
||||||
# list of files is all-inclusive for all branches.
|
# list of files is all-inclusive for all branches. Note, if you don't provide a BRANCH
|
||||||
|
# option, it defaults to the latest stuff. This would be appropriate for "master" branch.
|
||||||
#
|
#
|
||||||
|
|
||||||
ifeq ($(BRANCH),edison)
|
ifeq ($(BRANCH),edison)
|
||||||
@@ -94,13 +95,22 @@ TARFILES = style.css dev-manual.html dev-manual.pdf \
|
|||||||
figures/kernel-overview-3-edison.png \
|
figures/kernel-overview-3-edison.png \
|
||||||
figures/source-repos.png figures/yp-download.png \
|
figures/source-repos.png figures/yp-download.png \
|
||||||
figures/wip.png
|
figures/wip.png
|
||||||
else
|
else ifeq ($(BRANCH),denzil)
|
||||||
TARFILES = style.css dev-manual.html dev-manual.pdf \
|
TARFILES = style.css dev-manual.html dev-manual.pdf \
|
||||||
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
||||||
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
||||||
figures/kernel-example-repos.png \
|
figures/kernel-example-repos-denzil.png \
|
||||||
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||||
figures/kernel-overview-3.png \
|
figures/kernel-overview-3-denzil.png \
|
||||||
|
figures/source-repos.png figures/yp-download.png \
|
||||||
|
figures/wip.png
|
||||||
|
else
|
||||||
|
TARFILES = style.css dev-manual.html dev-manual.pdf \
|
||||||
|
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
||||||
|
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
||||||
|
figures/kernel-example-repos-denzil.png \
|
||||||
|
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||||
|
figures/kernel-overview-3-denzil.png \
|
||||||
figures/source-repos.png figures/yp-download.png \
|
figures/source-repos.png figures/yp-download.png \
|
||||||
figures/wip.png
|
figures/wip.png
|
||||||
endif
|
endif
|
||||||
@@ -195,7 +205,7 @@ validate:
|
|||||||
|
|
||||||
publish:
|
publish:
|
||||||
scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)
|
scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)
|
||||||
cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)/figures
|
cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(MANUALS)
|
rm -f $(MANUALS)
|
||||||
|
|||||||
@@ -324,7 +324,7 @@
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para><emphasis>Point to the Toolchain:</emphasis>
|
<listitem><para><emphasis>Point to the Toolchain:</emphasis>
|
||||||
If you are using a stand-alone pre-built toolchain, you should be pointing to the
|
If you are using a stand-alone pre-built toolchain, you should be pointing to the
|
||||||
<filename>/opt/poky/1.1</filename> directory.
|
<filename>&YOCTO_ADTPATH_DIR;</filename> directory.
|
||||||
This is the location for toolchains installed by the ADT Installer or by hand.
|
This is the location for toolchains installed by the ADT Installer or by hand.
|
||||||
Sections "<link linkend='configuring-and-running-the-adt-installer-script'>Configuring
|
Sections "<link linkend='configuring-and-running-the-adt-installer-script'>Configuring
|
||||||
and Running the ADT Installer Script</link>" and
|
and Running the ADT Installer Script</link>" and
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||||
|
|
||||||
<book id='adt-manual' lang='en'
|
<book id='adt-manual' lang='en'
|
||||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||||
xmlns="http://docbook.org/ns/docbook"
|
xmlns="http://docbook.org/ns/docbook"
|
||||||
>
|
>
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
|
|
||||||
<mediaobject>
|
<mediaobject>
|
||||||
<imageobject>
|
<imageobject>
|
||||||
<imagedata fileref='figures/adt-title.png'
|
<imagedata fileref='figures/adt-title.png'
|
||||||
format='SVG'
|
format='SVG'
|
||||||
align='left' scalefit='1' width='100%'/>
|
align='left' scalefit='1' width='100%'/>
|
||||||
</imageobject>
|
</imageobject>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<title></title>
|
<title></title>
|
||||||
@@ -46,8 +46,18 @@
|
|||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.2</revnumber>
|
<revnumber>1.2</revnumber>
|
||||||
<date>TBD 2012</date>
|
<date>April 2012</date>
|
||||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.1</revnumber>
|
||||||
|
<date>July 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.2</revnumber>
|
||||||
|
<date>January 2013</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.2 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
@@ -58,12 +68,13 @@
|
|||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
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.
|
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>
|
</para>
|
||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and the
|
documentation bundled in the release tarball and the
|
||||||
<ulink url='&YOCTO_DOCS_ADT_URL;'>
|
<ulink url='&YOCTO_DOCS_ADT_URL;'>
|
||||||
Application Developer's Toolkit (ADT) User's Guide</ulink> on
|
Application Developer's Toolkit (ADT) User's Guide</ulink> on
|
||||||
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
||||||
@@ -90,6 +101,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||||
|
|
||||||
<book id='bsp-guide' lang='en'
|
<book id='bsp-guide' lang='en'
|
||||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||||
xmlns="http://docbook.org/ns/docbook"
|
xmlns="http://docbook.org/ns/docbook"
|
||||||
>
|
>
|
||||||
@@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
<mediaobject>
|
<mediaobject>
|
||||||
<imageobject>
|
<imageobject>
|
||||||
<imagedata fileref='figures/bsp-title.png'
|
<imagedata fileref='figures/bsp-title.png'
|
||||||
format='SVG'
|
format='SVG'
|
||||||
align='center' scalefit='1' width='100%'/>
|
align='center' scalefit='1' width='100%'/>
|
||||||
</imageobject>
|
</imageobject>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<title></title>
|
<title></title>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
@@ -58,8 +58,18 @@
|
|||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.2</revnumber>
|
<revnumber>1.2</revnumber>
|
||||||
<date>TBD 2012</date>
|
<date>April 2012</date>
|
||||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.1</revnumber>
|
||||||
|
<date>July 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.2</revnumber>
|
||||||
|
<date>January 2013</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.2 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
@@ -70,12 +80,13 @@
|
|||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales</ulink> as
|
||||||
|
published by Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and the
|
documentation bundled in the release tarball and the
|
||||||
<ulink url='&YOCTO_DOCS_BSP_URL;'>
|
<ulink url='&YOCTO_DOCS_BSP_URL;'>
|
||||||
Board Support Package (BSP) Developer's Guide</ulink> on
|
Board Support Package (BSP) Developer's Guide</ulink> on
|
||||||
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
||||||
@@ -93,6 +104,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -19,46 +19,13 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This chapter (or document if you are reading the BSP Developer's Guide) defines
|
This chapter (or document if you are reading the BSP Developer's Guide)
|
||||||
a structure for these components
|
talks about BSP Layers, defines a structure for components
|
||||||
so that BSPs follow a commonly understood layout.
|
so that BSPs follow a commonly understood layout, discusses how to customize
|
||||||
Providing a common form allows end-users to understand and become familiar
|
a recipe for a BSP, addresses BSP licensing, and provides information that
|
||||||
with the layout.
|
shows you how to create and manage a
|
||||||
A common form also encourages standardization
|
<link linkend='bsp-layers'>BSP Layer</link> using two Yocto Project
|
||||||
of software support of hardware.
|
<link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
|
||||||
</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='&YOCTO_DOCS_DEV_URL;#dev-manual-bsp-appendix'>BSP Development Example</ulink>"
|
|
||||||
section in The Yocto Project Development Manual.
|
|
||||||
You can also see the
|
|
||||||
<ulink url='&YOCTO_WIKI_URL;/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 Yocto Project and
|
|
||||||
OpenEmbedded build systems.
|
|
||||||
It is intended that this information can be
|
|
||||||
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.
|
|
||||||
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
|
|
||||||
useful for any person wishing to use the hardware platform regardless of
|
|
||||||
the build system they are using.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The BSP specification does not include a build system or other tools -
|
|
||||||
it is concerned with the hardware-specific components only.
|
|
||||||
At the end-distribution point, you can ship the BSP combined with a build system
|
|
||||||
and other tools.
|
|
||||||
However, it is important to maintain the distinction that these
|
|
||||||
are separate components that happen to be combined in certain end products.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='bsp-layers'>
|
<section id='bsp-layers'>
|
||||||
@@ -99,13 +66,19 @@
|
|||||||
top of the BSP's root layer in order to be functional.
|
top of the BSP's root layer in order to be functional.
|
||||||
For these cases, you also need to add those layers to the
|
For these cases, you also need to add those layers to the
|
||||||
<filename>BBLAYERS</filename> variable in order to build the BSP.
|
<filename>BBLAYERS</filename> variable in order to build the BSP.
|
||||||
You must also specify in the "Dependiencies" section of the BSP's
|
You must also specify in the "Dependencies" section of the BSP's
|
||||||
<filename>README</filename> file any requirements for additional
|
<filename>README</filename> file any requirements for additional
|
||||||
layers and, preferably, any
|
layers and, preferably, any
|
||||||
build instructions that might be contained elsewhere
|
build instructions that might be contained elsewhere
|
||||||
in the <filename>README</filename> file.
|
in the <filename>README</filename> file.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Some layers function as a layer to hold other BSP layers.
|
||||||
|
An example of this type of layer is the <filename>meta-intel</filename> layer.
|
||||||
|
The <filename>meta-intel</filename> layer contains over 10 individual BSP layers.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For more detailed information on layers, see the
|
For more detailed information on layers, see the
|
||||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
|
||||||
@@ -119,6 +92,44 @@
|
|||||||
<section id="bsp-filelayout">
|
<section id="bsp-filelayout">
|
||||||
<title>Example Filesystem Layout</title>
|
<title>Example Filesystem Layout</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Providing a common form allows end-users to understand and become familiar
|
||||||
|
with the layout.
|
||||||
|
A common format also encourages standardization of software support of hardware.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The proposed form 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 Yocto Project and OpenEmbedded and that it will be simple
|
||||||
|
to extract information and convert it to other formats if required.
|
||||||
|
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
|
||||||
|
useful for any person wishing to use the hardware platform regardless of
|
||||||
|
the build system they are using.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The BSP specification does not include a build system or other tools -
|
||||||
|
it is concerned with the hardware-specific components only.
|
||||||
|
At the end-distribution point, you can ship the BSP combined with a build system
|
||||||
|
and other tools.
|
||||||
|
However, it is important to maintain the distinction that these
|
||||||
|
are separate components that happen to be combined in certain end products.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Before looking at the common form for the file structure inside a BSP Layer,
|
||||||
|
you should be aware that some requirements do exist in order for a BSP to
|
||||||
|
be considered compliant with the Yocto Project.
|
||||||
|
For that list of requirements, see the
|
||||||
|
"<link linkend='released-bsp-requirements'>Released BSP Requirements</link>"
|
||||||
|
section.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Below is the common form for the file structure inside a BSP Layer.
|
Below is the common form for the file structure inside a BSP Layer.
|
||||||
While you can use this basic form for the standard, realize that the actual structures
|
While you can use this basic form for the standard, realize that the actual structures
|
||||||
@@ -128,10 +139,12 @@
|
|||||||
meta-<bsp_name>/
|
meta-<bsp_name>/
|
||||||
meta-<bsp_name>/<bsp_license_file>
|
meta-<bsp_name>/<bsp_license_file>
|
||||||
meta-<bsp_name>/README
|
meta-<bsp_name>/README
|
||||||
|
meta-<bsp_name>/README.sources
|
||||||
meta-<bsp_name>/binary/<bootable_images>
|
meta-<bsp_name>/binary/<bootable_images>
|
||||||
meta-<bsp_name>/conf/layer.conf
|
meta-<bsp_name>/conf/layer.conf
|
||||||
meta-<bsp_name>/conf/machine/*.conf
|
meta-<bsp_name>/conf/machine/*.conf
|
||||||
meta-<bsp_name>/recipes-bsp/*
|
meta-<bsp_name>/recipes-bsp/*
|
||||||
|
meta-<bsp_name>/recipes-core/*
|
||||||
meta-<bsp_name>/recipes-graphics/*
|
meta-<bsp_name>/recipes-graphics/*
|
||||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_<kernel_rev>.bbappend
|
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_<kernel_rev>.bbappend
|
||||||
</literallayout>
|
</literallayout>
|
||||||
@@ -144,7 +157,7 @@
|
|||||||
meta-crownbay/COPYING.MIT
|
meta-crownbay/COPYING.MIT
|
||||||
meta-crownbay/README
|
meta-crownbay/README
|
||||||
meta-crownbay/README.sources
|
meta-crownbay/README.sources
|
||||||
meta-crownbay/binary
|
meta-crownbay/binary/
|
||||||
meta-crownbay/conf/
|
meta-crownbay/conf/
|
||||||
meta-crownbay/conf/layer.conf
|
meta-crownbay/conf/layer.conf
|
||||||
meta-crownbay/conf/machine/
|
meta-crownbay/conf/machine/
|
||||||
@@ -158,8 +171,8 @@
|
|||||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
||||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/
|
||||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
|
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
|
||||||
meta-crownbay/recipes-core
|
meta-crownbay/recipes-core/
|
||||||
meta-crownbay/recipes-core/tasks
|
meta-crownbay/recipes-core/tasks/
|
||||||
meta-crownbay/recipes-core/tasks/task-core-tools-profile.bbappend
|
meta-crownbay/recipes-core/tasks/task-core-tools-profile.bbappend
|
||||||
meta-crownbay/recipes-graphics/
|
meta-crownbay/recipes-graphics/
|
||||||
meta-crownbay/recipes-graphics/xorg-xserver/
|
meta-crownbay/recipes-graphics/xorg-xserver/
|
||||||
@@ -215,7 +228,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
This file provides information on how to boot the live images that are optionally
|
This file provides information on how to boot the live images that are optionally
|
||||||
included in the <filename>/binary</filename> directory.
|
included in the <filename>binary/</filename> directory.
|
||||||
The <filename>README</filename> file also provides special information needed for
|
The <filename>README</filename> file also provides special information needed for
|
||||||
building the image.
|
building the image.
|
||||||
</para>
|
</para>
|
||||||
@@ -640,6 +653,255 @@
|
|||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='requirements-and-recommendations-for-released-bsps'>
|
||||||
|
<title>Requirements and Recommendations for Released BSPs</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Certain requirements exist for a released BSP to be considered
|
||||||
|
compliant with the Yocto Project.
|
||||||
|
Additionally, a single recommendation also exists.
|
||||||
|
This section describes the requirements and recommendation for
|
||||||
|
released BSPs.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='released-bsp-requirements'>
|
||||||
|
<title>Released BSP Requirements</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Before looking at BSP requirements, you should consider the following:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>The requirements here assume the BSP layer is a well-formed, "legal"
|
||||||
|
layer that can be added to the Yocto Project.
|
||||||
|
For guidelines on creating a Yocto Project layer that meets these base requirements, see the
|
||||||
|
"<link linkend='bsp-layers'>BSP Layers</link>" and the
|
||||||
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding
|
||||||
|
and Creating Layers"</ulink> in the Yocto Project Development Manual.</para></listitem>
|
||||||
|
<listitem><para>The requirements in this section apply regardless of how you
|
||||||
|
ultimately package a BSP.
|
||||||
|
You should consult the packaging and distribution guidelines for your
|
||||||
|
specific release process.
|
||||||
|
For an example of packaging and distribution requirements, see the
|
||||||
|
<ulink url='https://wiki.yoctoproject.org/wiki/Third_Party_BSP_Release_Process'>Third
|
||||||
|
Party BSP Release Process</ulink> wiki page.</para></listitem>
|
||||||
|
<listitem><para>The requirements for the BSP as it is made available to a developer
|
||||||
|
are completely independent of the released form of the BSP.
|
||||||
|
For example, the BSP metadata can be contained within a Git repository
|
||||||
|
and could have a directory structure completely different from what appears
|
||||||
|
in the officially released BSP layer.</para></listitem>
|
||||||
|
<listitem><para>It is not required that specific packages or package
|
||||||
|
modifications exist in the BSP layer, beyond the requirements for general
|
||||||
|
compliance with the Yocto Project.
|
||||||
|
For example, no requirement exists dictating that a specific kernel or
|
||||||
|
kernel version be used in a given BSP.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following are the requirements for a released BSP that conforms to the
|
||||||
|
Yocto Project:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>Layer Name:</emphasis>
|
||||||
|
The BSP must have a layer name that follows the Yocto
|
||||||
|
Project standards.
|
||||||
|
For information on BSP layer names, see the
|
||||||
|
"<link linkend='bsp-layers'>BSP Layers</link>" section.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para><emphasis>File System Layout:</emphasis>
|
||||||
|
When possible, use the same directory names in your
|
||||||
|
BSP layer as listed in the <filename>recipes.txt</filename> file.
|
||||||
|
In particular, you should place recipes
|
||||||
|
(<filename>.bb</filename> files) and recipe
|
||||||
|
modifications (<filename>.bbappend</filename> files) into
|
||||||
|
<filename>recipes-*</filename> subdirectories by functional area
|
||||||
|
as outlined in <filename>recipes.txt</filename>.
|
||||||
|
If you cannot find a category in <filename>recipes.txt</filename>
|
||||||
|
to fit a particular recipe, you can make up your own
|
||||||
|
<filename>recipe-*</filename> subdirectory.
|
||||||
|
You can find <filename>recipes.txt</filename> in the
|
||||||
|
<filename>meta</filename> directory of the
|
||||||
|
<ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-files'>Yocto
|
||||||
|
Project Files</ulink>, or in the OpenEmbedded Core Layer
|
||||||
|
(<filename>openembedded-core</filename>) found at
|
||||||
|
<ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
|
||||||
|
</para>
|
||||||
|
<para>Within any particular <filename>recipes-*</filename> category, the layout
|
||||||
|
should match what is found in the OpenEmbedded Core
|
||||||
|
Git repository (<filename>openembedded-core</filename>)
|
||||||
|
or the Yocto Project Files (<filename>poky</filename>).
|
||||||
|
In other words, make sure you place related files in appropriately
|
||||||
|
related <filename>recipes-*</filename> subdirectories specific to the
|
||||||
|
recipe's function, or within a subdirectory containing a set of closely-related
|
||||||
|
recipes.
|
||||||
|
The recipes themselves should follow the general guidelines
|
||||||
|
for recipes used in the Yocto Project found in the
|
||||||
|
<ulink url='https://wiki.yoctoproject.org/wiki/Recipe_%26_Patch_Style_Guide'>Yocto
|
||||||
|
Recipe and Patch Style Guide</ulink>.</para></listitem>
|
||||||
|
<listitem><para><emphasis>License File:</emphasis>
|
||||||
|
You must include a license file in the
|
||||||
|
<filename>meta-<bsp_name></filename> directory.
|
||||||
|
This license covers the BSP metadata as a whole.
|
||||||
|
You must specify which license to use since there is no
|
||||||
|
default license if one is not specified.
|
||||||
|
See the
|
||||||
|
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fishriver/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
|
||||||
|
file for the Fish River BSP in the <filename>meta-fishriver</filename> BSP layer
|
||||||
|
as an example.</para></listitem>
|
||||||
|
<listitem><para><emphasis>README File:</emphasis>
|
||||||
|
You must include a <filename>README</filename> file in the
|
||||||
|
<filename>meta-<bsp_name></filename> directory.
|
||||||
|
See the
|
||||||
|
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fishriver/README'><filename>README</filename></ulink>
|
||||||
|
file for the Fish River BSP in the <filename>meta-fishriver</filename> BSP layer
|
||||||
|
as an example.</para>
|
||||||
|
<para>At a minimum, the <filename>README</filename> file should
|
||||||
|
contain the following:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>A brief description about the hardware the BSP
|
||||||
|
targets.</para></listitem>
|
||||||
|
<listitem><para>A list of all the dependencies a
|
||||||
|
on which a BSP layer depends.
|
||||||
|
These dependencies are typically a list of required layers needed
|
||||||
|
to build the BSP.
|
||||||
|
However, the dependencies should also contain information regarding
|
||||||
|
any other dependencies the BSP might have.</para></listitem>
|
||||||
|
<listitem><para>Any required special licensing information.
|
||||||
|
For example, this information includes information on
|
||||||
|
special variables needed to satisfy a EULA,
|
||||||
|
or instructions on information needed to build or distribute
|
||||||
|
binaries built from the BSP metadata.</para></listitem>
|
||||||
|
<listitem><para>The name and contact information for the
|
||||||
|
BSP layer maintainer.
|
||||||
|
This is the person to whom patches and questions should
|
||||||
|
be sent.</para></listitem>
|
||||||
|
<listitem><para>Instructions on how to build the BSP using the BSP
|
||||||
|
layer.</para></listitem>
|
||||||
|
<listitem><para>Instructions on how to boot the BSP build from
|
||||||
|
the BSP layer.</para></listitem>
|
||||||
|
<listitem><para>Instructions on how to boot the binary images
|
||||||
|
contained in the <filename>/binary</filename> directory,
|
||||||
|
if present.</para></listitem>
|
||||||
|
<listitem><para>Information on any known bugs or issues that users
|
||||||
|
should know about when either building or booting the BSP
|
||||||
|
binaries.</para></listitem>
|
||||||
|
</itemizedlist></para></listitem>
|
||||||
|
<listitem><para><emphasis>README.sources File:</emphasis>
|
||||||
|
You must include a <filename>README.sources</filename> in the
|
||||||
|
<filename>meta-<bsp_name></filename> directory.
|
||||||
|
This file specifies exactly where you can find the sources used to
|
||||||
|
generate the binary images contained in the
|
||||||
|
<filename>/binary</filename> directory, if present.
|
||||||
|
See the
|
||||||
|
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fishriver/README.sources'><filename>README.sources</filename></ulink>
|
||||||
|
file for the Fish River BSP in the <filename>meta-fishriver</filename> BSP layer
|
||||||
|
as an example.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Layer Configuration File:</emphasis>
|
||||||
|
You must include a <filename>conf/layer.conf</filename> in the
|
||||||
|
<filename>meta-<bsp_name></filename> directory.
|
||||||
|
This file identifies the <filename>meta-<bsp_name></filename>
|
||||||
|
BSP layer as a layer to the build system.</para></listitem>
|
||||||
|
<listitem><para><emphasis>Machine Configuration File:</emphasis>
|
||||||
|
You must include a <filename>conf/machine/<bsp_name>.conf</filename>
|
||||||
|
in the <filename>meta-<bsp_name></filename> directory.
|
||||||
|
This configuration file defines a machine target that can be built
|
||||||
|
using the BSP layer.
|
||||||
|
Multiple machine configuration files define variations of machine
|
||||||
|
configurations that are supported by the BSP.
|
||||||
|
If a BSP supports more multiple machine variations, you need to
|
||||||
|
adequately describe each variation in the BSP
|
||||||
|
<filename>README</filename> file.
|
||||||
|
Do not use multiple machine configuration files to describe disparate
|
||||||
|
hardware.
|
||||||
|
Multiple machine configuration files should describe very similar targets.
|
||||||
|
If you do have very different targets, you should create a separate
|
||||||
|
BSP.
|
||||||
|
<note>It is completely possible for a developer to structure the
|
||||||
|
working repository as a conglomeration of unrelated BSP
|
||||||
|
files, and to possibly generate specifically targeted 'release' BSPs
|
||||||
|
from that directory using scripts or some other mechanism.
|
||||||
|
Such considerations are outside the scope of this document.</note>
|
||||||
|
</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='released-bsp-recommendations'>
|
||||||
|
<title>Released BSP Recommendations</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following are recommendations for a released BSP that conforms to the
|
||||||
|
Yocto Project:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para><emphasis>Bootable Images:</emphasis>
|
||||||
|
BSP releases
|
||||||
|
can contain one or more bootable images.
|
||||||
|
Including bootable images allows users to easily try out the BSP
|
||||||
|
on their own hardware.</para>
|
||||||
|
<para>In some cases, it might not be convenient to include a
|
||||||
|
bootable image.
|
||||||
|
In this case, you might want to make two versions of the
|
||||||
|
BSP available: one that contains binary images, and one
|
||||||
|
that does not.
|
||||||
|
The version that does not contain bootable images avoids
|
||||||
|
unnecessary download times for users not interested in the images.
|
||||||
|
</para>
|
||||||
|
<para>If you need to distribute a BSP and include bootable images or build kernel and
|
||||||
|
filesystems meant to allow users to boot the BSP for evaluation
|
||||||
|
purposes, you should put the images and artifacts within a
|
||||||
|
<filename>binary/</filename> subdirectory located in the
|
||||||
|
<filename>meta-<bsp_name></filename> directory.
|
||||||
|
<note>If you do include a bootable image as part of the BSP and the image
|
||||||
|
was built by software covered by the GPL or other open source licenses,
|
||||||
|
it is your responsibility to understand
|
||||||
|
and meet all licensing requirements, which could include distribution
|
||||||
|
of source files.</note></para></listitem>
|
||||||
|
<listitem><para><emphasis>Use a Yocto Linux Kernel:</emphasis>
|
||||||
|
Kernel recipes in the BSP should be based on a Yocto Linux kernel.
|
||||||
|
Basing your recipes on these kernels reduces the costs for maintaining
|
||||||
|
the BSP and increases its scalability.
|
||||||
|
See the <filename>Yocto Linux Kernel</filename> category in the
|
||||||
|
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'><filename>Yocto Source Repositories</filename></ulink>
|
||||||
|
for these kernels.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='customizing-a-recipe-for-a-bsp'>
|
||||||
|
<title>Customizing a Recipe for a BSP</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If you plan on customizing a recipe for a particular BSP, you need to do the
|
||||||
|
following:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>Include within the BSP layer a <filename>.bbappend</filename>
|
||||||
|
file for the modified recipe.</para></listitem>
|
||||||
|
<listitem><para>Place the BSP-specific file in the BSP's recipe
|
||||||
|
<filename>.bbappend</filename> file path under a directory named
|
||||||
|
after the machine.</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To better understand this, consider an example that customizes a recipe by adding
|
||||||
|
a BSP-specific configuration file named <filename>interfaces</filename> to the
|
||||||
|
<filename>netbase_4.47.bb</filename> recipe for machine "xyz".
|
||||||
|
Do the following:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>Edit the <filename>netbase_4.47.bbappend</filename> file so that it
|
||||||
|
contains the following:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
|
||||||
|
PRINC := "${@int(PRINC) + 2}"
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
<listitem><para>Create and place the new <filename>interfaces</filename>
|
||||||
|
configuration file in the BSP's layer here:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
meta-xyz/recipes-core/netbase/files/xyz/interfaces
|
||||||
|
</literallayout></para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='bsp-licensing-considerations'>
|
<section id='bsp-licensing-considerations'>
|
||||||
<title>BSP Licensing Considerations</title>
|
<title>BSP Licensing Considerations</title>
|
||||||
|
|
||||||
@@ -720,7 +982,7 @@
|
|||||||
restart the build to continue where it left off.
|
restart the build to continue where it left off.
|
||||||
During the build, the prompt will not appear again
|
During the build, the prompt will not appear again
|
||||||
since you have satisfied the requirement.</para>
|
since you have satisfied the requirement.</para>
|
||||||
<para>Once the appropriate license flags are whitelisted
|
<para>Once the appropriate license flags are on the white list
|
||||||
in the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, you
|
in the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, you
|
||||||
can build the encumbered image with no change at all
|
can build the encumbered image with no change at all
|
||||||
to the normal build process.</para></listitem>
|
to the normal build process.</para></listitem>
|
||||||
@@ -754,4 +1016,452 @@
|
|||||||
You must eventually rebuild the image if you want to remove this restriction.
|
You must eventually rebuild the image if you want to remove this restriction.
|
||||||
</note>
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='using-the-yocto-projects-bsp-tools'>
|
||||||
|
<title>Using the Yocto Project's BSP Tools</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The Yocto Project includes a couple of tools that enable
|
||||||
|
you to create a <link linkend='bsp-layers'>BSP layer</link>
|
||||||
|
from scratch and do basic configuration and maintenance
|
||||||
|
of the kernel without ever looking at a Yocto Project metadata file.
|
||||||
|
These tools are <filename>yocto-bsp</filename> and <filename>yocto-kernel</filename>,
|
||||||
|
respectively.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following sections describe the common location and help features as well
|
||||||
|
as details for the <filename>yocto-bsp</filename> and <filename>yocto-kernel</filename>
|
||||||
|
tools.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='common-features'>
|
||||||
|
<title>Common Features</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Designed to have a command interface somewhat like
|
||||||
|
<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>, each
|
||||||
|
tool is structured as a set of sub-commands under a
|
||||||
|
top-level command.
|
||||||
|
The top-level command (<filename>yocto-bsp</filename>
|
||||||
|
or <filename>yocto-kernel</filename>) itself does
|
||||||
|
nothing but invoke or provide help on the sub-commands
|
||||||
|
it supports.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Both tools reside in the <filename>scripts/</filename> subdirectory
|
||||||
|
of the <ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-files'>Yocto Project
|
||||||
|
Files</ulink>.
|
||||||
|
Consequently, to use the scripts, you must <filename>source</filename> the
|
||||||
|
environment just as you would when invoking a build:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ source oe-init-build-env [build_dir]
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The most immediately useful function is to get help on both tools.
|
||||||
|
The built-in help system makes it easy to drill down at
|
||||||
|
any time and view the syntax required for any specific command.
|
||||||
|
Simply enter the name of the command, or the command along with
|
||||||
|
<filename>help</filename> to display a list of the available sub-commands.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-bsp
|
||||||
|
$ yocto-bsp help
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
Create a customized Yocto BSP layer.
|
||||||
|
|
||||||
|
usage: yocto-bsp [--version] [--help] COMMAND [ARGS]
|
||||||
|
|
||||||
|
The most commonly used 'yocto-bsp' commands are:
|
||||||
|
create Create a new Yocto BSP
|
||||||
|
list List available values for options and BSP properties
|
||||||
|
|
||||||
|
See 'yocto-bsp help COMMAND' for more information on a specific command.
|
||||||
|
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--version show program's version number and exit
|
||||||
|
-h, --help show this help message and exit
|
||||||
|
-D, --debug output debug information
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Similarly, entering just the name of a sub-command shows the detailed usage
|
||||||
|
for that sub-command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-bsp create
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
Create a new Yocto BSP
|
||||||
|
usage: yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
|
||||||
|
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
|
||||||
|
|
||||||
|
This command creates a Yocto BSP based on the specified parameters.
|
||||||
|
The new BSP will be a new Yocto BSP layer contained by default within
|
||||||
|
the top-level directory specified as 'meta-bsp-name'. The -o option
|
||||||
|
can be used to place the BSP layer in a directory with a different
|
||||||
|
name and location.
|
||||||
|
|
||||||
|
...
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For any sub-command, you can also use the word 'help' just before the
|
||||||
|
sub-command to get more extensive documentation:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-bsp help create
|
||||||
|
|
||||||
|
NAME
|
||||||
|
yocto-bsp create - Create a new Yocto BSP
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
|
||||||
|
[-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
This command creates a Yocto BSP based on the specified
|
||||||
|
parameters. The new BSP will be a new Yocto BSP layer contained
|
||||||
|
by default within the top-level directory specified as
|
||||||
|
'meta-bsp-name'. The -o option can be used to place the BSP layer
|
||||||
|
in a directory with a different name and location.
|
||||||
|
|
||||||
|
The value of the 'karch' parameter determines the set of files
|
||||||
|
that will be generated for the BSP, along with the specific set of
|
||||||
|
'properties' that will be used to fill out the BSP-specific
|
||||||
|
portions of the BSP.
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
NOTE: Once created, you should add your new layer to your
|
||||||
|
bblayers.conf file in order for it to be subsequently seen and
|
||||||
|
modified by the yocto-kernel tool.
|
||||||
|
|
||||||
|
NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the
|
||||||
|
presence of the of the meta-intel layer, so you should also have a
|
||||||
|
meta-intel layer present and added to your bblayers.conf as well.
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Now that you know where these two commands reside and how to access information
|
||||||
|
on them, you should find it relatively straightforward to discover the commands
|
||||||
|
necessary to create a BSP and perform basic kernel maintenance on that BSP using
|
||||||
|
the tools.
|
||||||
|
The next sections provide a concrete starting point to expand on a few points that
|
||||||
|
might not be immediately obvious or that could use further explanation.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section id='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>
|
||||||
|
<title>Creating a new BSP Layer Using the yocto-bsp Script</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>yocto-bsp</filename> script creates a new
|
||||||
|
<link linkend='bsp-layers'>BSP layer</link> for any architecture supported
|
||||||
|
by the Yocto Project, as well as QEMU versions of the same.
|
||||||
|
The default mode of the script's operation is to prompt you for information needed
|
||||||
|
to generate the BSP layer.
|
||||||
|
For the current set of BSPs, the script prompts you for various important
|
||||||
|
parameters such as:
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem><para>which kernel to use</para></listitem>
|
||||||
|
<listitem><para>which branch of that kernel to use (or re-use)</para></listitem>
|
||||||
|
<listitem><para>whether or not to use X, and if so, which drivers to use</para></listitem>
|
||||||
|
<listitem><para>whether to turn on SMP</para></listitem>
|
||||||
|
<listitem><para>whether the BSP has a keyboard</para></listitem>
|
||||||
|
<listitem><para>whether the BSP has a touchscreen</para></listitem>
|
||||||
|
<listitem><para>any remaining configurable items associated with the BSP</para></listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You use the <filename>yocto-bsp create</filename> sub-command to create
|
||||||
|
a new BSP layer.
|
||||||
|
This command requires you to specify a particular architecture on which to
|
||||||
|
base the BSP.
|
||||||
|
Assuming you have sourced the environment, you can use the
|
||||||
|
<filename>yocto-bsp list karch</filename> sub-command to list the
|
||||||
|
architectures available for BSP creation as follows:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-bsp list karch
|
||||||
|
Architectures available:
|
||||||
|
arm
|
||||||
|
powerpc
|
||||||
|
i386
|
||||||
|
mips
|
||||||
|
x86_64
|
||||||
|
qemu
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The remainder of this section presents an example that uses
|
||||||
|
<filename>myarm</filename> as the machine name and <filename>qemu</filename>
|
||||||
|
as the machine architecture.
|
||||||
|
Of the available architectures, <filename>qemu</filename> is the only architecture
|
||||||
|
that causes the script to prompt you further for an actual architecture.
|
||||||
|
In every other way, this architecture is representative of how creating a BSP for
|
||||||
|
a 'real' machine would work.
|
||||||
|
The reason the example uses this architecture is because it is an emulated architecture
|
||||||
|
and can easily be followed without requiring actual hardware.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
As the <filename>yocto-bsp create</filename> command runs, default values for
|
||||||
|
the prompts appear in brackets.
|
||||||
|
Pressing enter without supplying anything on the command line or pressing enter
|
||||||
|
and providing an invalid response causes the script to accept the default value.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Following is the complete example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-bsp create myarm qemu
|
||||||
|
Which qemu architecture would you like to use? [default: x86]
|
||||||
|
1) common 32-bit x86
|
||||||
|
2) common 64-bit x86
|
||||||
|
3) common 32-bit ARM
|
||||||
|
4) common 32-bit PowerPC
|
||||||
|
5) common 32-bit MIPS
|
||||||
|
3
|
||||||
|
Would you like to use the default (3.2) kernel? (Y/n)
|
||||||
|
Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [Y/n]
|
||||||
|
Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.2...
|
||||||
|
Please choose a machine branch to base this BSP on => [default: standard/default/common-pc]
|
||||||
|
1) base
|
||||||
|
2) standard/base
|
||||||
|
3) standard/default/arm-versatile-926ejs
|
||||||
|
4) standard/default/base
|
||||||
|
5) standard/default/beagleboard
|
||||||
|
6) standard/default/cedartrailbsp (copy).xml
|
||||||
|
7) standard/default/common-pc-64/base
|
||||||
|
8) standard/default/common-pc-64/jasperforest
|
||||||
|
9) standard/default/common-pc-64/romley
|
||||||
|
10) standard/default/common-pc-64/sugarbay
|
||||||
|
11) standard/default/common-pc/atom-pc
|
||||||
|
12) standard/default/common-pc/base
|
||||||
|
13) standard/default/crownbay
|
||||||
|
14) standard/default/emenlow
|
||||||
|
15) standard/default/fishriver
|
||||||
|
16) standard/default/fri2
|
||||||
|
17) standard/default/fsl-mpc8315e-rdb
|
||||||
|
18) standard/default/mti-malta32-be
|
||||||
|
19) standard/default/mti-malta32-le
|
||||||
|
20) standard/default/preempt-rt
|
||||||
|
21) standard/default/qemu-ppc32
|
||||||
|
22) standard/default/routerstationpro
|
||||||
|
23) standard/preempt-rt/base
|
||||||
|
24) standard/preempt-rt/qemu-ppc32
|
||||||
|
25) standard/preempt-rt/routerstationpro
|
||||||
|
26) standard/tiny
|
||||||
|
3
|
||||||
|
Do you need SMP support? (Y/n)
|
||||||
|
Does your BSP have a touchscreen? (y/N)
|
||||||
|
Does your BSP have a keyboard? (Y/n)
|
||||||
|
New qemu BSP created in meta-myarm
|
||||||
|
</literallayout>
|
||||||
|
Let's take a closer look at the example now:
|
||||||
|
<orderedlist>
|
||||||
|
<listitem><para>For the <filename>qemu</filename> architecture,
|
||||||
|
the script first prompts you for which emulated architecture to use.
|
||||||
|
In the example, we use the <filename>arm</filename> architecture.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>The script then prompts you for the kernel.
|
||||||
|
The default kernel is 3.2 and is acceptable.
|
||||||
|
So, the example accepts the default.
|
||||||
|
If you enter 'n', the script prompts you to further enter the kernel
|
||||||
|
you do want to use (e.g. 3.0, 3.2_preempt-rt, etc.).</para></listitem>
|
||||||
|
<listitem><para>Next, the script asks whether you would like to have a new
|
||||||
|
branch created especially for your BSP in the local
|
||||||
|
<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>
|
||||||
|
Git repository .
|
||||||
|
If not, then the script re-uses an existing branch.</para>
|
||||||
|
<para>In this example, the default (or 'yes') is accepted.
|
||||||
|
Thus, a new branch is created for the BSP rather than using a common, shared
|
||||||
|
branch.
|
||||||
|
The new branch is the branch committed to for any patches you might later add.
|
||||||
|
The reason a new branch is the default is that typically
|
||||||
|
new BSPs do require BSP-specific patches.
|
||||||
|
The tool thus assumes that most of time a new branch is required.
|
||||||
|
<note>In the current implementation, creation or re-use of a branch does
|
||||||
|
not actually matter.
|
||||||
|
The reason is because the generated BSPs assume that patches and
|
||||||
|
configurations live in recipe-space, which is something that can be done
|
||||||
|
with or without a dedicated branch.
|
||||||
|
Generated BSPs, however, are different.
|
||||||
|
This difference becomes significant once the tool's 'publish' functionality
|
||||||
|
is implemented.</note></para></listitem>
|
||||||
|
<listitem><para>Regardless of which choice is made in the previous step,
|
||||||
|
you are now given the opportunity to select a particular machine branch on
|
||||||
|
which to base your new BSP-specific machine branch on
|
||||||
|
(or to re-use if you had elected to not create a new branch).
|
||||||
|
Because this example is generating an <filename>arm</filename> BSP, the example
|
||||||
|
uses <filename>#3</filename> at the prompt, which selects the arm-versatile branch.
|
||||||
|
</para></listitem>
|
||||||
|
<listitem><para>The remainder of the prompts are routine.
|
||||||
|
Defaults are accepted for each.</para></listitem>
|
||||||
|
<listitem><para>By default, the script creates the new BSP Layer in the
|
||||||
|
<ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-build-directory'>Yocto Project
|
||||||
|
Build Directory</ulink>.</para></listitem>
|
||||||
|
</orderedlist>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Once the BSP Layer is created, you must add it to your
|
||||||
|
<filename>bblayers.conf</filename> file.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
BBLAYERS = " \
|
||||||
|
/usr/local/src/yocto/meta \
|
||||||
|
/usr/local/src/yocto/meta-yocto \
|
||||||
|
/usr/local/src/yocto/meta-myarm \
|
||||||
|
"
|
||||||
|
</literallayout>
|
||||||
|
Adding the layer to this file allows the build system to build the BSP and
|
||||||
|
the <filename>yocto-kernel</filename> tool to be able to find the layer and
|
||||||
|
other metadata it needs on which to operate.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='managing-kernel-patches-and-config-items-with-yocto-kernel'>
|
||||||
|
<title>Managing Kernel Patches and Config Items with yocto-kernel</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Assuming you have created a Yocto Project
|
||||||
|
<link linkend='bsp-layers'>BSP Layer</link> using
|
||||||
|
<link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>
|
||||||
|
<filename>yocto-bsp</filename></link> and you added it to your
|
||||||
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
|
||||||
|
variable in the <filename>bblayers.conf</filename> file, you can now use
|
||||||
|
the <filename>yocto-kernel</filename> script to add patches and configuration
|
||||||
|
items to the BSP's kernel.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>yocto-kernel</filename> script allows you to add, remove, and list patches
|
||||||
|
and kernel config settings to a Yocto Project BSP's kernel
|
||||||
|
<filename>.bbappend</filename> file.
|
||||||
|
All you need to do is use the appropriate sub-command.
|
||||||
|
Recall that the easiest way to see exactly what sub-commands are available
|
||||||
|
is to use the <filename>yocto-kernel</filename> built-in help as follows:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-kernel
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
Modify and list Yocto BSP kernel config items and patches.
|
||||||
|
|
||||||
|
usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
|
||||||
|
|
||||||
|
The most commonly used 'yocto-kernel' commands are:
|
||||||
|
config list List the modifiable set of bare kernel config options for a BSP
|
||||||
|
config add Add or modify bare kernel config options for a BSP
|
||||||
|
config rm Remove bare kernel config options from a BSP
|
||||||
|
patch list List the patches associated with a BSP
|
||||||
|
patch add Patch the Yocto kernel for a BSP
|
||||||
|
patch rm Remove patches from a BSP
|
||||||
|
|
||||||
|
See 'yocto-kernel help COMMAND' for more information on a specific command.
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The <filename>yocto-kernel patch add</filename> sub-command allows you to add a
|
||||||
|
patch to a BSP.
|
||||||
|
The following example adds two patches to the <filename>myarm</filename> BSP:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-kernel patch add myarm ~/test.patch
|
||||||
|
Added patches:
|
||||||
|
test.patch
|
||||||
|
|
||||||
|
$ yocto-kernel patch add myarm ~/yocto-testmod.patch
|
||||||
|
Added patches:
|
||||||
|
yocto-testmod.patch
|
||||||
|
</literallayout>
|
||||||
|
<note>Although the previous example adds patches one at a time, it is possible
|
||||||
|
to add multiple patches at the same time.</note>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can verify patches have been added by using the
|
||||||
|
<filename>yocto-kernel patch list</filename> sub-command.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-kernel patch list myarm
|
||||||
|
The current set of machine-specific patches for myarm is:
|
||||||
|
1) test.patch
|
||||||
|
2) yocto-testmod.patch
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can also use the <filename>yocto-kernel</filename> script to
|
||||||
|
remove a patch using the <filename>yocto-kernel patch rm</filename> sub-command.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-kernel patch rm myarm
|
||||||
|
Specify the patches to remove:
|
||||||
|
1) test.patch
|
||||||
|
2) yocto-testmod.patch
|
||||||
|
1
|
||||||
|
Removed patches:
|
||||||
|
test.patch
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Again, using the <filename>yocto-kernel patch list</filename> sub-command,
|
||||||
|
you can verify that the patch was in fact removed:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-kernel patch list myarm
|
||||||
|
The current set of machine-specific patches for myarm is:
|
||||||
|
1) yocto-testmod.patch
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In a completely similar way, you can use the <filename>yocto-kernel config add</filename>
|
||||||
|
sub-command to add one or more kernel config item settings to a BSP.
|
||||||
|
The following commands add a couple of config items to the
|
||||||
|
<filename>myarm</filename> BSP:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-kernel config add myarm CONFIG_MISC_DEVICES=y
|
||||||
|
Added items:
|
||||||
|
CONFIG_MISC_DEVICES=y
|
||||||
|
|
||||||
|
$ yocto-kernel config add myarm KCONFIG_YOCTO_TESTMOD=y
|
||||||
|
Added items:
|
||||||
|
CONFIG_YOCTO_TESTMOD=y
|
||||||
|
</literallayout>
|
||||||
|
<note>Although the previous example adds config items one at a time, it is possible
|
||||||
|
to add multiple config items at the same time.</note>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can list the config items now associated with the BSP.
|
||||||
|
Doing so shows you the config items you added as well as others associated
|
||||||
|
with the BSP:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ yocto-kernel config list myarm
|
||||||
|
The current set of machine-specific kernel config items for myarm is:
|
||||||
|
1) CONFIG_MISC_DEVICES=y
|
||||||
|
2) CONFIG_YOCTO_TESTMOD=y
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Finally, you can remove one or more config items using the
|
||||||
|
<filename>yocto-kernel config rm</filename> sub-command in a manner
|
||||||
|
completely analogous to <filename>yocto-kernel patch rm</filename>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|||||||
@@ -43,10 +43,10 @@
|
|||||||
$ git clone git://git.yoctoproject.org/poky
|
$ git clone git://git.yoctoproject.org/poky
|
||||||
$ cd poky
|
$ cd poky
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Alternatively, you can start with the downloaded Poky "edison" tarball.
|
Alternatively, you can start with the downloaded Poky "&DISTRO_NAME;" tarball.
|
||||||
These commands unpack the tarball into a Yocto Project File directory structure.
|
These commands unpack the tarball into a Yocto Project File directory structure.
|
||||||
By default, the top-level directory of the file structure is named
|
By default, the top-level directory of the file structure is named
|
||||||
<filename>poky-&YOCTO_POKY;</filename>:
|
<filename>&YOCTO_POKY;</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ tar xfj &YOCTO_POKY_TARBALL;
|
$ tar xfj &YOCTO_POKY_TARBALL;
|
||||||
$ cd &YOCTO_POKY;
|
$ cd &YOCTO_POKY;
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<note><para>If you're using the tarball method, you can ignore all the following steps that
|
<note><para>If you're using the tarball method, you can ignore all the following steps that
|
||||||
ask you to carry out Git operations.
|
ask you to carry out Git operations.
|
||||||
You already have the results of those operations
|
You already have the results of those operations
|
||||||
in the form of the edison release tarballs.
|
in the form of the &DISTRO_NAME; release tarballs.
|
||||||
Consequently, there is nothing left to do other than extract those tarballs into the
|
Consequently, there is nothing left to do other than extract those tarballs into the
|
||||||
proper locations.</para>
|
proper locations.</para>
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
and keep changes in revision control.
|
and keep changes in revision control.
|
||||||
See the
|
See the
|
||||||
"<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>" section
|
"<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>" section
|
||||||
for more discussion around these differneces.</para></note>
|
for more discussion around these differences.</para></note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -133,7 +133,8 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
You need to have the base BSP layer on your development system.
|
You need to have the base BSP layer on your development system.
|
||||||
Similar to the local Yocto Project files, you can get the BSP
|
Similar to the local <link linkend='yocto-project-files'>Yocto Project Files</link>,
|
||||||
|
you can get the BSP
|
||||||
layer in a couple of different ways:
|
layer in a couple of different ways:
|
||||||
download the BSP tarball and extract it, or set up a local Git repository that
|
download the BSP tarball and extract it, or set up a local Git repository that
|
||||||
has the Yocto Project BSP layers.
|
has the Yocto Project BSP layers.
|
||||||
@@ -160,15 +161,15 @@
|
|||||||
$ cd meta-intel
|
$ cd meta-intel
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Alternatively, you can start with the downloaded Crown Bay tarball.
|
Alternatively, you can start with the downloaded Crown Bay tarball.
|
||||||
You can download the edison version of the BSP tarball from the
|
You can download the &DISTRO_NAME; version of the BSP tarball from the
|
||||||
<ulink url='&YOCTO_HOME_URL;/download'>Download</ulink> page of the
|
<ulink url='&YOCTO_HOME_URL;/download'>Download</ulink> page of the
|
||||||
Yocto Project website.
|
Yocto Project website.
|
||||||
Here is the specific link for the tarball needed for this example:
|
Here is the specific link for the tarball needed for this example:
|
||||||
<ulink url='&YOCTO_MACHINES_DL_URL;/crownbay-noemgd/crownbay-noemgd-&DISTRO_NAME;-6.0.0.tar.bz2'></ulink>.
|
<ulink url='&YOCTO_MACHINES_DL_URL;/crownbay-noemgd/crownbay-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2'></ulink>.
|
||||||
Again, be sure that you are already in the <filename>poky</filename> directory
|
Again, be sure that you are already in the <filename>poky</filename> directory
|
||||||
as described previously before installing the tarball:
|
as described previously before installing the tarball:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ tar xfj crownbay-noemgd-&DISTRO_NAME;-6.0.0.tar.bz2
|
$ tar xfj crownbay-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2
|
||||||
$ cd meta-intel
|
$ cd meta-intel
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -177,7 +178,7 @@
|
|||||||
The <filename>meta-intel</filename> directory contains all the metadata
|
The <filename>meta-intel</filename> directory contains all the metadata
|
||||||
that supports BSP creation.
|
that supports BSP creation.
|
||||||
If you're using the Git method, the following
|
If you're using the Git method, the following
|
||||||
step will switch to the edison metadata.
|
step will switch to the &DISTRO_NAME; metadata.
|
||||||
If you're using the tarball method, you already have the correct metadata and can
|
If you're using the tarball method, you already have the correct metadata and can
|
||||||
skip to the next step.
|
skip to the next step.
|
||||||
Because <filename>meta-intel</filename> is its own Git repository, you will want
|
Because <filename>meta-intel</filename> is its own Git repository, you will want
|
||||||
@@ -185,6 +186,7 @@
|
|||||||
For this example we are going to use the <filename>&DISTRO_NAME;</filename> branch.
|
For this example we are going to use the <filename>&DISTRO_NAME;</filename> branch.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||||
|
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||||
Switched to a new branch '&DISTRO_NAME;'
|
Switched to a new branch '&DISTRO_NAME;'
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -261,10 +263,10 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note that inside the <filename>mymachine.conf</filename> is the
|
Note that inside the <filename>mymachine.conf</filename> is the
|
||||||
<filename>PREFERRED_PROVIDER_virtual/kernel</filename> statement.
|
<filename>PREFERRED_VERSION_linux-yocto</filename> statement.
|
||||||
This statement identifies the kernel that the BSP is going to use.
|
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
|
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.
|
current Linux Yocto kernel based on the Linux 3.2 release.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -283,6 +285,8 @@
|
|||||||
BBFILE_COLLECTIONS += "crownbay"
|
BBFILE_COLLECTIONS += "crownbay"
|
||||||
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
|
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_crownbay = "6"
|
BBFILE_PRIORITY_crownbay = "6"
|
||||||
|
|
||||||
|
LAYERDEPENDS_crownbay = "intel"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -293,6 +297,8 @@
|
|||||||
BBFILE_COLLECTIONS += "mymachine"
|
BBFILE_COLLECTIONS += "mymachine"
|
||||||
BBFILE_PATTERN_mymachine := "^${LAYERDIR}/"
|
BBFILE_PATTERN_mymachine := "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_mymachine = "6"
|
BBFILE_PRIORITY_mymachine = "6"
|
||||||
|
|
||||||
|
LAYERDEPENDS_mymachine = "intel"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -391,7 +397,7 @@
|
|||||||
The recipe for that kernel is not located in the
|
The recipe for that kernel is not located in the
|
||||||
BSP layer but rather in the local Yocto Project files at
|
BSP layer but rather in the local Yocto Project files at
|
||||||
<filename>meta/recipes-kernel/linux</filename> and is
|
<filename>meta/recipes-kernel/linux</filename> and is
|
||||||
named <filename>linux-yocto_3.0.bb</filename>.
|
named <filename>linux-yocto_3.2.bb</filename>.
|
||||||
The <filename>SRCREV_machine</filename> and <filename>SRCREV_meta</filename>
|
The <filename>SRCREV_machine</filename> and <filename>SRCREV_meta</filename>
|
||||||
statements point to the exact commits used by the Yocto Project development team
|
statements point to the exact commits used by the Yocto Project development team
|
||||||
in their source repositories that identify the right kernel for our hardware.
|
in their source repositories that identify the right kernel for our hardware.
|
||||||
@@ -404,7 +410,7 @@
|
|||||||
<para>
|
<para>
|
||||||
However, in the <filename>meta-mymachine</filename> layer in
|
However, in the <filename>meta-mymachine</filename> layer in
|
||||||
<filename>recipes-kernel/linux</filename> resides a <filename>.bbappend</filename>
|
<filename>recipes-kernel/linux</filename> resides a <filename>.bbappend</filename>
|
||||||
file named <filename>linux-yocto_3.0.bbappend</filename> that
|
file named <filename>linux-yocto_3.2.bbappend</filename> that
|
||||||
appends information to the recipe of the same name in <filename>meta/recipes-kernel/linux</filename>.
|
appends information to the recipe of the same name in <filename>meta/recipes-kernel/linux</filename>.
|
||||||
Thus, the <filename>SRCREV</filename> statements in the append file override
|
Thus, the <filename>SRCREV</filename> statements in the append file override
|
||||||
the more general statements found in <filename>meta</filename>.
|
the more general statements found in <filename>meta</filename>.
|
||||||
@@ -413,17 +419,20 @@
|
|||||||
<para>
|
<para>
|
||||||
The <filename>SRCREV</filename> statements in the append file currently identify
|
The <filename>SRCREV</filename> statements in the append file currently identify
|
||||||
the kernel that supports the Crown Bay BSP with and without EMGD support.
|
the kernel that supports the Crown Bay BSP with and without EMGD support.
|
||||||
Here are the statements:
|
Here are the statements:
|
||||||
|
<note>The commit ID strings used in this manual might not match the actual commit
|
||||||
|
ID strings found in the <filename>linux-yocto_3.2.bbappend</filename> file.
|
||||||
|
For the example, this difference does not matter.</note>
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
SRCREV_machine_pn-linux-yocto_crownbay ?= \
|
SRCREV_machine_pn-linux-yocto_crownbay ?= \
|
||||||
"2247da9131ea7e46ed4766a69bb1353dba22f873"
|
"211fc7f4d10ec2b82b424286aabbaff9254b7cbd"
|
||||||
SRCREV_meta_pn-linux-yocto_crownbay ?= \
|
SRCREV_meta_pn-linux-yocto_crownbay ?= \
|
||||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
"514847185c78c07f52e02750fbe0a03ca3a31d8f"
|
||||||
|
|
||||||
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \
|
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \
|
||||||
"2247da9131ea7e46ed4766a69bb1353dba22f873"
|
"211fc7f4d10ec2b82b424286aabbaff9254b7cbd"
|
||||||
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \
|
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \
|
||||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
"514847185c78c07f52e02750fbe0a03ca3a31d8f"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -438,19 +447,19 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To fix this situation in <filename>linux-yocto_3.0.bbappend</filename>,
|
To fix this situation in <filename>linux-yocto_3.2.bbappend</filename>,
|
||||||
we delete the two <filename>SRCREV</filename> statements that support
|
we delete the two <filename>SRCREV</filename> statements that support
|
||||||
EMGD (the top pair).
|
EMGD (the top pair).
|
||||||
We also change the remaining pair to specify <filename>mymachine</filename>
|
We also change the remaining pair to specify <filename>mymachine</filename>
|
||||||
and insert the commit identifiers to identify the kernel in which we
|
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>
|
are interested, which will be based on the <filename>atom-pc-standard</filename>
|
||||||
kernel.
|
kernel.
|
||||||
In this case, because we're working with the edison branch of everything, we
|
In this case, because we're working with the &DISTRO_NAME; branch of everything, we
|
||||||
need to use the <filename>SRCREV</filename> values for the atom-pc branch
|
need to use the <filename>SRCREV</filename> values for the atom-pc branch
|
||||||
that are associated with the edison release.
|
that are associated with the &DISTRO_NAME; release.
|
||||||
To find those values, we need to find the <filename>SRCREV</filename>
|
To find those values, we need to find the <filename>SRCREV</filename>
|
||||||
values that edison uses for the atom-pc branch, which we find in the
|
values that &DISTRO_NAME; uses for the atom-pc branch, which we find in the
|
||||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>
|
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.2.bbappend</filename>
|
||||||
file.
|
file.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -459,23 +468,21 @@
|
|||||||
<filename>SRCREV_machine_atom-pc</filename> variable.
|
<filename>SRCREV_machine_atom-pc</filename> variable.
|
||||||
The meta <filename>SRCREV</filename> isn't specified in this file, so it must be
|
The meta <filename>SRCREV</filename> isn't specified in this file, so it must be
|
||||||
specified in the base kernel recipe in the
|
specified in the base kernel recipe in the
|
||||||
<filename>poky/meta/recipes-kernel/linux/linux-yocto_3.0.bb</filename>
|
<filename>poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb</filename>
|
||||||
file, in the <filename>SRCREV_meta variable</filename> found there.
|
file, in the <filename>SRCREV_meta</filename> variable found there.
|
||||||
It happens to be the same as the value we already inherited from the
|
|
||||||
<filename>meta-crownbay</filename> BSP.
|
|
||||||
Here are the final <filename>SRCREV</filename> statements:
|
Here are the final <filename>SRCREV</filename> statements:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||||
"1e18e44adbe79b846e382370eb29bc4b8cd5a1a0"
|
"f29531a41df15d74be5ad47d958e4117ca9e489e"
|
||||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
"b14a08f5c7b469a5077c10942f4e1aec171faa9d"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In this example, we're using the <filename>SRCREV</filename> values we
|
In this example, we're using the <filename>SRCREV</filename> values we
|
||||||
found already captured in the edison release because we're creating a BSP based on
|
found already captured in the &DISTRO_NAME; release because we're creating a BSP based on
|
||||||
edison.
|
&DISTRO_NAME;.
|
||||||
If, instead, we had based our BSP on the master branches, we would want to use
|
If, instead, we had based our BSP on the master branches, we would want to use
|
||||||
the most recent <filename>SRCREV</filename> values taken directly from the kernel repo.
|
the most recent <filename>SRCREV</filename> values taken directly from the kernel repo.
|
||||||
We will not be doing that for this example.
|
We will not be doing that for this example.
|
||||||
@@ -484,19 +491,19 @@
|
|||||||
exact commit strings in the Yocto Project source repositories you need to change
|
exact commit strings in the Yocto Project source repositories you need to change
|
||||||
the <filename>SRCREV</filename> statements.
|
the <filename>SRCREV</filename> statements.
|
||||||
You can find all the <filename>machine</filename> and <filename>meta</filename>
|
You can find all the <filename>machine</filename> and <filename>meta</filename>
|
||||||
branch points (commits) for the <filename>linux-yocto-3.0</filename> kernel at
|
branch points (commits) for the <filename>linux-yocto-3.2</filename> kernel at
|
||||||
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/linux-yocto-3.0'></ulink>.
|
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/linux-yocto-3.2'></ulink>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you need a little more assistance after going to the link then do the following:
|
If you need a little more assistance after going to the link then do the following:
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>Expand the list of branches by clicking <filename>[…]</filename></para></listitem>
|
<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>
|
<listitem><para>Click on the <filename>standard/default/common-pc/atom-pc</filename>
|
||||||
branch</para></listitem>
|
branch</para></listitem>
|
||||||
<listitem><para>Click on the commit column header to view the top commit</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
|
<listitem><para>Copy the commit string for use in the
|
||||||
<filename>linux-yocto_3.0.bbappend</filename> file</para></listitem>
|
<filename>linux-yocto_3.2.bbappend</filename> file</para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -507,32 +514,34 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Also in the <filename>linux-yocto_3.0.bbappend</filename> file are
|
Also in the <filename>linux-yocto_3.2.bbappend</filename> file are
|
||||||
<filename>COMPATIBLE_MACHINE</filename>, <filename>KMACHINE</filename>,
|
<filename>COMPATIBLE_MACHINE</filename>, <filename>KMACHINE</filename>,
|
||||||
and <filename>KERNEL_FEATURES</filename> statements.
|
and <filename>KBRANCH</filename> statements.
|
||||||
Two sets of these exist: one set supports EMGD and one set does not.
|
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.
|
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
|
The remaining three must be changed so that <filename>mymachine</filename> replaces
|
||||||
<filename>crownbay-noemgd</filename> and <filename>crownbay</filename>.
|
<filename>crownbay-noemgd</filename> and <filename>crownbay</filename>.
|
||||||
Because we are using the atom-pc branch for this new BSP, we can also find
|
Because we are using the <filename>atom-pc</filename> branch for this new BSP, we can also find
|
||||||
the exact branch we need for the KMACHINE variable in our new BSP from the value
|
the exact branch we need for the <filename>KMACHINE</filename>
|
||||||
|
and <filename>KBRANCH</filename> variables in our new BSP from the value
|
||||||
we find in the
|
we find in the
|
||||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>
|
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.2.bbappend</filename>
|
||||||
file we looked at in a previous step.
|
file we looked at in a previous step.
|
||||||
In this case, the value we want is in the KMACHINE_atom-pc variable in that file.
|
In this case, the values we want are in the <filename>KMACHINE_atom-pc</filename> variable
|
||||||
Here is the final <filename>linux-yocto_3.0.bbappend</filename> file after all
|
and the <filename>KBRANCH_atom-pc</filename> variables in that file.
|
||||||
|
Here is the final <filename>linux-yocto_3.2.bbappend</filename> file after all
|
||||||
the edits:
|
the edits:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE_mymachine = "mymachine"
|
COMPATIBLE_MACHINE_mymachine = "mymachine"
|
||||||
KMACHINE_mymachine = "yocto/standard/common-pc/atom-pc"
|
KMACHINE_mymachine = "atom-pc"
|
||||||
KERNEL_FEATURES_append_mymachine += " cfg/smp.scc"
|
KBRANCH_mymachine = "standard/default/common-pc/atom-pc"
|
||||||
|
|
||||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||||
"1e18e44adbe79b846e382370eb29bc4b8cd5a1a0"
|
"f29531a41df15d74be5ad47d958e4117ca9e489e"
|
||||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
"b14a08f5c7b469a5077c10942f4e1aec171faa9d"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -600,11 +609,12 @@
|
|||||||
both the <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
both the <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
||||||
variables to twice the number of cores your system supports.</para></listitem>
|
variables to twice the number of cores your system supports.</para></listitem>
|
||||||
<listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes
|
<listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes
|
||||||
the path to your new BSP layer.
|
both the path to your new BSP layer and the path to the
|
||||||
In this example you need to include the pathname to <filename>meta-mymachine</filename>.
|
<filename>meta-intel</filename> layer.
|
||||||
For this example the
|
In this example, you need to include both these paths as part of the
|
||||||
<filename>BBLAYERS</filename> variable in the file would need to include the following path:
|
<filename>BBLAYERS</filename> variable:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
|
$HOME/poky/meta-intel
|
||||||
$HOME/poky/meta-intel/meta-mymachine
|
$HOME/poky/meta-intel/meta-mymachine
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
</orderedlist>
|
</orderedlist>
|
||||||
@@ -682,12 +692,12 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
For reference, the sato image produced by the previous steps for edison
|
For reference, the sato image produced by the previous steps for &DISTRO_NAME;
|
||||||
should look like the following in terms of size.
|
should look like the following in terms of size.
|
||||||
If your sato image is much different from this,
|
If your sato image is much different from this,
|
||||||
you probably made a mistake in one of the above steps:
|
you probably made a mistake in one of the above steps:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
358715392 2011-11-01 19:11 core-image-sato-mymachine-20111101223904.hddimg
|
260538368 2012-04-27 01:44 core-image-sato-mymachine-20120427025051.hddimg
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note>The previous instructions are also present in the README that was copied
|
<note>The previous instructions are also present in the README that was copied
|
||||||
from meta-crownbay, which should also be updated to reflect the specifics of your
|
from meta-crownbay, which should also be updated to reflect the specifics of your
|
||||||
|
|||||||
@@ -188,7 +188,8 @@
|
|||||||
<listitem><para>Store custom layers in a Git repository that uses the
|
<listitem><para>Store custom layers in a Git repository that uses the
|
||||||
<filename>meta-<layer_name></filename> format.</para></listitem>
|
<filename>meta-<layer_name></filename> format.</para></listitem>
|
||||||
<listitem><para>Clone the repository alongside other <filename>meta</filename>
|
<listitem><para>Clone the repository alongside other <filename>meta</filename>
|
||||||
directories in the Yocto Project source files area.</para></listitem>
|
directories in
|
||||||
|
<link linkend='yocto-project-files'>Yocto Project Files</link>.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
Following these recommendations keeps your Yocto Project files area and
|
Following these recommendations keeps your Yocto Project files area and
|
||||||
its configuration entirely inside the Yocto Project's core base.
|
its configuration entirely inside the Yocto Project's core base.
|
||||||
@@ -248,8 +249,8 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Append files files must have the same name as the underlying recipe.
|
Append files files must have the same name as the underlying recipe.
|
||||||
For example, the append file <filename>someapp_1.1.bbappend</filename> must
|
For example, the append file <filename>someapp_&DISTRO;.bbappend</filename> must
|
||||||
apply to <filename>someapp_1.1.bb</filename>.
|
apply to <filename>someapp_&DISTRO;.bb</filename>.
|
||||||
This means the original recipe and append file names are version number specific.
|
This means the original recipe and append file names are version number specific.
|
||||||
If the underlying recipe is renamed to update to a newer version, the
|
If the underlying recipe is renamed to update to a newer version, the
|
||||||
corresponding <filename>.bbappend</filename> file must be renamed as well.
|
corresponding <filename>.bbappend</filename> file must be renamed as well.
|
||||||
@@ -269,14 +270,14 @@
|
|||||||
append file both from the
|
append file both from the
|
||||||
<link linkend='yocto-project-files'>Yocto Project Files</link>.
|
<link linkend='yocto-project-files'>Yocto Project Files</link>.
|
||||||
Here is the main formfactor recipe, which is named <filename>formfactor_0.0.bb</filename> and
|
Here is the main formfactor recipe, which is named <filename>formfactor_0.0.bb</filename> and
|
||||||
located in the meta layer at <filename>meta/bsp-recipes/formfactor</filename>:
|
located in the meta layer at <filename>meta/recipes-bsp/formfactor</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
DESCRIPTION = "Device formfactor information"
|
DESCRIPTION = "Device formfactor information"
|
||||||
SECTION = "base"
|
SECTION = "base"
|
||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
|
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
|
||||||
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||||
PR = "r19"
|
PR = "r20"
|
||||||
|
|
||||||
SRC_URI = "file://config file://machconfig"
|
SRC_URI = "file://config file://machconfig"
|
||||||
S = "${WORKDIR}"
|
S = "${WORKDIR}"
|
||||||
@@ -290,11 +291,12 @@
|
|||||||
install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
|
install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
|
||||||
if [ -s "${S}/machconfig" ]; then
|
if [ -s "${S}/machconfig" ]; then
|
||||||
install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/
|
install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Here is the append file, which is named <filename>formfactor_0.0.bbappend</filename> and is from the
|
Here is the append file, which is named <filename>formfactor_0.0.bbappend</filename> and is from the
|
||||||
Crown Bay BSP Layer named <filename>meta-intel/meta-crownbay</filename>:
|
Crown Bay BSP Layer named <filename>meta-intel/meta-crownbay</filename>.
|
||||||
|
The file is in <filename>recipes-bsp/formfactor</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||||
|
|
||||||
@@ -445,6 +447,204 @@
|
|||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='usingpoky-extend-customimage'>
|
||||||
|
<title>Customizing Images</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can customize Yocto Project images to satisfy particular requirements.
|
||||||
|
This section describes several methods and provides guidelines for each.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<section id='usingpoky-extend-customimage-custombb'>
|
||||||
|
<title>Customizing Images Using Custom .bb Files</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
One way to get additional software into an image is to create a custom image.
|
||||||
|
The following example shows the form for the two lines you need:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
IMAGE_INSTALL = "task-core-x11-base package1 package2"
|
||||||
|
|
||||||
|
inherit core-image
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
By creating a custom image, a developer has total control
|
||||||
|
over the contents of the image.
|
||||||
|
It is important to use the correct names of packages in the
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
|
||||||
|
variable.
|
||||||
|
You must use the OpenEmbedded notation and not the Debian notation for the names
|
||||||
|
(e.g. <filename>eglibc-dev</filename> instead of <filename>libc6-dev</filename>).
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The other method for creating a custom image is to base it on an existing image.
|
||||||
|
For example, if you want to create an image based on <filename>core-image-sato</filename>
|
||||||
|
but add the additional package <filename>strace</filename> to the image,
|
||||||
|
copy the <filename>meta/recipes-sato/images/core-image-sato.bb</filename> to a
|
||||||
|
new <filename>.bb</filename> and add the following line to the end of the copy:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
IMAGE_INSTALL += "strace"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='usingpoky-extend-customimage-customtasks'>
|
||||||
|
<title>Customizing Images Using Custom Tasks</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For complex custom images, the best approach is to create a custom task package
|
||||||
|
that is used to build the image or images.
|
||||||
|
A good example of a tasks package is
|
||||||
|
<filename>meta/recipes-core/tasks/task-core-boot.bb</filename>
|
||||||
|
The
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'>PACKAGES</ulink></filename>
|
||||||
|
variable lists the task packages to build along with the complementary
|
||||||
|
<filename>-dbg</filename> and <filename>-dev</filename> packages.
|
||||||
|
For each package added, you can use
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'>RDEPENDS</ulink></filename>
|
||||||
|
and
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'>RRECOMMENDS</ulink></filename>
|
||||||
|
entries to provide a list of packages the parent task package should contain.
|
||||||
|
Following is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
DESCRIPTION = "My Custom Tasks"
|
||||||
|
|
||||||
|
PACKAGES = "\
|
||||||
|
task-custom-apps \
|
||||||
|
task-custom-apps-dbg \
|
||||||
|
task-custom-apps-dev \
|
||||||
|
task-custom-tools \
|
||||||
|
task-custom-tools-dbg \
|
||||||
|
task-custom-tools-dev \
|
||||||
|
"
|
||||||
|
|
||||||
|
RDEPENDS_task-custom-apps = "\
|
||||||
|
dropbear \
|
||||||
|
portmap \
|
||||||
|
psplash"
|
||||||
|
|
||||||
|
RDEPENDS_task-custom-tools = "\
|
||||||
|
oprofile \
|
||||||
|
oprofileui-server \
|
||||||
|
lttng-control \
|
||||||
|
lttng-viewer"
|
||||||
|
|
||||||
|
RRECOMMENDS_task-custom-tools = "\
|
||||||
|
kernel-module-oprofile"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
In the previous example, two task packages are created with their dependencies and their
|
||||||
|
recommended package dependencies listed: <filename>task-custom-apps</filename>, and
|
||||||
|
<filename>task-custom-tools</filename>.
|
||||||
|
To build an image using these task packages, you need to add
|
||||||
|
<filename>task-custom-apps</filename> and/or
|
||||||
|
<filename>task-custom-tools</filename> to
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>.
|
||||||
|
For other forms of image dependencies see the other areas of this section.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='usingpoky-extend-customimage-imagefeatures'>
|
||||||
|
<title>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and
|
||||||
|
<filename>EXTRA_IMAGE_FEATURES</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Ultimately users might want to add extra image features to the set used by
|
||||||
|
Yocto Project with the
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'>IMAGE_FEATURES</ulink></filename>
|
||||||
|
variable.
|
||||||
|
To create these features, the best reference is
|
||||||
|
<filename>meta/classes/core-image.bbclass</filename>, which shows how the
|
||||||
|
Yocto Project achieves this.
|
||||||
|
In summary, the file looks at the contents of the
|
||||||
|
<filename>IMAGE_FEATURES</filename>
|
||||||
|
variable and then maps that into a set of tasks or packages.
|
||||||
|
Based on this information the
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'> IMAGE_INSTALL</ulink></filename>
|
||||||
|
variable is generated automatically.
|
||||||
|
Users can add extra features by extending the class or creating a custom class for use
|
||||||
|
with specialized image <filename>.bb</filename> files.
|
||||||
|
You can also add more features by configuring the
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</ulink></filename>
|
||||||
|
variable in the <filename>local.conf</filename> file found in the Yocto Project
|
||||||
|
files located in the build directory.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The Yocto Project ships with two SSH servers you can use in your images:
|
||||||
|
Dropbear and OpenSSH.
|
||||||
|
Dropbear is a minimal SSH server appropriate for resource-constrained environments,
|
||||||
|
while OpenSSH is a well-known standard SSH server implementation.
|
||||||
|
By default, the <filename>core-image-sato</filename> image is configured to use Dropbear.
|
||||||
|
The <filename>core-image-basic</filename> and <filename>core-image-lsb</filename>
|
||||||
|
images both include OpenSSH.
|
||||||
|
To change these defaults, edit the <filename>IMAGE_FEATURES</filename> variable
|
||||||
|
so that it sets the image you are working with to include
|
||||||
|
<filename>ssh-server-dropbear</filename> or <filename>ssh-server-openssh</filename>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id='usingpoky-extend-customimage-localconf'>
|
||||||
|
<title>Customizing Images Using <filename>local.conf</filename></title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
It is possible to customize image contents by using variables from your
|
||||||
|
local configuration in your <filename>conf/local.conf</filename> file.
|
||||||
|
Because it is limited to local use, this method generally only allows you to
|
||||||
|
add packages and is not as flexible as creating your own customized image.
|
||||||
|
When you add packages using local variables this way, you need to realize that
|
||||||
|
these variable changes affect all images at the same time and might not be
|
||||||
|
what you require.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The simplest way to add extra packages to all images is by using the
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
|
||||||
|
variable with the <filename>_append</filename> operator:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
IMAGE_INSTALL_append = " strace"
|
||||||
|
</literallayout>
|
||||||
|
Use of the syntax is important.
|
||||||
|
Specifically, the space between the quote and the package name, which is
|
||||||
|
<filename>strace</filename> in this example.
|
||||||
|
This space is required since the <filename>_append</filename>
|
||||||
|
operator does not add the space.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Furthermore, you must use <filename>_append</filename> instead of the <filename>+=</filename>
|
||||||
|
operator if you want to avoid ordering issues.
|
||||||
|
The reason for this is because doing so unconditionally appends to the variable and
|
||||||
|
avoids ordering problems due to the variable being set in image recipes and
|
||||||
|
<filename>.bbclass</filename> files with operators like <filename>?=</filename>.
|
||||||
|
Using <filename>_append</filename> ensures the operation takes affect.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
As shown in its simplest use, <filename>IMAGE_INSTALL_append</filename> affects
|
||||||
|
all images.
|
||||||
|
It is possible to extend the syntax so that the variable applies to a specific image only.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
IMAGE_INSTALL_append_pn-core-image-minimal = " strace"
|
||||||
|
</literallayout>
|
||||||
|
This example adds <filename>strace</filename> to <filename>core-image-minimal</filename>
|
||||||
|
only.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You can add packages using a similar approach through the
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-CORE_IMAGE_EXTRA_INSTALL'>CORE_IMAGE_EXTRA_INSTALL</ulink></filename>
|
||||||
|
variable.
|
||||||
|
If you use this variable, only <filename>core-image-*</filename> images are affected.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section id='usingpoky-extend-addpkg'>
|
<section id='usingpoky-extend-addpkg'>
|
||||||
<title>Adding a Package</title>
|
<title>Adding a Package</title>
|
||||||
|
|
||||||
@@ -550,7 +750,7 @@
|
|||||||
The variable
|
The variable
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename>
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename>
|
||||||
is used to track source license changes as described in the
|
is used to track source license changes as described in the
|
||||||
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Change</ulink>" section.
|
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Changes</ulink>" section.
|
||||||
You can quickly create Autotool-based recipes in a manner similar to the previous example.
|
You can quickly create Autotool-based recipes in a manner similar to the previous example.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -590,25 +790,52 @@
|
|||||||
SECTION = "base"
|
SECTION = "base"
|
||||||
DEPENDS = "zlib lzo e2fsprogs util-linux"
|
DEPENDS = "zlib lzo e2fsprogs util-linux"
|
||||||
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
|
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
|
||||||
LICENSE = "GPLv2"
|
LICENSE = "GPLv2+"
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
|
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
|
||||||
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
|
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
|
||||||
|
|
||||||
SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=v${PV}"
|
SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=995cfe51b0a3cf32f381c140bf72b21bf91cef1b \
|
||||||
|
file://add-exclusion-to-mkfs-jffs2-git-2.patch"
|
||||||
|
|
||||||
S = "${WORKDIR}/git/"
|
S = "${WORKDIR}/git/"
|
||||||
|
|
||||||
EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' \
|
PR = "r1"
|
||||||
'BUILDDIR=${S}'"
|
|
||||||
|
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' \
|
||||||
|
'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
|
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
|
||||||
INCLUDEDIR=${includedir}
|
INCLUDEDIR=${includedir}
|
||||||
install -d ${D}${includedir}/mtd/
|
install -d ${D}${includedir}/mtd/
|
||||||
for f in ${S}/include/mtd/*.h; do
|
for f in ${S}/include/mtd/*.h; do
|
||||||
install -m 0644 $f ${D}${includedir}/mtd/
|
install -m 0644 $f ${D}${includedir}/mtd/
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PARALLEL_MAKE = ""
|
||||||
|
|
||||||
|
BBCLASSEXTEND = "native"
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
If your sources are available as a tarball instead of a Git repository, you
|
||||||
|
will need to provide the URL to the tarball as well as an
|
||||||
|
<filename>md5</filename> or <filename>sha256</filename> sum of
|
||||||
|
the download.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
SRC_URI="ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.4.9.tar.bz2"
|
||||||
|
SRC_URI[md5sum]="82b8e714b90674896570968f70ca778b"
|
||||||
|
</literallayout>
|
||||||
|
You can generate the <filename>md5</filename> or <filename>sha256</filename> sums
|
||||||
|
by using the <filename>md5sum</filename> or <filename>sha256sum</filename> commands
|
||||||
|
with the target file as the only argument.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ md5sum mtd-utils-1.4.9.tar.bz2
|
||||||
|
82b8e714b90674896570968f70ca778b mtd-utils-1.4.9.tar.bz2
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -728,7 +955,7 @@
|
|||||||
<filename>postinst</filename> script.
|
<filename>postinst</filename> script.
|
||||||
Normally
|
Normally
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'>PN</ulink></filename>
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'>PN</ulink></filename>
|
||||||
can be used, which automatically expands to PACKAGENAME.
|
can be used, which automatically expands to <filename>PACKAGENAME</filename>.
|
||||||
A post-installation function has the following structure:
|
A post-installation function has the following structure:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
pkg_postinst_PACKAGENAME () {
|
pkg_postinst_PACKAGENAME () {
|
||||||
@@ -774,228 +1001,6 @@
|
|||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='usingpoky-extend-customimage'>
|
|
||||||
<title>Customizing Images</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can customize Yocto Project images to satisfy particular requirements.
|
|
||||||
This section describes several methods and provides guidelines for each.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='usingpoky-extend-customimage-custombb'>
|
|
||||||
<title>Customizing Images Using Custom .bb Files</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
One way to get additional software into an image is to create a custom image.
|
|
||||||
The following example shows the form for the two lines you need:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
IMAGE_INSTALL = "task-core-x11-base package1 package2"
|
|
||||||
|
|
||||||
inherit core-image
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
By creating a custom image, a developer has total control
|
|
||||||
over the contents of the image.
|
|
||||||
It is important to use the correct names of packages in the
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
|
|
||||||
variable.
|
|
||||||
You must use the OpenEmbedded notation and not the Debian notation for the names
|
|
||||||
(e.g. <filename>eglibc-dev</filename> instead of <filename>libc6-dev</filename>).
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The other method for creating a custom image is to modify an existing image.
|
|
||||||
For example, if a developer wants to add <filename>strace</filename> into
|
|
||||||
the <filename>core-image-sato</filename> image, they can use the following recipe:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
require core-image-sato.bb
|
|
||||||
|
|
||||||
IMAGE_INSTALL += "strace"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='usingpoky-extend-customimage-customtasks'>
|
|
||||||
<title>Customizing Images Using Custom Tasks</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
For complex custom images, the best approach is to create a custom task package
|
|
||||||
that is used to build the image or images.
|
|
||||||
A good example of a tasks package is
|
|
||||||
<filename>meta/recipes-sato/tasks/task-poky.bb</filename>.
|
|
||||||
The
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'>PACKAGES</ulink></filename>
|
|
||||||
variable lists the task packages to build along with the complementary
|
|
||||||
<filename>-dbg</filename> and <filename>-dev</filename> packages.
|
|
||||||
For each package added, you can use
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'>RDEPENDS</ulink></filename>
|
|
||||||
and
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'>RRECOMMENDS</ulink></filename>
|
|
||||||
entries to provide a list of packages the parent task package should contain.
|
|
||||||
Following is an example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
DESCRIPTION = "My Custom Tasks"
|
|
||||||
|
|
||||||
PACKAGES = "\
|
|
||||||
task-custom-apps \
|
|
||||||
task-custom-apps-dbg \
|
|
||||||
task-custom-apps-dev \
|
|
||||||
task-custom-tools \
|
|
||||||
task-custom-tools-dbg \
|
|
||||||
task-custom-tools-dev \
|
|
||||||
"
|
|
||||||
|
|
||||||
RDEPENDS_task-custom-apps = "\
|
|
||||||
dropbear \
|
|
||||||
portmap \
|
|
||||||
psplash"
|
|
||||||
|
|
||||||
RDEPENDS_task-custom-tools = "\
|
|
||||||
oprofile \
|
|
||||||
oprofileui-server \
|
|
||||||
lttng-control \
|
|
||||||
lttng-viewer"
|
|
||||||
|
|
||||||
RRECOMMENDS_task-custom-tools = "\
|
|
||||||
kernel-module-oprofile"
|
|
||||||
</literallayout>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
In the previous example, two task packages are created with their dependencies and their
|
|
||||||
recommended package dependencies listed: <filename>task-custom-apps</filename>, and
|
|
||||||
<filename>task-custom-tools</filename>.
|
|
||||||
To build an image using these task packages, you need to add
|
|
||||||
<filename>task-custom-apps</filename> and/or
|
|
||||||
<filename>task-custom-tools</filename> to
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>.
|
|
||||||
For other forms of image dependencies see the other areas of this section.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='usingpoky-extend-customimage-imagefeatures'>
|
|
||||||
<title>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and
|
|
||||||
<filename>EXTRA_IMAGE_FEATURES</filename></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Ultimately users might want to add extra image features to the set used by
|
|
||||||
Yocto Project with the
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'>IMAGE_FEATURES</ulink></filename>
|
|
||||||
variable.
|
|
||||||
To create these features, the best reference is
|
|
||||||
<filename>meta/classes/core-image.bbclass</filename>, which shows how the
|
|
||||||
Yocto Project achieves this.
|
|
||||||
In summary, the file looks at the contents of the
|
|
||||||
<filename>IMAGE_FEATURES</filename>
|
|
||||||
variable and then maps that into a set of tasks or packages.
|
|
||||||
Based on this information the
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'> IMAGE_INSTALL</ulink></filename>
|
|
||||||
variable is generated automatically.
|
|
||||||
Users can add extra features by extending the class or creating a custom class for use
|
|
||||||
with specialized image <filename>.bb</filename> files.
|
|
||||||
You can also add more features by configuring the
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</ulink></filename>
|
|
||||||
variable in the <filename>local.conf</filename> file found in the Yocto Project
|
|
||||||
files located in the build directory.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The Yocto Project ships with two SSH servers you can use in your images:
|
|
||||||
Dropbear and OpenSSH.
|
|
||||||
Dropbear is a minimal SSH server appropriate for resource-constrained environments,
|
|
||||||
while OpenSSH is a well-known standard SSH server implementation.
|
|
||||||
By default, the <filename>core-image-sato</filename> image is configured to use Dropbear.
|
|
||||||
The <filename>core-image-basic</filename> and <filename>core-image-lsb</filename>
|
|
||||||
images both include OpenSSH.
|
|
||||||
To change these defaults, edit the <filename>IMAGE_FEATURES</filename> variable
|
|
||||||
so that it sets the image you are working with to include
|
|
||||||
<filename>ssh-server-dropbear</filename> or <filename>ssh-server-openssh</filename>.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='usingpoky-extend-customimage-localconf'>
|
|
||||||
<title>Customizing Images Using <filename>local.conf</filename></title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
It is possible to customize image contents by using variables from your
|
|
||||||
local configuration in your <filename>conf/local.conf</filename> file.
|
|
||||||
Because it is limited to local use, this method generally only allows you to
|
|
||||||
add packages and is not as flexible as creating your own customized image.
|
|
||||||
When you add packages using local variables this way, you need to realize that
|
|
||||||
these variable changes affect all images at the same time and might not be
|
|
||||||
what you require.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<section id='adding-packages'>
|
|
||||||
<title>Adding Packages</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The simplest way to add extra packages to all images is by using the
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
|
|
||||||
variable with the <filename>_append</filename> operator:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
IMAGE_INSTALL_append = " strace"
|
|
||||||
</literallayout>
|
|
||||||
Use of the syntax is important.
|
|
||||||
Specifically, the space between the quote and the package name, which is
|
|
||||||
<filename>strace</filename> in this example.
|
|
||||||
This space is required since the <filename>_append</filename>
|
|
||||||
operator does not add the space.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Furthermore, you must use <filename>_append</filename> instead of the <filename>+=</filename>
|
|
||||||
operator if you want to avoid ordering issues.
|
|
||||||
The reason for this is because doing so unconditionally appends to the variable and
|
|
||||||
avoids ordering problems due to the variable being set in image recipes and
|
|
||||||
<filename>.bbclass</filename> files with operators like <filename>?=</filename>.
|
|
||||||
Using <filename>_append</filename> ensures the operation takes affect.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
As shown in its simplest use, <filename>IMAGE_INSTALL_append</filename> affects
|
|
||||||
all images.
|
|
||||||
It is possible to extend the syntax so that the variable applies to a specific image only.
|
|
||||||
Here is an example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
IMAGE_INSTALL_append_pn-core-image-minimal = " strace"
|
|
||||||
</literallayout>
|
|
||||||
This example adds <filename>strace</filename> to <filename>core-image-minimal</filename>
|
|
||||||
only.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
You can add packages using a similar approach through the
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-CORE_IMAGE_EXTRA_INSTALL'>CORE_IMAGE_EXTRA_INSTALL</ulink></filename>
|
|
||||||
variable.
|
|
||||||
If you use this variable, only <filename>core-image-*</filename> images are affected.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id='excluding-packages'>
|
|
||||||
<title>Excluding Packages</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
It is possible to filter or mask out <filename>.bb</filename> and
|
|
||||||
<filename>.bbappend</filename> files such that BitBake ignores them during
|
|
||||||
the build.
|
|
||||||
You can do this by providing an expression with the
|
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBMASK'>BBMASK</ulink></filename>
|
|
||||||
variable.
|
|
||||||
Here is an example:
|
|
||||||
<literallayout class='monospaced'>
|
|
||||||
BBMASK = ".*/meta-mymachine/recipes-maybe/"
|
|
||||||
</literallayout>
|
|
||||||
Here, all <filename>.bb</filename> and <filename>.bbappend</filename> files
|
|
||||||
in the directory that matches the expression are ignored during the build
|
|
||||||
process.
|
|
||||||
</para>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="platdev-newmachine">
|
<section id="platdev-newmachine">
|
||||||
<title>Porting the Yocto Project to a New Machine</title>
|
<title>Porting the Yocto Project to a New Machine</title>
|
||||||
|
|
||||||
@@ -1079,7 +1084,7 @@ so that there are some definite steps on how to do this. I need more detail her
|
|||||||
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'>
|
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'>
|
||||||
PREFERRED_PROVIDER</ulink></filename>_virtual/kernel (see below)</para></listitem>
|
PREFERRED_PROVIDER</ulink></filename>_virtual/kernel (see below)</para></listitem>
|
||||||
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'>
|
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'>
|
||||||
MACHINE_FEATURES</ulink></filename> (e.g. "kernel26 apm screen wifi")</para></listitem>
|
MACHINE_FEATURES</ulink></filename> (e.g. "apm screen wifi")</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -1587,7 +1592,7 @@ so that there are some definite steps on how to do this. I need more detail her
|
|||||||
require conf/multilib.conf
|
require conf/multilib.conf
|
||||||
MULTILIBS = "multilib:lib32"
|
MULTILIBS = "multilib:lib32"
|
||||||
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
||||||
MULTILIB_IMAGE_INSTALL = "lib32-connman"
|
IMAGE_INSTALL = "lib32-connman"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
This example enables an
|
This example enables an
|
||||||
additional library named <filename>lib32</filename> alongside the
|
additional library named <filename>lib32</filename> alongside the
|
||||||
@@ -2013,6 +2018,33 @@ so that there are some definite steps on how to do this. I need more detail her
|
|||||||
build directory that is different than the source directory.
|
build directory that is different than the source directory.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='excluding-recipes-from-the-build'>
|
||||||
|
<title>Excluding Recipes From the Build</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
You might find that there are groups of recipes you want to filter
|
||||||
|
out of the build process.
|
||||||
|
For example, recipes you know you will never use or want should not
|
||||||
|
be part of the build.
|
||||||
|
Removing these recipes from parsing speeds up parts of the build.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
It is possible to filter or mask out <filename>.bb</filename> and
|
||||||
|
<filename>.bbappend</filename> files.
|
||||||
|
You can do this by providing an expression with the
|
||||||
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBMASK'>BBMASK</ulink></filename>
|
||||||
|
variable.
|
||||||
|
Here is an example:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
BBMASK = ".*/meta-mymachine/recipes-maybe/"
|
||||||
|
</literallayout>
|
||||||
|
Here, all <filename>.bb</filename> and <filename>.bbappend</filename> files
|
||||||
|
in the directory that match the expression are ignored during the build
|
||||||
|
process.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -127,6 +127,14 @@
|
|||||||
<ulink url='&YOCTO_HOME_URL;/download/yocto/yocto-project-1.1-release-notes-poky-&POKYVERSION;'>
|
<ulink url='&YOCTO_HOME_URL;/download/yocto/yocto-project-1.1-release-notes-poky-&POKYVERSION;'>
|
||||||
Release Notes</ulink>:</emphasis> Features, updates and known issues for the current
|
Release Notes</ulink>:</emphasis> Features, updates and known issues for the current
|
||||||
release of the Yocto Project.</para></listitem>
|
release of the Yocto Project.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='&YOCTO_HOME_URL;/projects/hob'>
|
||||||
|
Hob</ulink>:</emphasis> A graphical user interface for BitBake.
|
||||||
|
Hob's primary goal is to enable a user to perform common tasks more easily.</para></listitem>
|
||||||
|
<listitem><para><emphasis>
|
||||||
|
<ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>
|
||||||
|
Build Appliance</ulink>:</emphasis> Allows you to build and boot a custom embedded Linux
|
||||||
|
image with the Yocto Project using a non-Linux development system.</para></listitem>
|
||||||
<listitem><para><emphasis>
|
<listitem><para><emphasis>
|
||||||
<ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:</emphasis>
|
<ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:</emphasis>
|
||||||
The bug tracking application the Yocto Project uses.
|
The bug tracking application the Yocto Project uses.
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<imagedata fileref="figures/kernel-example-repos.png" width="7in" depth="5in"
|
<imagedata fileref="figures/kernel-example-repos-denzil.png" width="7in" depth="5in"
|
||||||
align="center" scale="100" />
|
align="center" scale="100" />
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -155,13 +155,13 @@
|
|||||||
$ git branch -a
|
$ git branch -a
|
||||||
$ git tag -l
|
$ git tag -l
|
||||||
</literallayout>
|
</literallayout>
|
||||||
This example uses the Yocto Project 1.1 Release code named "edison",
|
This example uses the Yocto Project &DISTRO; Release code named "&DISTRO_NAME;",
|
||||||
which maps to the <filename>edison</filename> branch in the repository.
|
which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository.
|
||||||
The following commands create and checkout the local <filename>edison</filename>
|
The following commands create and checkout the local <filename>&DISTRO_NAME;</filename>
|
||||||
branch:
|
branch:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||||
Branch edison set up to track remote branch &DISTRO_NAME; from origin.
|
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||||
Switched to a new branch '&DISTRO_NAME;'
|
Switched to a new branch '&DISTRO_NAME;'
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -178,13 +178,28 @@
|
|||||||
<filename>poky-extras</filename> Git Repository</link>"
|
<filename>poky-extras</filename> Git Repository</link>"
|
||||||
for information on how to get the <filename>poky-extras</filename> repository.
|
for information on how to get the <filename>poky-extras</filename> repository.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Because this example uses the Yocto Project &DISTRO; Release code
|
||||||
|
named "&DISTRO_NAME;", which maps to the <filename>&DISTRO_NAME;</filename>
|
||||||
|
branch in the repository, you need to be sure you are using that
|
||||||
|
branch for <filename>poky-extra</filename>.
|
||||||
|
The following commands create and checkout the local
|
||||||
|
branch you are using for the <filename>&DISTRO_NAME;</filename>
|
||||||
|
branch:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||||
|
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||||
|
Switched to a new branch '&DISTRO_NAME;'
|
||||||
|
</literallayout>
|
||||||
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='setting-up-the-bare-clone-and-its-copy'>
|
<section id='setting-up-the-bare-clone-and-its-copy'>
|
||||||
<title>Setting Up the Bare Clone and its Copy</title>
|
<title>Setting Up the Bare Clone and its Copy</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This example modifies the <filename>linux-yocto-3.0-1.1.x</filename> kernel.
|
This example modifies the <filename>linux-yocto-3.2</filename> kernel.
|
||||||
Thus, you need to create a bare clone of that kernel and then make a copy of the
|
Thus, you need to create a bare clone of that kernel and then make a copy of the
|
||||||
bare clone.
|
bare clone.
|
||||||
See the bulleted item
|
See the bulleted item
|
||||||
@@ -196,15 +211,16 @@
|
|||||||
The bare clone exists for the kernel build tools and simply as the receiving end
|
The bare clone exists for the kernel build tools and simply as the receiving end
|
||||||
of <filename>git push</filename>
|
of <filename>git push</filename>
|
||||||
commands after you make edits and commits inside the copy of the clone.
|
commands after you make edits and commits inside the copy of the clone.
|
||||||
The copy (<filename>my-linux-yocto-3.0-1.1.x-work</filename> in this example) has to have
|
The copy (<filename>my-linux-yocto-3.2-work</filename> in this example) has to have
|
||||||
a local branch created and checked out for your work.
|
a local branch created and checked out for your work.
|
||||||
This example uses <filename>common-pc-base</filename> as the local branch.
|
This example uses <filename>common-pc-base</filename> as the local branch.
|
||||||
The following commands create and checkout the branch:
|
The following commands create and checkout the branch:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/my-linux-yocto-3.0-1.1.x-work
|
$ cd ~/my-linux-yocto-3.2-work
|
||||||
$ git checkout -b common-pc-base origin/yocto/standard/common-pc/base
|
$ git checkout -b common-pc-base origin/standard/default/common-pc/base
|
||||||
|
Checking out files: 100% (532/532), done.
|
||||||
Branch common-pc-base set up to track remote branch
|
Branch common-pc-base set up to track remote branch
|
||||||
yocto/standard/common-pc/base from origin.
|
standard/default/common-pc/base from origin.
|
||||||
Switched to a new branch 'common-pc-base'
|
Switched to a new branch 'common-pc-base'
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -296,7 +312,7 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The file you change in this example is named <filename>calibrate.c</filename>
|
The file you change in this example is named <filename>calibrate.c</filename>
|
||||||
and is located in the <filename>my-linux-yocto-3.0-1.1.x-work</filename> Git repository
|
and is located in the <filename>my-linux-yocto-3.2-work</filename> Git repository
|
||||||
(the copy of the bare clone) in <filename>init</filename>.
|
(the copy of the bare clone) in <filename>init</filename>.
|
||||||
This example simply inserts several <filename>printk</filename> statements
|
This example simply inserts several <filename>printk</filename> statements
|
||||||
at the beginning of the <filename>calibrate_delay</filename> function.
|
at the beginning of the <filename>calibrate_delay</filename> function.
|
||||||
@@ -307,10 +323,11 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
void __cpuinit calibrate_delay(void)
|
void __cpuinit calibrate_delay(void)
|
||||||
{
|
{
|
||||||
unsigned long lpj;
|
unsigned long lpj;
|
||||||
static bool printed;
|
static bool printed;
|
||||||
|
int this_cpu = smp_processor_id();
|
||||||
|
|
||||||
if (preset_lpj) {
|
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
@@ -319,19 +336,21 @@
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
Here is the altered code showing five new <filename>printk</filename> statements
|
Here is the altered code showing five new <filename>printk</filename> statements
|
||||||
just after initializing <filename>lps_precision</filename>:
|
near the top of the function:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
void __cpuinit calibrate_delay(void)
|
void __cpuinit calibrate_delay(void)
|
||||||
{
|
{
|
||||||
unsigned long lpj;
|
unsigned long lpj;
|
||||||
static bool printed;
|
static bool printed;
|
||||||
|
int this_cpu = smp_processor_id();
|
||||||
|
|
||||||
printk("*************************************\n");
|
printk("*************************************\n");
|
||||||
printk("* *\n");
|
printk("* *\n");
|
||||||
printk("* HELLO YOCTO KERNEL *\n");
|
printk("* HELLO YOCTO KERNEL *\n");
|
||||||
printk("* *\n");
|
printk("* *\n");
|
||||||
printk("*************************************\n");
|
printk("*************************************\n");
|
||||||
|
|
||||||
if (preset_lpj) {
|
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
.
|
.
|
||||||
@@ -357,7 +376,7 @@
|
|||||||
<para>
|
<para>
|
||||||
The following command pushes the changes to the bare clone:
|
The following command pushes the changes to the bare clone:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git push origin common-pc-base:yocto/standard/common-pc/base
|
$ git push origin common-pc-base:standard/default/common-pc/base
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
@@ -416,24 +435,24 @@
|
|||||||
"
|
"
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Identify Your Source Files:</emphasis> In the
|
<listitem><para><emphasis>Identify Your Source Files:</emphasis> In the
|
||||||
<filename>linux-yocto_3.0.bbappend</filename> file located in the
|
<filename>linux-yocto_3.2.bbappend</filename> file located in the
|
||||||
<filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename>
|
<filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename>
|
||||||
directory, you need to identify the location of the
|
directory, you need to identify the location of the
|
||||||
local source code, which in this example is the bare clone named
|
local source code, which in this example is the bare clone named
|
||||||
<filename>linux-yocto-3.0-1.1.x.git</filename>.
|
<filename>linux-yocto-3.2.git</filename>.
|
||||||
To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your
|
To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your
|
||||||
local <filename>linux-yocto-3.0-1.1.x.git</filename> Git repository by adding the
|
local <filename>linux-yocto-3.2.git</filename> Git repository by adding the
|
||||||
following statement.
|
following statement.
|
||||||
Be sure to substitute your user information in the statement:
|
Be sure to substitute your user information in the statement:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
KSRC_linux_yocto ?= /home/scottrif/linux-yocto-3.0-1.1.x.git
|
KSRC_linux_yocto_3_2 ?= "/home/scottrif/linux-yocto-3.2.git"
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Specify the Kernel Machine:</emphasis> Also in the
|
<!-- <listitem><para><emphasis>Specify the Kernel Machine:</emphasis> Also in the
|
||||||
<filename>linux-yocto_3.0.bbappend</filename> file, you need to specify
|
<filename>linux-yocto_3.2.bbappend</filename> file, you need to specify
|
||||||
the kernel machine with the following statement:
|
the kernel machine with the following statement:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
KMACHINE_qemux86 = "yocto/standard/common-pc/base"
|
KMACHINE_qemux86 = "standard/default/common-pc/base"
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem> -->
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -446,7 +465,7 @@
|
|||||||
unused <filename>.bbappend</filename> files.
|
unused <filename>.bbappend</filename> files.
|
||||||
Alternatively, you can simply remove all the files
|
Alternatively, you can simply remove all the files
|
||||||
except the one your are using for the build
|
except the one your are using for the build
|
||||||
(i.e. <filename>linux-yocto_3.0.bbappend</filename> in this example).
|
(i.e. <filename>linux-yocto_3.2.bbappend</filename> in this example).
|
||||||
</note>
|
</note>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -505,8 +524,8 @@
|
|||||||
<title>Changing the Kernel Configuration</title>
|
<title>Changing the Kernel Configuration</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This example changes the default behavior, which is "off", of the Symmetric
|
This example changes the default behavior, which is "on", of the Symmetric
|
||||||
Multi-processing Support (<filename>CONFIG_SMP</filename>) to "on".
|
Multi-processing Support (<filename>CONFIG_SMP</filename>) to "off".
|
||||||
It is a simple example that demonstrates how to reconfigure the kernel.
|
It is a simple example that demonstrates how to reconfigure the kernel.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -518,9 +537,9 @@
|
|||||||
in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source
|
in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source
|
||||||
Code</link>" you should already have the Yocto Project files set up on your
|
Code</link>" you should already have the Yocto Project files set up on your
|
||||||
host machine.
|
host machine.
|
||||||
If this is the case, go to then next section titled
|
If this is the case, go to the next section, which is titled
|
||||||
"<link linkend='examining-the-default-config-smp-behavior'>Examining the Default
|
"<link linkend='examining-the-default-config-smp-behavior'>Examining the Default
|
||||||
<filename>CONFIG_SMP</filename> Behavior</link>" and continue with the
|
<filename>CONFIG_SMP</filename> Behavior</link>", and continue with the
|
||||||
example.
|
example.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -529,7 +548,7 @@
|
|||||||
you can get them through tarball extraction or by
|
you can get them through tarball extraction or by
|
||||||
cloning the <filename>poky</filename> Git repository.
|
cloning the <filename>poky</filename> Git repository.
|
||||||
This example uses <filename>poky</filename> as the root directory of the
|
This example uses <filename>poky</filename> as the root directory of the
|
||||||
local Yocto Project files Git repository.
|
local <link linkend='yocto-project-files'>Yocto Project Files</link> Git repository.
|
||||||
See the bulleted item
|
See the bulleted item
|
||||||
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
||||||
for information on how to get these files.
|
for information on how to get these files.
|
||||||
@@ -545,13 +564,13 @@
|
|||||||
$ git branch -a
|
$ git branch -a
|
||||||
$ git tag -l
|
$ git tag -l
|
||||||
</literallayout>
|
</literallayout>
|
||||||
This example uses the Yocto Project 1.1.1 Release code named "&DISTRO_NAME;",
|
This example uses the Yocto Project &DISTRO; Release code named "&DISTRO_NAME;",
|
||||||
which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository.
|
which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository.
|
||||||
The following commands create and checkout the local <filename>&DISTRO_NAME;</filename>
|
The following commands create and checkout the local <filename>&DISTRO_NAME;</filename>
|
||||||
branch:
|
branch:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||||
Branch edison set up to track remote branch &DISTRO_NAME; from origin.
|
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||||
Switched to a new branch '&DISTRO_NAME;'
|
Switched to a new branch '&DISTRO_NAME;'
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -612,11 +631,11 @@
|
|||||||
<title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title>
|
<title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
By default, <filename>CONFIG_SMP</filename> supports single processor machines.
|
By default, <filename>CONFIG_SMP</filename> supports multiple processor machines.
|
||||||
To see this default setting from within the QEMU emulator, boot your image using
|
To see this default setting from within the QEMU emulator, boot your image using
|
||||||
the emulator as follows:
|
the emulator as follows:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ runqemu qemux86 qemuparams="-smp 2"
|
$ runqemu qemux86 qemuparams="-smp 4"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -624,11 +643,25 @@
|
|||||||
Login to the machine using <filename>root</filename> with no password.
|
Login to the machine using <filename>root</filename> with no password.
|
||||||
After logging in, enter the following command to see how many processors are
|
After logging in, enter the following command to see how many processors are
|
||||||
being supported in the emulator.
|
being supported in the emulator.
|
||||||
The emulator reports support for a single processor:
|
The emulator reports support for the number of processors you specified using
|
||||||
|
the <filename>-smp</filename> option, four in this case:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
# cat /proc/cpuinfo | grep processor
|
# cat /proc/cpuinfo | grep processor
|
||||||
processor : 0
|
processor : 0
|
||||||
|
processor : 1
|
||||||
|
processor : 2
|
||||||
|
processor : 3
|
||||||
#
|
#
|
||||||
|
</literallayout>
|
||||||
|
To check the setting for <filename>CONFIG_SMP</filename>, you can use the
|
||||||
|
following command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
zcat /proc/config.gz | grep CONFIG_SMP
|
||||||
|
</literallayout>
|
||||||
|
The console returns the following showing that multi-processor machine support
|
||||||
|
is set:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
CONFIG_SMP=y
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Logout of the emulator using the <filename>exit</filename> command and
|
Logout of the emulator using the <filename>exit</filename> command and
|
||||||
then close it down.
|
then close it down.
|
||||||
@@ -654,15 +687,25 @@
|
|||||||
<para>
|
<para>
|
||||||
After setting up the environment to run <filename>menuconfig</filename>, you are ready
|
After setting up the environment to run <filename>menuconfig</filename>, you are ready
|
||||||
to use the tool to interactively change the kernel configuration.
|
to use the tool to interactively change the kernel configuration.
|
||||||
In this example, we are basing our changes on the <filename>linux-yocto-3.0-1.1.x</filename>
|
In this example, we are basing our changes on the <filename>linux-yocto-3.2</filename>
|
||||||
kernel.
|
kernel.
|
||||||
The Yocto Project build environment recognizes this kernel as
|
The Yocto Project build environment recognizes this kernel as
|
||||||
<filename>linux-yocto</filename>.
|
<filename>linux-yocto</filename>.
|
||||||
Thus, the following command from the shell in which you previously sourced the
|
Thus, the following commands from the shell in which you previously sourced the
|
||||||
environment initialization script launches <filename>menuconfig</filename>:
|
environment initialization script cleans the shared state memory and the
|
||||||
|
<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
|
||||||
|
directory and then builds and launches <filename>menuconfig</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
|
$ bitbake linux-yocto -c cleansstate
|
||||||
$ bitbake linux-yocto -c menuconfig
|
$ bitbake linux-yocto -c menuconfig
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
<note>
|
||||||
|
Due to a bug in the release, it is necessary to clean the shared state memory
|
||||||
|
in order for configurations made using <filename>menuconfig</filename> to take
|
||||||
|
effect.
|
||||||
|
For information on the bug, see
|
||||||
|
<ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=2256'></ulink>
|
||||||
|
</note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -671,7 +714,7 @@
|
|||||||
You can find it at <filename>Processor Type and Features</filename>.
|
You can find it at <filename>Processor Type and Features</filename>.
|
||||||
The configuration selection is
|
The configuration selection is
|
||||||
<filename>Symmetric Multi-processing Support</filename>.
|
<filename>Symmetric Multi-processing Support</filename>.
|
||||||
After using the arrow keys to highlight this selection, press "y" to select it.
|
After using the arrow keys to highlight this selection, press "n" to turn it off.
|
||||||
Then, exit out and save your selections.
|
Then, exit out and save your selections.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -680,22 +723,25 @@
|
|||||||
is updated.
|
is updated.
|
||||||
This is the file that the build system uses to configure the Linux Yocto kernel
|
This is the file that the build system uses to configure the Linux Yocto kernel
|
||||||
when it is built.
|
when it is built.
|
||||||
You can find and examine this file in the Yocto Project files Git repository in
|
You can find and examine this file in the Yocto Project Files Git repository in
|
||||||
the build directory.
|
the build directory.
|
||||||
This example uses the following.
|
This example uses the following:
|
||||||
Note that this example directory is artificially split and many of the characters
|
|
||||||
in the actually filename are omitted in order to make it more
|
|
||||||
readable:
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-2.6.37+git1+84f...
|
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.2.11+git1+84f...
|
||||||
...r20/linux-qemux86-standard-build
|
...656ed30-r1/linux-qemux86-standard-build
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
<note>
|
||||||
|
The previous example directory is artificially split and many of the characters
|
||||||
|
in the actual filename are omitted in order to make it more readable.
|
||||||
|
Also, depending on the kernel you are using, the exact pathname might differ
|
||||||
|
slightly.
|
||||||
|
</note>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Within the <filename>.config</filename> file, you can see the following setting:
|
Within the <filename>.config</filename> file, you can see the following setting:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
CONFIG_SMP=y
|
# CONFIG_SMP is not set
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -729,11 +775,22 @@
|
|||||||
$ bitbake linux-yocto
|
$ bitbake linux-yocto
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
Manually turning off a kernel configuration setting such as
|
||||||
|
<filename>CONFIG_SMP</filename> can cause the kernel configuration audit
|
||||||
|
to issue warnings during the build.
|
||||||
|
In this example, warnings appear telling you that the expected value
|
||||||
|
<filename>CONFIG_SMP</filename> does not appear in the <filename>.config</filename>
|
||||||
|
file.
|
||||||
|
Because in this example you specifically turned off <filename>CONFIG_SMP</filename>,
|
||||||
|
you can safely ignore the apparent conflict.
|
||||||
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Now run the QEMU emulator:
|
Now run the QEMU emulator and pass it the same multi-processor option as before:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ runqemu qemux86 qemuparams="-smp 2"
|
$ runqemu qemux86 qemuparams="-smp 4"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -743,13 +800,22 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
# cat /proc/cpuinfo | grep processor
|
# cat /proc/cpuinfo | grep processor
|
||||||
processor : 0
|
processor : 0
|
||||||
processor : 1
|
|
||||||
#
|
#
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
From the output, you can see that you have successfully reconfigured the kernel.
|
From the output, you can see that the kernel no longer supports multi-processor systems.
|
||||||
|
The output indicates support for a single processor. You can verify the
|
||||||
|
<filename>CONFIG_SMP</filename> setting by using this command:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
zcat /proc/config.gz | grep CONFIG_SMP
|
||||||
|
</literallayout>
|
||||||
|
The console returns the following output:
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
# CONFIG_SMP is not set
|
||||||
|
</literallayout>
|
||||||
|
You have successfully reconfigured the kernel.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -120,13 +120,15 @@
|
|||||||
Crown Bay that does not support the <trademark class='registered'>Intel</trademark>
|
Crown Bay that does not support the <trademark class='registered'>Intel</trademark>
|
||||||
Embedded Media Graphics Driver (EMGD).
|
Embedded Media Graphics Driver (EMGD).
|
||||||
The remainder of this example uses that base BSP.</para>
|
The remainder of this example uses that base BSP.</para>
|
||||||
<para>To see the supported BSPs, go to the Yocto Project
|
<para>To see the supported BSPs, go to the
|
||||||
<ulink url='&YOCTO_DL_URL;/download'>download page</ulink> and click
|
<ulink url='&YOCTO_HOME_URL;/download'>Download</ulink> page on the Yocto Project
|
||||||
on “BSP Downloads.”</para></listitem>
|
website and click on “BSP Downloads.”</para></listitem>
|
||||||
<listitem><para><emphasis>Create your own BSP layer</emphasis>: Layers are ideal for
|
<listitem><para><emphasis>Create your own BSP layer</emphasis>: Layers are ideal for
|
||||||
isolating and storing work for a given piece of hardware.
|
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.
|
A layer is really just a location or area in which you place the recipes for your BSP.
|
||||||
In fact, a BSP is, in itself, a special type of layer.
|
In fact, a BSP is, in itself, a special type of layer.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
Another example that illustrates a layer is an application.
|
Another example that illustrates a layer is an application.
|
||||||
Suppose you are creating an application that has library or other dependencies in
|
Suppose you are creating an application that has library or other dependencies in
|
||||||
order for it to compile and run.
|
order for it to compile and run.
|
||||||
@@ -134,16 +136,22 @@
|
|||||||
are kept.
|
are kept.
|
||||||
The key point for a layer is that it is an isolated area that contains
|
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
|
all the relevant information for the project that the Yocto Project build
|
||||||
system knows about.</para>
|
system knows about.
|
||||||
|
For more information on layers, see the
|
||||||
|
"<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
|
||||||
|
section.
|
||||||
|
For more information on BSP layers, see the
|
||||||
|
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" section in the
|
||||||
|
Yocto Project Board Support Package (BSP) Developer's Guide.</para>
|
||||||
<note>The Yocto Project supports four BSPs that are part of the
|
<note>The Yocto Project supports four BSPs that are part of the
|
||||||
Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>,
|
Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>,
|
||||||
<filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
|
<filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
|
||||||
The recipes and configurations for these four BSPs are located and dispersed
|
The recipes and configurations for these four BSPs are located and dispersed
|
||||||
within the local Yocto Project files.
|
within the <link linkend='yocto-project-files'>Yocto Project Files</link>.
|
||||||
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,
|
On the other hand, BSP layers for Crown Bay, Emenlow, Jasper Forest,
|
||||||
N450, and Sugar Bay are isolated.</note>
|
N450, Cedar Trail, Fish River, Fish River Island II, Romley, sys940x, tlk,
|
||||||
|
and Sugar Bay exist in their own separate layers within the larger
|
||||||
|
<filename>meta-intel</filename> layer.</note>
|
||||||
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
||||||
This layout is described in the section
|
This layout is described in the section
|
||||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
|
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
|
||||||
@@ -235,7 +243,7 @@
|
|||||||
<ulink url='&YOCTO_GIT_URL;'></ulink>.
|
<ulink url='&YOCTO_GIT_URL;'></ulink>.
|
||||||
If you look at the interface, you will see to the left a grouping of
|
If you look at the interface, you will see to the left a grouping of
|
||||||
Git repositories titled "Yocto Linux Kernel."
|
Git repositories titled "Yocto Linux Kernel."
|
||||||
Within this group, you will find the four different kernels supported by
|
Within this group, you will find several kernels supported by
|
||||||
the Yocto Project:
|
the Yocto Project:
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para><emphasis><filename>linux-yocto-2.6.34</filename></emphasis> - The
|
<listitem><para><emphasis><filename>linux-yocto-2.6.34</filename></emphasis> - The
|
||||||
@@ -247,6 +255,9 @@
|
|||||||
<listitem><para><emphasis><filename>linux-yocto-3.0-1.1.x</filename></emphasis> - The
|
<listitem><para><emphasis><filename>linux-yocto-3.0-1.1.x</filename></emphasis> - The
|
||||||
stable Linux Yocto kernel to use with the Yocto Project Release 1.1.x. This kernel
|
stable Linux Yocto kernel to use with the Yocto Project Release 1.1.x. This kernel
|
||||||
is based on the Linux 3.0 release</para></listitem>
|
is based on the Linux 3.0 release</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>linux-yocto-3.2</filename></emphasis> - The
|
||||||
|
stable Linux Yocto kernel to use with the Yocto Project Release 1.2. This kernel
|
||||||
|
is based on the Linux 3.2 release</para></listitem>
|
||||||
<listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
|
<listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
|
||||||
kernel based on the latest upstream release candidate available.</para></listitem>
|
kernel based on the latest upstream release candidate available.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
@@ -288,7 +299,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
Keep in mind the figure does not take into account all four supported Linux Yocto
|
Keep in mind the figure does not take into account all the supported Linux Yocto
|
||||||
kernel types, but rather shows a single generic kernel just for conceptual purposes.
|
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
|
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
|
that are either pulled from during the build or established on the host development system
|
||||||
@@ -325,7 +336,7 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<imagedata fileref="figures/kernel-overview-3.png"
|
<imagedata fileref="figures/kernel-overview-3-denzil.png"
|
||||||
width="6in" depth="4in" align="center" scale="100" />
|
width="6in" depth="4in" align="center" scale="100" />
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -363,11 +374,11 @@
|
|||||||
<para>
|
<para>
|
||||||
Again, for a complete discussion of the Yocto Project kernel's architcture and its
|
Again, for a complete discussion of the Yocto Project kernel's architcture and its
|
||||||
branching strategy,
|
branching strategy,
|
||||||
see the <ulink url='&YOCTO_DOCS_KERNEL_URL;'>
|
see <ulink url='&YOCTO_DOCS_KERNEL_URL;'>
|
||||||
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||||
Also, you can reference
|
You can also reference the
|
||||||
<xref linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</xref>
|
"<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</link>"
|
||||||
for a detailed example that modifies the kernel.
|
section for a detailed example that modifies the kernel.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -461,7 +472,7 @@
|
|||||||
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
||||||
changes to your kernel (configurations, source code changes, recipe additions,
|
changes to your kernel (configurations, source code changes, recipe additions,
|
||||||
or recipe changes), there remains a few things
|
or recipe changes), there remains a few things
|
||||||
you need to do in order for the Yocto Project build system to create your image.
|
you need to do in order for the Yocto Project build system (BitBake) to create your image.
|
||||||
If you have not done so, you need to get the build environment ready by sourcing
|
If you have not done so, you need to get the build environment ready by sourcing
|
||||||
the environment setup script described earlier.
|
the environment setup script described earlier.
|
||||||
You also need to be sure two key configuration files
|
You also need to be sure two key configuration files
|
||||||
@@ -574,7 +585,7 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
You must have a target kernel image that has been built using the Yocto Project.</para>
|
You must have a target kernel image that has been built using the Yocto Project.</para>
|
||||||
<para>Depending on whether the Yocto Project has a pre-built image that matches your target
|
<para>Depending on whether the Yocto Project has a pre-built image that matches your target
|
||||||
architecture and where you are going to run the image while you develop your application
|
architecture and where you are going to run the image while you develop your application
|
||||||
(QEMU or real hardware), the area you get the image from differs.
|
(QEMU or real hardware), the area from which you get the image differs.
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem><para>Download the image from
|
<listitem><para>Download the image from
|
||||||
<ulink url='&YOCTO_MACHINES_DL_URL;'>
|
<ulink url='&YOCTO_MACHINES_DL_URL;'>
|
||||||
@@ -717,8 +728,8 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
|||||||
<listitem><para>You can modify various policy settings such as the package format used to build with,
|
<listitem><para>You can modify various policy settings such as the package format used to build with,
|
||||||
the parrallelism BitBake uses, whether or not to build an external toolchain, and which host
|
the parrallelism BitBake uses, whether or not to build an external toolchain, and which host
|
||||||
to build against.</para></listitem>
|
to build against.</para></listitem>
|
||||||
<listitem><para>You can manage <link linkend='understanding-and-creating-layers'>Understanding
|
<listitem><para>You can manage
|
||||||
and Creating layers</link>.</para></listitem>
|
<link linkend='understanding-and-creating-layers'>layers</link>.</para></listitem>
|
||||||
<listitem><para>You can select a base image and then add extra packages for your custom build.
|
<listitem><para>You can select a base image and then add extra packages for your custom build.
|
||||||
</para></listitem>
|
</para></listitem>
|
||||||
<listitem><para>You can launch and monitor the build from within Hob.</para></listitem>
|
<listitem><para>You can launch and monitor the build from within Hob.</para></listitem>
|
||||||
|
|||||||
@@ -335,7 +335,8 @@
|
|||||||
The area is created when you <filename>source</filename> the Yocto Project setup
|
The area is created when you <filename>source</filename> the Yocto Project setup
|
||||||
environment script that is found in the Yocto Project files area
|
environment script that is found in the Yocto Project files area
|
||||||
(i.e. <filename>oe-init-build-env</filename>).
|
(i.e. <filename>oe-init-build-env</filename>).
|
||||||
The <filename>TOPDIR</filename> variable points to the build directory.</para>
|
The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>
|
||||||
|
variable points to the build directory.</para>
|
||||||
|
|
||||||
<para>You have a lot of flexibility when creating the Yocto Project Build Directory.
|
<para>You have a lot of flexibility when creating the Yocto Project Build Directory.
|
||||||
Following are some examples that show how to create the directory:
|
Following are some examples that show how to create the directory:
|
||||||
@@ -494,7 +495,8 @@
|
|||||||
Git uses "branches" to organize different development efforts.
|
Git uses "branches" to organize different development efforts.
|
||||||
For example, the <filename>poky</filename> repository has
|
For example, the <filename>poky</filename> repository has
|
||||||
<filename>laverne</filename>, <filename>bernard</filename>,
|
<filename>laverne</filename>, <filename>bernard</filename>,
|
||||||
<filename>edison</filename>, and <filename>master</filename> branches among
|
<filename>edison</filename>, <filename>denzil</filename> and
|
||||||
|
<filename>master</filename> branches among
|
||||||
others.
|
others.
|
||||||
You can see all the branches by going to
|
You can see all the branches by going to
|
||||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
|
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
|
||||||
@@ -525,7 +527,7 @@
|
|||||||
$ cd ~
|
$ cd ~
|
||||||
$ git clone git://git.yoctoproject.org/poky
|
$ git clone git://git.yoctoproject.org/poky
|
||||||
$ cd poky
|
$ cd poky
|
||||||
$ git checkout &DISTRO_NAME; -b &DISTRO_NAME;
|
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||||
</literallayout>
|
</literallayout>
|
||||||
In this example, the name of the top-level directory of your local Yocto Project
|
In this example, the name of the top-level directory of your local Yocto Project
|
||||||
Files Git repository is <filename>poky</filename>.
|
Files Git repository is <filename>poky</filename>.
|
||||||
@@ -577,14 +579,14 @@
|
|||||||
$ cd ~
|
$ cd ~
|
||||||
$ git clone git://git.yoctoproject.org/poky
|
$ git clone git://git.yoctoproject.org/poky
|
||||||
$ cd poky
|
$ cd poky
|
||||||
$ git checkout &DISTRO_NAME;-&POKYVERSION; -b &DISTRO_NAME;-&POKYVERSION;
|
$ git checkout -b my-&DISTRO_NAME;-&POKYVERSION; &DISTRO_NAME;-&POKYVERSION;
|
||||||
</literallayout>
|
</literallayout>
|
||||||
In this example, the name of the top-level directory of your local Yocto Project
|
In this example, the name of the top-level directory of your local Yocto Project
|
||||||
Files Git repository is <filename>poky</filename>.
|
Files Git repository is <filename>poky</filename>.
|
||||||
And, the name of the local branch you have created and checked out is
|
And, the name of the local branch you have created and checked out is
|
||||||
<filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
|
<filename>my-&DISTRO_NAME;-&POKYVERSION;</filename>.
|
||||||
The files in your repository now exactly match the Yocto Project &DISTRO;
|
The files in your repository now exactly match the Yocto Project &DISTRO;
|
||||||
Release tag (&DISTRO_NAME;).
|
Release tag (<filename>&DISTRO_NAME;-&POKYVERSION;</filename>).
|
||||||
It is important to understand that when you create and checkout a local
|
It is important to understand that when you create and checkout a local
|
||||||
working branch based on a tag, your environment matches a specific point
|
working branch based on a tag, your environment matches a specific point
|
||||||
in time and not a development branch.
|
in time and not a development branch.
|
||||||
|
|||||||
@@ -31,7 +31,8 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can use the Yocto Project, which uses the BitBake build tool, to develop complete Linux
|
You can use the Yocto Project build system, which uses
|
||||||
|
<ulink url='http://bitbake.berlios.de/manual/'>BitBake</ulink>, to develop complete Linux
|
||||||
images and associated user-space applications for architectures based on ARM, MIPS, PowerPC,
|
images and associated user-space applications for architectures based on ARM, MIPS, PowerPC,
|
||||||
x86 and x86-64.
|
x86 and x86-64.
|
||||||
While the Yocto Project does not provide a strict testing framework,
|
While the Yocto Project does not provide a strict testing framework,
|
||||||
@@ -109,11 +110,11 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git clone git://git.yoctoproject.org/poky
|
$ git clone git://git.yoctoproject.org/poky
|
||||||
Initialized empty Git repository in /home/scottrif/poky/.git/
|
Initialized empty Git repository in /home/scottrif/poky/.git/
|
||||||
remote: Counting objects: 116882, done.
|
remote: Counting objects: 141863, done.
|
||||||
remote: Compressing objects: 100% (35987/35987), done.
|
remote: Compressing objects: 100% (38624/38624), done.
|
||||||
remote: Total 116882 (delta 80651), reused 113045 (delta 77578)
|
remote: Total 141863 (delta 99661), reused 141816 (delta 99614)
|
||||||
Receiving objects: 100% (116882/116882), 72.13 MiB | 2.68 MiB/s, done.
|
Receiving objects: 100% (141863/141863), 76.64 MiB | 126 KiB/s, done.
|
||||||
Resolving deltas: 100% (80651/80651), done.
|
Resolving deltas: 100% (99661/99661), done.
|
||||||
</literallayout></para>
|
</literallayout></para>
|
||||||
<para>For another example of how to set up your own local Git repositories, see this
|
<para>For another example of how to set up your own local Git repositories, see this
|
||||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
||||||
@@ -132,29 +133,29 @@
|
|||||||
For simplicity, it is recommended that you create these structures outside of the
|
For simplicity, it is recommended that you create these structures outside of the
|
||||||
Yocto Project Files Git repository.</para>
|
Yocto Project Files Git repository.</para>
|
||||||
<para>As an example, the following transcript shows how to create the bare clone
|
<para>As an example, the following transcript shows how to create the bare clone
|
||||||
of the <filename>linux-yocto-3.0-1.1.x</filename> kernel and then create a copy of
|
of the <filename>linux-yocto-3.2</filename> kernel and then create a copy of
|
||||||
that clone.
|
that clone.
|
||||||
<note>When you have a local Linux Yocto kernel Git repository, you can
|
<note>When you have a local Linux Yocto kernel Git repository, you can
|
||||||
reference that repository rather than the upstream Git repository as
|
reference that repository rather than the upstream Git repository as
|
||||||
part of the <filename>clone</filename> command.
|
part of the <filename>clone</filename> command.
|
||||||
Doing so can speed up the process.</note></para>
|
Doing so can speed up the process.</note></para>
|
||||||
<para>In the following example, the bare clone is named
|
<para>In the following example, the bare clone is named
|
||||||
<filename>linux-yocto-3.0-1.1.x.git</filename>, while the
|
<filename>linux-yocto-3.2.git</filename>, while the
|
||||||
copy is named <filename>my-linux-yocto-3.0-1.1.x-work</filename>:
|
copy is named <filename>my-linux-yocto-3.2-work</filename>:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.0-1.1.x linux-yocto-3.0-1.1.x.git
|
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.2 linux-yocto-3.2.git
|
||||||
Initialized empty Git repository in /home/scottrif/linux-yocto-3.0-1.1.x.git/
|
Initialized empty Git repository in /home/scottrif/linux-yocto-3.2.git/
|
||||||
remote: Counting objects: 2259181, done.
|
remote: Counting objects: 2468027, done.
|
||||||
remote: Compressing objects: 100% (373259/373259), done.
|
remote: Compressing objects: 100% (392255/392255), done.
|
||||||
remote: Total 2259181 (delta 1892638), reused 2231556 (delta 1865300)
|
remote: Total 2468027 (delta 2071693), reused 2448773 (delta 2052498)
|
||||||
Receiving objects: 100% (2259181/2259181), 482.44 MiB | 580 KiB/s, done.
|
Receiving objects: 100% (2468027/2468027), 530.46 MiB | 129 KiB/s, done.
|
||||||
Resolving deltas: 100% (1892638/1892638), done.
|
Resolving deltas: 100% (2071693/2071693), done.
|
||||||
</literallayout></para>
|
</literallayout></para>
|
||||||
<para>Now create a clone of the bare clone just created:
|
<para>Now create a clone of the bare clone just created:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ git clone linux-yocto-3.0-1.1.x.git my-linux-yocto-3.0-1.1.x-work
|
$ git clone linux-yocto-3.2.git my-linux-yocto-3.2-work
|
||||||
Initialized empty Git repository in /home/scottrif/my-linux-yocto-3.0-1.1.x/.git/
|
Initialized empty Git repository in /home/scottrif/my-linux-yocto-3.2-work/.git/
|
||||||
Checking out files: 100% (36898/36898), done.
|
Checking out files: 100% (37619/37619), done.
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem id='poky-extras-repo'><para><emphasis>
|
<listitem id='poky-extras-repo'><para><emphasis>
|
||||||
The <filename>poky-extras</filename> Git Repository</emphasis>:
|
The <filename>poky-extras</filename> Git Repository</emphasis>:
|
||||||
@@ -175,14 +176,13 @@
|
|||||||
repository inside the Yocto Project files Git repository, which is named
|
repository inside the Yocto Project files Git repository, which is named
|
||||||
<filename>poky</filename> in this case:
|
<filename>poky</filename> in this case:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd ~/poky
|
|
||||||
$ git clone git://git.yoctoproject.org/poky-extras poky-extras
|
$ git clone git://git.yoctoproject.org/poky-extras poky-extras
|
||||||
Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
|
Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
|
||||||
remote: Counting objects: 561, done.
|
remote: Counting objects: 618, done.
|
||||||
remote: Compressing objects: 100% (501/501), done.
|
remote: Compressing objects: 100% (558/558), done.
|
||||||
remote: Total 561 (delta 159), reused 306 (delta 39)
|
remote: Total 618 (delta 192), reused 307 (delta 39)
|
||||||
Receiving objects: 100% (561/561), 519.96 KiB | 479 KiB/s, done.
|
Receiving objects: 100% (618/618), 526.26 KiB | 111 KiB/s, done.
|
||||||
Resolving deltas: 100% (159/159), done.
|
Resolving deltas: 100% (192/192), done.
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para id='supported-board-support-packages-(bsps)'><emphasis>Supported Board
|
<listitem><para id='supported-board-support-packages-(bsps)'><emphasis>Supported Board
|
||||||
Support Packages (BSPs):</emphasis>
|
Support Packages (BSPs):</emphasis>
|
||||||
@@ -231,14 +231,13 @@
|
|||||||
<filename>meta-intel</filename>
|
<filename>meta-intel</filename>
|
||||||
Git repository inside the <filename>poky</filename> Git repository.
|
Git repository inside the <filename>poky</filename> Git repository.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ cd poky
|
|
||||||
$ git clone git://git.yoctoproject.org/meta-intel.git
|
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||||
Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
|
Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
|
||||||
remote: Counting objects: 1325, done.
|
remote: Counting objects: 3380, done.
|
||||||
remote: Compressing objects: 100% (1078/1078), done.
|
remote: Compressing objects: 100% (2750/2750), done.
|
||||||
remote: Total 1325 (delta 546), reused 85 (delta 27)
|
remote: Total 3380 (delta 1689), reused 227 (delta 113)
|
||||||
Receiving objects: 100% (1325/1325), 1.56 MiB | 330 KiB/s, done.
|
Receiving objects: 100% (3380/3380), 1.77 MiB | 128 KiB/s, done.
|
||||||
Resolving deltas: 100% (546/546), done.
|
Resolving deltas: 100% (1689/1689), done.
|
||||||
</literallayout></para>
|
</literallayout></para>
|
||||||
<para>The same
|
<para>The same
|
||||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||||
|
|
||||||
<book id='dev-manual' lang='en'
|
<book id='dev-manual' lang='en'
|
||||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||||
xmlns="http://docbook.org/ns/docbook"
|
xmlns="http://docbook.org/ns/docbook"
|
||||||
>
|
>
|
||||||
@@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
<mediaobject>
|
<mediaobject>
|
||||||
<imageobject>
|
<imageobject>
|
||||||
<imagedata fileref='figures/dev-title.png'
|
<imagedata fileref='figures/dev-title.png'
|
||||||
format='SVG'
|
format='SVG'
|
||||||
align='left' scalefit='1' width='100%'/>
|
align='left' scalefit='1' width='100%'/>
|
||||||
</imageobject>
|
</imageobject>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<title></title>
|
<title></title>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
@@ -36,8 +36,18 @@
|
|||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.2</revnumber>
|
<revnumber>1.2</revnumber>
|
||||||
<date>TBD 2012</date>
|
<date>April 2012</date>
|
||||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.1</revnumber>
|
||||||
|
<date>July 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.2</revnumber>
|
||||||
|
<date>January 2013</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.2 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
@@ -48,15 +58,14 @@
|
|||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
|
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 Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by
|
|
||||||
Creative Commons.
|
Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and
|
documentation bundled in the release tarball and
|
||||||
<ulink url='&YOCTO_DOCS_DEV_URL;'>
|
<ulink url='&YOCTO_DOCS_DEV_URL;'>
|
||||||
The Yocto Project Development Manual</ulink> on
|
The Yocto Project Development Manual</ulink> on
|
||||||
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
||||||
@@ -81,6 +90,6 @@
|
|||||||
<xi:include href="dev-manual-kernel-appendix.xml"/>
|
<xi:include href="dev-manual-kernel-appendix.xml"/>
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
-->
|
-->
|
||||||
|
|||||||
BIN
documentation/dev-manual/figures/kernel-example-repos-denzil.png
Normal file
BIN
documentation/dev-manual/figures/kernel-example-repos-denzil.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
BIN
documentation/dev-manual/figures/kernel-overview-3-denzil.png
Normal file
BIN
documentation/dev-manual/figures/kernel-overview-3-denzil.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
@@ -2,7 +2,7 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||||
|
|
||||||
<book id='kernel-manual' lang='en'
|
<book id='kernel-manual' lang='en'
|
||||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||||
xmlns="http://docbook.org/ns/docbook"
|
xmlns="http://docbook.org/ns/docbook"
|
||||||
>
|
>
|
||||||
@@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
<mediaobject>
|
<mediaobject>
|
||||||
<imageobject>
|
<imageobject>
|
||||||
<imagedata fileref='figures/kernel-title.png'
|
<imagedata fileref='figures/kernel-title.png'
|
||||||
format='SVG'
|
format='SVG'
|
||||||
align='left' scalefit='1' width='100%'/>
|
align='left' scalefit='1' width='100%'/>
|
||||||
</imageobject>
|
</imageobject>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<title></title>
|
<title></title>
|
||||||
|
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<author>
|
<author>
|
||||||
@@ -51,8 +51,18 @@
|
|||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.2</revnumber>
|
<revnumber>1.2</revnumber>
|
||||||
<date>TBD 2012</date>
|
<date>April 2012</date>
|
||||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.1</revnumber>
|
||||||
|
<date>July 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.2</revnumber>
|
||||||
|
<date>January 2013</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.2 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
@@ -63,12 +73,12 @@
|
|||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and
|
documentation bundled in the release tarball and
|
||||||
<ulink url='&YOCTO_DOCS_KERNEL_URL;'>
|
<ulink url='&YOCTO_DOCS_KERNEL_URL;'>
|
||||||
The Yocto Project Kernel Architecture and Use Manual</ulink> on
|
The Yocto Project Kernel Architecture and Use Manual</ulink> on
|
||||||
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
||||||
@@ -90,6 +100,6 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -493,7 +493,7 @@
|
|||||||
<qandaentry>
|
<qandaentry>
|
||||||
<question>
|
<question>
|
||||||
<para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
|
<para id='how-does-the-yocto-project-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
|
How does the Yocto Project build system obtain source code and will it work behind my
|
||||||
firewall or proxy server?
|
firewall or proxy server?
|
||||||
</para>
|
</para>
|
||||||
</question>
|
</question>
|
||||||
|
|||||||
@@ -2,18 +2,18 @@
|
|||||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||||
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
|
||||||
|
|
||||||
<book id='poky-ref-manual' lang='en'
|
<book id='poky-ref-manual' lang='en'
|
||||||
xmlns:xi="http://www.w3.org/2003/XInclude"
|
xmlns:xi="http://www.w3.org/2003/XInclude"
|
||||||
xmlns="http://docbook.org/ns/docbook"
|
xmlns="http://docbook.org/ns/docbook"
|
||||||
>
|
>
|
||||||
<bookinfo>
|
<bookinfo>
|
||||||
|
|
||||||
<mediaobject>
|
<mediaobject>
|
||||||
<imageobject>
|
<imageobject>
|
||||||
<imagedata fileref='figures/poky-title.png'
|
<imagedata fileref='figures/poky-title.png'
|
||||||
format='SVG'
|
format='SVG'
|
||||||
align='left' scalefit='1' width='100%'/>
|
align='left' scalefit='1' width='100%'/>
|
||||||
</imageobject>
|
</imageobject>
|
||||||
</mediaobject>
|
</mediaobject>
|
||||||
|
|
||||||
<title></title>
|
<title></title>
|
||||||
@@ -65,8 +65,18 @@
|
|||||||
</revision>
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<revnumber>1.2</revnumber>
|
<revnumber>1.2</revnumber>
|
||||||
<date>TBD 2012</date>
|
<date>April 2012</date>
|
||||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.1</revnumber>
|
||||||
|
<date>July 2012</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||||
|
</revision>
|
||||||
|
<revision>
|
||||||
|
<revnumber>1.2.2</revnumber>
|
||||||
|
<date>January 2013</date>
|
||||||
|
<revremark>Released with the Yocto Project 1.2.2 Release.</revremark>
|
||||||
</revision>
|
</revision>
|
||||||
</revhistory>
|
</revhistory>
|
||||||
|
|
||||||
@@ -77,12 +87,12 @@
|
|||||||
|
|
||||||
<legalnotice>
|
<legalnotice>
|
||||||
<para>
|
<para>
|
||||||
Permission is granted to copy, distribute and/or modify this document under
|
Permission is granted to copy, distribute and/or modify this document under
|
||||||
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England & Wales</ulink> as published by Creative Commons.
|
||||||
</para>
|
</para>
|
||||||
<note>
|
<note>
|
||||||
Due to production processes, there could be differences between the Yocto Project
|
Due to production processes, there could be differences between the Yocto Project
|
||||||
documentation bundled in the release tarball and
|
documentation bundled in the release tarball and
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
||||||
The Yocto Project Reference Manual</ulink> on
|
The Yocto Project Reference Manual</ulink> on
|
||||||
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
the <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
|
||||||
@@ -122,10 +132,10 @@
|
|||||||
|
|
||||||
<!-- <index id='index'>
|
<!-- <index id='index'>
|
||||||
<title>Index</title>
|
<title>Index</title>
|
||||||
</index>
|
</index>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
<!--
|
<!--
|
||||||
vim: expandtab tw=80 ts=4
|
vim: expandtab tw=80 ts=4
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -106,6 +106,14 @@
|
|||||||
instead of X11.
|
instead of X11.
|
||||||
In order to build, this image requires specific distro configuration that enables
|
In order to build, this image requires specific distro configuration that enables
|
||||||
<filename>gtk</filename> over <filename>directfb</filename>.</para></listitem>
|
<filename>gtk</filename> over <filename>directfb</filename>.</para></listitem>
|
||||||
|
<listitem><para><emphasis><filename>self-hosted-image</filename>:</emphasis>
|
||||||
|
An image you can run using the Yocto Project Build Appliance.
|
||||||
|
The image is suitable to load and boot from either
|
||||||
|
<ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
|
||||||
|
or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMWare Workstation</ulink>.
|
||||||
|
For more information on the Build Appliance, see the
|
||||||
|
<ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
|
||||||
|
the Yocto Project website.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
<tip>
|
<tip>
|
||||||
|
|||||||
@@ -669,7 +669,7 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
|
FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
Typically, you want your directories search first.
|
Typically, you want your directories searched first.
|
||||||
To make sure that happens, use <filename>_prepend</filename> and
|
To make sure that happens, use <filename>_prepend</filename> and
|
||||||
the immediate expansion (<filename>:=</filename>) operator as shown in the
|
the immediate expansion (<filename>:=</filename>) operator as shown in the
|
||||||
previous example.
|
previous example.
|
||||||
|
|||||||
@@ -725,7 +725,7 @@
|
|||||||
<para>
|
<para>
|
||||||
You can also use relative paths as shown in the following example:
|
You can also use relative paths as shown in the following example:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
LIC_FILES_CHKSUM = "file://src/ls.c;startline=5;endline=16;\
|
LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
|
||||||
md5=bb14ed3c4cda583abc85401304b5cd4e"
|
md5=bb14ed3c4cda583abc85401304b5cd4e"
|
||||||
LIC_FILES_CHKSUM = "file://../license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
|
LIC_FILES_CHKSUM = "file://../license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<!ENTITY DISTRO "1.1">
|
<!ENTITY DISTRO "1.2.2">
|
||||||
<!ENTITY DISTRO_NAME "edison">
|
<!ENTITY DISTRO_NAME "denzil">
|
||||||
<!ENTITY YOCTO_DOC_VERSION "latest">
|
<!ENTITY YOCTO_DOC_VERSION "1.2.2">
|
||||||
<!ENTITY POKYVERSION "6.0">
|
<!ENTITY POKYVERSION "7.0.2">
|
||||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||||
<!ENTITY COPYRIGHT_YEAR "2010-2012">
|
<!ENTITY COPYRIGHT_YEAR "2010-2013">
|
||||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||||
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
|
<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
|
||||||
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
|
<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
|
||||||
|
|||||||
@@ -21,15 +21,23 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you know all about open-source development, Linux development environments, Git source
|
If you don't have a system that runs Linux and you want to give the Yocto Project a test run,
|
||||||
repositories and the like and you just want some quick information that lets you try out
|
you might consider using the Yocto Project Build Appliance.
|
||||||
the Yocto Project, skip right to the "<link linkend='super-user'>Super User</link>" section at
|
The Build Appliance allows you to build and boot a custom embedded Linux image with the Yocto
|
||||||
the end of this quick start.
|
Project using a non-Linux development system.
|
||||||
Otherwise, keep reading...
|
See the <ulink url='http://www.yoctoproject.org/documentation/build-appliance'>Yocto
|
||||||
|
Project Build Appliance</ulink> for more information.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This short document will give you some basic information about the environment and
|
On the other hand, if you know all about open-source development, Linux development environments,
|
||||||
|
Git source repositories and the like and you just want some quick information that lets you try out
|
||||||
|
the Yocto Project on your Linux system, skip right to the
|
||||||
|
"<link linkend='super-user'>Super User</link>" section at the end of this quick start.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
For the rest of you, this short document will give you some basic information about the environment and
|
||||||
let you experience it in its simplest form.
|
let you experience it in its simplest form.
|
||||||
After reading this document, you will have a basic understanding of what the Yocto Project is
|
After reading this document, you will have a basic understanding of what the Yocto Project is
|
||||||
and how to use some of its core components.
|
and how to use some of its core components.
|
||||||
@@ -144,7 +152,7 @@
|
|||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>A host system running a supported Linux distribution (i.e. recent releases of
|
<para>A host system running a supported Linux distribution (i.e. recent releases of
|
||||||
Fedora, openSUSE, Debian, and Ubuntu).
|
Fedora, openSUSE, CentOS, Debian, and Ubuntu).
|
||||||
If the host system supports multiple cores and threads, you can configure the
|
If the host system supports multiple cores and threads, you can configure the
|
||||||
Yocto Project build system to decrease the time needed to build images
|
Yocto Project build system to decrease the time needed to build images
|
||||||
significantly.
|
significantly.
|
||||||
@@ -170,6 +178,7 @@
|
|||||||
<listitem><para>Ubuntu</para></listitem>
|
<listitem><para>Ubuntu</para></listitem>
|
||||||
<listitem><para>Fedora</para></listitem>
|
<listitem><para>Fedora</para></listitem>
|
||||||
<listitem><para>openSUSE</para></listitem>
|
<listitem><para>openSUSE</para></listitem>
|
||||||
|
<listitem><para>CentOS</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
For a list of the distributions under validation and their status, see the
|
For a list of the distributions under validation and their status, see the
|
||||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution
|
<ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution
|
||||||
@@ -208,7 +217,7 @@
|
|||||||
Packages and package installation vary depending on your development system.
|
Packages and package installation vary depending on your development system.
|
||||||
In general, you need to have root access and then install the required packages.
|
In general, you need to have root access and then install the required packages.
|
||||||
The next few sections show you how to get set up with the right packages for
|
The next few sections show you how to get set up with the right packages for
|
||||||
Ubuntu, Fedora, and openSUSE.
|
Ubuntu, Fedora, openSUSE, and CentOS.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section id='ubuntu'>
|
<section id='ubuntu'>
|
||||||
@@ -219,11 +228,11 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ sudo apt-get install sed wget cvs subversion git-core coreutils \
|
$ sudo apt-get install sed wget subversion git-core coreutils \
|
||||||
unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk \
|
unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk \
|
||||||
python-pysqlite2 diffstat help2man make gcc build-essential xsltproc \
|
python-pysqlite2 diffstat make gcc build-essential xsltproc \
|
||||||
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
|
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
|
||||||
mercurial autoconf automake groff libtool xterm libxml-parser-perl
|
autoconf automake groff libtool xterm libxml-parser-perl
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -237,23 +246,16 @@
|
|||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ sudo yum groupinstall "development tools"
|
$ sudo yum groupinstall "development tools"
|
||||||
$ sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip \
|
$ sudo yum install python m4 make wget curl ftp tar bzip2 gzip \
|
||||||
unzip python-psyco perl texinfo texi2html diffstat openjade \
|
unzip perl texinfo texi2html diffstat openjade \
|
||||||
docbook-style-dsssl sed docbook-style-xsl docbook-dtds fop xsltproc \
|
docbook-style-dsssl sed docbook-style-xsl docbook-dtds fop xsltproc \
|
||||||
docbook-utils sed bc eglibc-devel ccache pcre pcre-devel quilt \
|
docbook-utils sed bc eglibc-devel ccache pcre pcre-devel quilt \
|
||||||
groff linuxdoc-tools patch linuxdoc-tools cmake help2man \
|
groff linuxdoc-tools patch cmake \
|
||||||
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
|
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
|
||||||
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||||
autoconf automake libtool xterm
|
autoconf automake libtool xterm
|
||||||
</literallayout>
|
</literallayout>
|
||||||
|
|
||||||
<note><para>
|
|
||||||
If you are using a Fedora version prior to version 15, you will need to take some
|
|
||||||
extra steps to enable <filename>sudo</filename>, or you will need to run
|
|
||||||
the commands as root user.
|
|
||||||
See the <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'>Configuring Sudo</ulink>
|
|
||||||
wiki page for details.
|
|
||||||
</para></note>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='opensuse'>
|
<section id='opensuse'>
|
||||||
@@ -266,10 +268,40 @@
|
|||||||
|
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ sudo zypper install python gcc gcc-c++ libtool fop \
|
$ sudo zypper install python gcc gcc-c++ libtool fop \
|
||||||
subversion git chrpath automake make wget help2man xsltproc \
|
subversion git chrpath automake make wget xsltproc \
|
||||||
diffstat texinfo mercurial freeglut-devel libSDL-devel
|
diffstat texinfo freeglut-devel libSDL-devel
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section id='centos'>
|
||||||
|
<title>CentOS</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The packages you need for a supported CentOS distribution are shown in the following
|
||||||
|
commands:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<literallayout class='monospaced'>
|
||||||
|
$ sudo yum -y groupinstall "development tools"
|
||||||
|
$ sudo yum -y install tetex gawk sqlite-devel vim-common redhat-lsb xz \
|
||||||
|
m4 make wget curl ftp tar bzip2 gzip python-devel \
|
||||||
|
unzip perl texinfo texi2html diffstat openjade zlib-devel \
|
||||||
|
docbook-style-dsssl sed docbook-style-xsl docbook-dtds \
|
||||||
|
docbook-utils bc glibc-devel pcre pcre-devel \
|
||||||
|
groff linuxdoc-tools patch cmake \
|
||||||
|
tcl-devel gettext ncurses apr \
|
||||||
|
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||||
|
autoconf automake libtool xterm
|
||||||
|
</literallayout>
|
||||||
|
<note><para>
|
||||||
|
Depending on the CentOS version you are using, other requirements and dependencies
|
||||||
|
might exist.
|
||||||
|
For details, you should look at the CentOS sections on the
|
||||||
|
<ulink url='&YOCTO_WIKI_URL;/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||||
|
wiki page.
|
||||||
|
</para></note>
|
||||||
|
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id='releases'>
|
<section id='releases'>
|
||||||
@@ -293,9 +325,7 @@
|
|||||||
Doing so allows you to contribute back to the project.
|
Doing so allows you to contribute back to the project.
|
||||||
For information on how to get set up using this method, see the
|
For information on how to get set up using this method, see the
|
||||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto
|
||||||
Project Release</ulink>" item in
|
Project Release</ulink>" item in The Yocto Project Development Manual.
|
||||||
<ulink url='&YOCTO_DOCS_DEV_URL;'>The Yocto Project
|
|
||||||
Development Manual</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
@@ -304,7 +334,7 @@
|
|||||||
<title>A Quick Test Run</title>
|
<title>A Quick Test Run</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Now that you have your system requirements in order, you can give Yocto Project a try.
|
Now that you have your system requirements in order, you can give the Yocto Project a try.
|
||||||
This section presents some steps that let you do the following:
|
This section presents some steps that let you do the following:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
@@ -350,9 +380,9 @@
|
|||||||
By default, the Yocto Project searches for source code using a pre-determined order
|
By default, the Yocto Project searches for source code using a pre-determined order
|
||||||
through a set of locations.
|
through a set of locations.
|
||||||
If you encounter problems with the Yocto Project finding and downloading source code, see
|
If you encounter problems with the Yocto Project finding and downloading source code, see
|
||||||
the FAQ entry "How does Poky obtain source code and will it work behind my
|
the FAQ entry "How does the Yocto Project build system obtain source code and will it work behind my
|
||||||
firewall or proxy server?" in
|
firewall or proxy server?" in
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
<ulink url='&YOCTO_DOCS_REF_URL;#faq'>
|
||||||
The Yocto Project Reference Manual</ulink>.
|
The Yocto Project Reference Manual</ulink>.
|
||||||
</para></note>
|
</para></note>
|
||||||
|
|
||||||
@@ -360,18 +390,18 @@
|
|||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wget &YOCTO_POKY_DL_URL;
|
$ wget &YOCTO_POKY_DL_URL;
|
||||||
$ tar xjf &YOCTO_POKY;.tar.bz2
|
$ tar xjf &YOCTO_POKY;.tar.bz2
|
||||||
$ source &OE_INIT_PATH; edison-6.0-build
|
$ source &OE_INIT_PATH; &YOCTO_POKY;-build
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<tip><para>
|
<tip><para>
|
||||||
To help conserve disk space during builds, you can add the following statement
|
To help conserve disk space during builds, you can add the following statement
|
||||||
to your project's configuration file, which for this example
|
to your project's configuration file, which for this example
|
||||||
is <filename>edison-6.0-build/conf/local.conf</filename>.
|
is <filename>&YOCTO_POKY;-build/conf/local.conf</filename>.
|
||||||
Adding this statement deletes the work directory used for building a package
|
Adding this statement deletes the work directory used for building a package
|
||||||
once the package is built.
|
once the package is built.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
INHERIT += rm_work
|
INHERIT += "rm_work"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para></tip>
|
</para></tip>
|
||||||
|
|
||||||
@@ -380,16 +410,16 @@
|
|||||||
release tarball from the source repositories using the
|
release tarball from the source repositories using the
|
||||||
<filename>wget</filename> command.
|
<filename>wget</filename> command.
|
||||||
Alternatively, you can go to the
|
Alternatively, you can go to the
|
||||||
<ulink url='&YOCTO_HOME_URL;/download'>Yocto Project website</ulink>
|
<ulink url='&YOCTO_HOME_URL;/download'>Yocto Project website's Downloads page</ulink>
|
||||||
Downloads page to retrieve the tarball.</para></listitem>
|
to retrieve the tarball.</para></listitem>
|
||||||
<listitem><para>The second command extracts the files from the tarball and places
|
<listitem><para>The second command extracts the files from the tarball and places
|
||||||
them into a directory named <filename>poky-edison-6.0</filename> in the current
|
them into a directory named <filename>&YOCTO_POKY;</filename> in the current
|
||||||
directory.</para></listitem>
|
directory.</para></listitem>
|
||||||
<listitem><para>The third command runs the Yocto Project environment setup script.
|
<listitem><para>The third command runs the Yocto Project environment setup script.
|
||||||
Running this script defines Yocto Project build environment settings needed to
|
Running this script defines Yocto Project build environment settings needed to
|
||||||
complete the build.
|
complete the build.
|
||||||
The script also creates the Yocto Project
|
The script also creates the Yocto Project
|
||||||
build directory, which is <filename>edison-6.0-build</filename> in this case.
|
build directory, which is <filename>&YOCTO_POKY;-build</filename> in this case.
|
||||||
After the script runs, your current working directory is set
|
After the script runs, your current working directory is set
|
||||||
to the build directory.
|
to the build directory.
|
||||||
Later, when the build completes, the build directory contains all the files
|
Later, when the build completes, the build directory contains all the files
|
||||||
@@ -429,9 +459,8 @@
|
|||||||
You can control this configuration by using the
|
You can control this configuration by using the
|
||||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename> variable.
|
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename> variable.
|
||||||
For additional package manager selection information, see
|
For additional package manager selection information, see
|
||||||
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>" in
|
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>"
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
in The Yocto Project Reference Manual.
|
||||||
The Yocto Project Reference Manual</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -440,15 +469,15 @@
|
|||||||
For information on the <filename>-k</filename> option use the
|
For information on the <filename>-k</filename> option use the
|
||||||
<filename>bitbake --help</filename> command or see the
|
<filename>bitbake --help</filename> command or see the
|
||||||
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>" section in
|
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>" section in
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;'>The Yocto Project Reference Manual</ulink>.
|
The Yocto Project Reference Manual.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ bitbake -k core-image-sato
|
$ bitbake -k core-image-sato
|
||||||
</literallayout>
|
</literallayout>
|
||||||
<note><para>
|
<note><para>
|
||||||
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
|
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
|
||||||
see the FAQ appendix in
|
see the
|
||||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink> in The Yocto Project Reference
|
||||||
The Yocto Project Reference Manual</ulink>.
|
Manual.
|
||||||
</para></note>
|
</para></note>
|
||||||
The final command runs the image:
|
The final command runs the image:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
@@ -549,9 +578,8 @@
|
|||||||
<para>
|
<para>
|
||||||
For more information on how to install tarballs, see the
|
For more information on how to install tarballs, see the
|
||||||
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
|
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
|
||||||
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in
|
"<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in The Yocto Project Application Development Toolkit (ADT)
|
||||||
<ulink url='&YOCTO_DOCS_ADT_URL;'>The Yocto Project
|
User's Guide.
|
||||||
Application Development Toolkit (ADT) User's Guide</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -582,8 +610,7 @@
|
|||||||
<para>
|
<para>
|
||||||
You can learn more about downloading a Yocto Project kernel in the
|
You can learn more about downloading a Yocto Project kernel in the
|
||||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>" section of
|
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>" section of
|
||||||
<ulink url='&YOCTO_DOCS_DEV_URL;'>The
|
The Yocto Project Development Manual.
|
||||||
Yocto Project Development Manual</ulink>.
|
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -603,7 +630,7 @@
|
|||||||
You must use the <filename>ext3</filename> form when booting an image using the
|
You must use the <filename>ext3</filename> form when booting an image using the
|
||||||
QEMU emulator.
|
QEMU emulator.
|
||||||
The <filename>tar</filename> form can be flattened out in your host development system
|
The <filename>tar</filename> form can be flattened out in your host development system
|
||||||
and used for Yocto Project build purposes.
|
and used for build purposes with the Yocto Project.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.ext3
|
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.ext3
|
||||||
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.tar.bz2
|
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.tar.bz2
|
||||||
@@ -657,11 +684,13 @@
|
|||||||
<para>
|
<para>
|
||||||
Continuing with the example, the following two commands setup the emulation
|
Continuing with the example, the following two commands setup the emulation
|
||||||
environment and launch QEMU.
|
environment and launch QEMU.
|
||||||
This example assumes the root filesystem tarball has been downloaded and expanded, and
|
This example assumes the root filesystem (<filename>.ext3</filename> file) and
|
||||||
that the kernel and filesystem are for a 32-bit target architecture.
|
the pre-built kernel image file both reside in your home directory.
|
||||||
|
The kernel and filesystem are for a 32-bit target architecture.
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ source &YOCTO_ADTPATH_DIR;/environment-setup-i686-poky-linux
|
$ cd $HOME
|
||||||
$ runqemu qemux86 bzImage-qemux86-&DISTRO;.bin \
|
$ source &YOCTO_ADTPATH_DIR;/environment-setup-i586-poky-linux
|
||||||
|
$ runqemu qemux86 bzImage-qemux86.bin \
|
||||||
core-image-sato-qemux86.ext3
|
core-image-sato-qemux86.ext3
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
@@ -710,7 +739,7 @@
|
|||||||
<listitem><para><emphasis>Tarball:</emphasis>
|
<listitem><para><emphasis>Tarball:</emphasis>
|
||||||
Use if you want the latest stable release:
|
Use if you want the latest stable release:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
$ wget &YOCTO_RELEASE_DL_URL;.&YOCTO_POKY_TARBALL;
|
$ wget &YOCTO_RELEASE_DL_URL;/&YOCTO_POKY_TARBALL;
|
||||||
$ tar xvjf &YOCTO_POKY_TARBALL;
|
$ tar xvjf &YOCTO_POKY_TARBALL;
|
||||||
</literallayout></para></listitem>
|
</literallayout></para></listitem>
|
||||||
<listitem><para><emphasis>Git Repository:</emphasis>
|
<listitem><para><emphasis>Git Repository:</emphasis>
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
#
|
|
||||||
# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
|
|
||||||
# an incompatible way. Such changes should usually be detailed in the commit
|
|
||||||
# that breaks the format and have been previously discussed on the mailing list
|
|
||||||
# with general agreement from the core team.
|
|
||||||
#
|
|
||||||
OELAYOUT_ABI = "8"
|
|
||||||
@@ -37,7 +37,7 @@ DISTRO = "poky-tiny"
|
|||||||
# Distro config is evaluated after the machine config, so we have to explicitly
|
# Distro config is evaluated after the machine config, so we have to explicitly
|
||||||
# set the kernel provider to override a machine config.
|
# set the kernel provider to override a machine config.
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
|
||||||
PREFERRED_VERSION_linux-yocto-tiny = "3.0%"
|
PREFERRED_VERSION_linux-yocto-tiny = "3.2%"
|
||||||
|
|
||||||
# We can use task-core-boot, but in the future we may need a new task-core-tiny
|
# We can use task-core-boot, but in the future we may need a new task-core-tiny
|
||||||
#POKY_DEFAULT_EXTRA_RDEPENDS += "task-core-boot"
|
#POKY_DEFAULT_EXTRA_RDEPENDS += "task-core-boot"
|
||||||
@@ -63,6 +63,7 @@ ASSUME_PROVIDED += "pkgconfig$"
|
|||||||
# Reconfigure eglibc for a smaller installation
|
# Reconfigure eglibc for a smaller installation
|
||||||
# Comment out any of the lines below to disable them in the build
|
# Comment out any of the lines below to disable them in the build
|
||||||
DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
|
DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
|
||||||
|
|
||||||
# Required for "who"
|
# Required for "who"
|
||||||
DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
|
DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
|
||||||
DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
|
DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
|
||||||
@@ -113,3 +114,8 @@ IMAGE_FSTYPES = "ext2 cpio.gz"
|
|||||||
# variants of all compatible machines, but that leads to a lot
|
# variants of all compatible machines, but that leads to a lot
|
||||||
# more machine configs to maintain long term.
|
# more machine configs to maintain long term.
|
||||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
|
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
|
||||||
|
|
||||||
|
# The mtrace script included by eglibc is a perl script. This means the system
|
||||||
|
# will build perl in case this package is installed. Since we don't care about
|
||||||
|
# this script for the purposes of tiny, remove the dependency from here.
|
||||||
|
RDEPENDS_${PN}-mtrace_pn-eglibc = ""
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
DISTRO = "poky"
|
DISTRO = "poky"
|
||||||
DISTRO_NAME = "Yocto (Built by Poky 6.0)"
|
DISTRO_NAME = "Yocto (Built by Poky 7.0.2)"
|
||||||
DISTRO_VERSION = "1.1+snapshot-${DATE}"
|
DISTRO_VERSION = "1.2.2"
|
||||||
SDK_VENDOR = "-pokysdk"
|
SDK_VENDOR = "-pokysdk"
|
||||||
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
|
SDK_VERSION := "${DISTRO_VERSION}"
|
||||||
|
|
||||||
MAINTAINER = "Poky <poky@yoctoproject.org>"
|
MAINTAINER = "Poky <poky@yoctoproject.org>"
|
||||||
|
|
||||||
@@ -65,5 +65,33 @@ CONNECTIVITY_CHECK_URIS ?= "git://git.yoctoproject.org/yocto-firewall-test;proto
|
|||||||
https://eula-downloads.yoctoproject.org/index.php \
|
https://eula-downloads.yoctoproject.org/index.php \
|
||||||
http://bugzilla.yoctoproject.org/report.cgi"
|
http://bugzilla.yoctoproject.org/report.cgi"
|
||||||
|
|
||||||
|
SANITY_TESTED_DISTROS ?= " \
|
||||||
|
Yocto (Built by Poky 7.0) 1.2 \n \
|
||||||
|
Yocto (Built by Poky 7.0.1) 1.2.1 \n \
|
||||||
|
Yocto (Built by Poky 7.0.2) 1.2.2 \n \
|
||||||
|
Ubuntu 10.04.4 LTS \n \
|
||||||
|
Ubuntu 11.10 \n \
|
||||||
|
Ubuntu 12.04 LTS \n \
|
||||||
|
Ubuntu 12.04.1 LTS \n \
|
||||||
|
Fedora release 13 (Goddard) \n \
|
||||||
|
Fedora release 15 (Lovelock) \n \
|
||||||
|
Fedora release 16 (Verne) \n \
|
||||||
|
Fedora release 17 (Beefy Miracle) \n \
|
||||||
|
CentOS release 5.6 (Final) \n \
|
||||||
|
CentOS release 5.7 (Final) \n \
|
||||||
|
CentOS release 5.8 (Final) \n \
|
||||||
|
CentOS release 6.2 (Final) \n \
|
||||||
|
Debian GNU/Linux 6.0.4 (squeeze) \n \
|
||||||
|
openSUSE 11.4 \n \
|
||||||
|
openSUSE 12.1 \n \
|
||||||
|
"
|
||||||
|
|
||||||
# Default hash policy for distro
|
# Default hash policy for distro
|
||||||
BB_SIGNATURE_HANDLER ?= 'OEBasicHash'
|
BB_SIGNATURE_HANDLER ?= 'OEBasicHash'
|
||||||
|
#
|
||||||
|
# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
|
||||||
|
# an incompatible way. Such changes should usually be detailed in the commit
|
||||||
|
# that breaks the format and have been previously discussed on the mailing list
|
||||||
|
# with general agreement from the core team.
|
||||||
|
#
|
||||||
|
OELAYOUT_ABI = "8"
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
include conf/machine/include/tune-atom.inc
|
include conf/machine/include/tune-atom.inc
|
||||||
|
|
||||||
MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 x86 wifi \
|
MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 x86 wifi acpi alsa"
|
||||||
acpi alsa"
|
|
||||||
|
|
||||||
KERNEL_IMAGETYPE = "bzImage"
|
KERNEL_IMAGETYPE = "bzImage"
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
#@NAME: Beagleboard machine
|
#@NAME: Beagleboard machine
|
||||||
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board
|
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg-lite"
|
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg-lite"
|
||||||
XSERVER = "xserver-xorg-lite \
|
XSERVER ?= "xserver-xorg-lite \
|
||||||
xf86-input-evdev \
|
xf86-input-evdev \
|
||||||
xf86-input-mouse \
|
xf86-input-mouse \
|
||||||
xf86-video-omapfb \
|
xf86-video-omapfb \
|
||||||
@@ -37,4 +37,4 @@ UBOOT_MACHINE = "omap3_beagle_config"
|
|||||||
UBOOT_ENTRYPOINT = "0x80008000"
|
UBOOT_ENTRYPOINT = "0x80008000"
|
||||||
UBOOT_LOADADDRESS = "0x80008000"
|
UBOOT_LOADADDRESS = "0x80008000"
|
||||||
|
|
||||||
MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat alsa"
|
MACHINE_FEATURES = "apm usbgadget usbhost vfat alsa"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ KERNEL_IMAGETYPE = "uImage"
|
|||||||
|
|
||||||
SERIAL_CONSOLE = "115200 ttyS0"
|
SERIAL_CONSOLE = "115200 ttyS0"
|
||||||
|
|
||||||
MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial"
|
MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
|
||||||
|
|
||||||
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
require conf/machine/include/tune-mips32.inc
|
require conf/machine/include/tune-mips32.inc
|
||||||
|
|
||||||
MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 \
|
MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"
|
||||||
serial"
|
|
||||||
|
|
||||||
KERNEL_IMAGETYPE = "vmlinux"
|
KERNEL_IMAGETYPE = "vmlinux"
|
||||||
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
|
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb"
|
|||||||
KMACHINE_beagleboard = "yocto/standard/beagleboard"
|
KMACHINE_beagleboard = "yocto/standard/beagleboard"
|
||||||
|
|
||||||
|
|
||||||
SRCREV_machine_atom-pc ?= "b42d0d016af36d0bbbb619c424200d4b5bc9ba28"
|
SRCREV_machine_atom-pc ?= "afdda882f902dd28693cd8701a7d497958290f09"
|
||||||
SRCREV_machine_routerstationpro ?= "f1bc894b09bd9b048df99e53fd6559c5d84e4871"
|
SRCREV_machine_routerstationpro ?= "982522e3901fad56bb908565b22c498025ab536c"
|
||||||
SRCREV_machine_mpc8315e-rdb ?= "7ba6d6853b6e7cf00a742baeba1503c80fc05314"
|
SRCREV_machine_mpc8315e-rdb ?= "83f422f718cf15633cb4c2d309aa041c3c354f65"
|
||||||
SRCREV_machine_beagleboard ?= "fccd4e4041454f16f1e7a25569ec530eaa1bf89e"
|
SRCREV_machine_beagleboard ?= "8fd5a8eb4067c7032389e82d54f0e54e1e27f78c"
|
||||||
|
|
||||||
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
|
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
|
||||||
COMPATIBLE_MACHINE_routerstationpro = "routerstationpro"
|
COMPATIBLE_MACHINE_routerstationpro = "routerstationpro"
|
||||||
|
|||||||
14
meta/classes/archive-patched-source.bbclass
Normal file
14
meta/classes/archive-patched-source.bbclass
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# This file is for getting archiving packages with patched sources(archive 's' before do_patch stage),logs(archive 'temp' after package_write_rpm),dump data and
|
||||||
|
# creating diff file(get all environment variables and functions in building and mapping all content in 's' including patches to xxx.diff.gz.
|
||||||
|
# All archived packages will be deployed in ${DEPLOY_DIR}/sources
|
||||||
|
|
||||||
|
inherit archiver
|
||||||
|
|
||||||
|
# Get archiving package with patched sources including patches
|
||||||
|
do_patch[postfuncs] += "do_archive_patched_sources "
|
||||||
|
|
||||||
|
# Get archiving package with logs(temp) and scripts(.bb and .inc files)
|
||||||
|
do_package_write_rpm[prefuncs] += "do_archive_scripts_logs "
|
||||||
|
|
||||||
|
# Get dump date and create diff file
|
||||||
|
do_package_write_rpm[postfuncs] += "do_dumpdata_create_diff_gz "
|
||||||
@@ -2,28 +2,11 @@
|
|||||||
# It also output building environment to xxx.dump.data and create xxx.diff.gz to record
|
# It also output building environment to xxx.dump.data and create xxx.diff.gz to record
|
||||||
# all content in ${S} to a diff file.
|
# all content in ${S} to a diff file.
|
||||||
|
|
||||||
EXCLUDE_FROM ?= ".pc autom4te.cache"
|
ARCHIVE_EXCLUDE_FROM ?= ".pc autom4te.cache"
|
||||||
ARCHIVE_TYPE ?= "TAR SRPM"
|
ARCHIVE_TYPE ?= "TAR SRPM"
|
||||||
DISTRO ?= "poky"
|
DISTRO ?= "poky"
|
||||||
PATCHES_ARCHIVE_WITH_SERIES = 'TRUE'
|
PATCHES_ARCHIVE_WITH_SERIES = 'TRUE'
|
||||||
|
|
||||||
def parse_var(d,var):
|
|
||||||
''' parse variable like ${PV} in "require xxx_${PV}.inc" to a real value. for example, change "require xxx_${PV}.inc" to "require xxx_1.2.inc" '''
|
|
||||||
import re
|
|
||||||
pat = re.compile('.*\$({(.*)}).*')
|
|
||||||
if '$' not in var and '/' not in var:
|
|
||||||
return var
|
|
||||||
else:
|
|
||||||
if '/' in var:
|
|
||||||
return [i for i in var.split('/') if i.endswith('.inc')][0]
|
|
||||||
elif '$' in var:
|
|
||||||
m = pat.match(var)
|
|
||||||
patstr = '\$' + m.group(1)
|
|
||||||
var_str = m.group(2)
|
|
||||||
return re.sub(patstr,d.getVar(var_str,True),var)
|
|
||||||
else:
|
|
||||||
return var
|
|
||||||
|
|
||||||
def get_bb_inc(d):
|
def get_bb_inc(d):
|
||||||
'''create a directory "script-logs" including .bb and .inc file in ${WORKDIR}'''
|
'''create a directory "script-logs" including .bb and .inc file in ${WORKDIR}'''
|
||||||
import re
|
import re
|
||||||
@@ -32,14 +15,18 @@ def get_bb_inc(d):
|
|||||||
|
|
||||||
bbinc = []
|
bbinc = []
|
||||||
pat=re.compile('require\s*([^\s]*\.*)(.*)')
|
pat=re.compile('require\s*([^\s]*\.*)(.*)')
|
||||||
file_dir = d.getVar('FILE', True)
|
|
||||||
bbdir = os.path.dirname(file_dir)
|
|
||||||
work_dir = d.getVar('WORKDIR', True)
|
work_dir = d.getVar('WORKDIR', True)
|
||||||
os.chdir(work_dir)
|
bbfile = d.getVar('FILE', True)
|
||||||
bb.mkdirhier("script-logs")
|
bbdir = os.path.dirname(bbfile)
|
||||||
os.chdir(bbdir)
|
script_logs = os.path.join(work_dir,'script-logs')
|
||||||
bbfile = os.path.basename(file_dir)
|
bb_inc = os.path.join(script_logs,'bb_inc')
|
||||||
bbinc.append(bbfile)
|
bb.mkdirhier(script_logs)
|
||||||
|
bb.mkdirhier(bb_inc)
|
||||||
|
|
||||||
|
def find_file(dir,file):
|
||||||
|
for root, dirs, files in os.walk(dir):
|
||||||
|
if file in files:
|
||||||
|
return os.path.join(root,file)
|
||||||
|
|
||||||
def get_inc (file):
|
def get_inc (file):
|
||||||
f = open(file,'r')
|
f = open(file,'r')
|
||||||
@@ -49,21 +36,26 @@ def get_bb_inc(d):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
incfile = pat.match(line).group(1)
|
incfile = pat.match(line).group(1)
|
||||||
incfile = parse_var(d,incfile)
|
incfile = bb.data.expand(os.path.basename(incfile),d)
|
||||||
bbinc.append(incfile)
|
abs_incfile = find_file(bbdir,incfile)
|
||||||
get_inc(incfile)
|
if abs_incfile:
|
||||||
except (IOError,AttributeError):
|
bbinc.append(abs_incfile)
|
||||||
|
get_inc(abs_incfile)
|
||||||
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
get_inc(bbfile)
|
get_inc(bbfile)
|
||||||
os.chdir(work_dir)
|
bbinc = list(set(bbinc))
|
||||||
for root, dirs, files in os.walk(bbdir):
|
for bbincfile in bbinc:
|
||||||
for file in bbinc:
|
shutil.copy(bbincfile,bb_inc)
|
||||||
if file in files:
|
|
||||||
shutil.copy(root + '/' + file,'script-logs')
|
|
||||||
oe.path.copytree('temp', 'script-logs')
|
|
||||||
return work_dir + '/script-logs'
|
|
||||||
|
|
||||||
def get_all_patches(d):
|
try:
|
||||||
|
bb.mkdirhier(os.path.join(script_logs,'temp'))
|
||||||
|
oe.path.copytree(os.path.join(work_dir,'temp'), os.path.join(script_logs,'temp'))
|
||||||
|
except (IOError,AttributeError):
|
||||||
|
pass
|
||||||
|
return script_logs
|
||||||
|
|
||||||
|
def get_series(d):
|
||||||
'''copy patches and series file to a pointed directory which will be archived to tarball in ${WORKDIR}'''
|
'''copy patches and series file to a pointed directory which will be archived to tarball in ${WORKDIR}'''
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
@@ -71,11 +63,11 @@ def get_all_patches(d):
|
|||||||
pf = d.getVar('PF', True)
|
pf = d.getVar('PF', True)
|
||||||
work_dir = d.getVar('WORKDIR', True)
|
work_dir = d.getVar('WORKDIR', True)
|
||||||
s = d.getVar('S',True)
|
s = d.getVar('S',True)
|
||||||
dest = os.path.join(work_dir, pf + '-patches')
|
dest = os.path.join(work_dir, pf + '-series')
|
||||||
shutil.rmtree(dest, ignore_errors=True)
|
shutil.rmtree(dest, ignore_errors=True)
|
||||||
bb.mkdirhier(dest)
|
bb.mkdirhier(dest)
|
||||||
|
|
||||||
src_uri = d.getVar('SRC_URI', 1).split()
|
src_uri = d.getVar('SRC_URI', True).split()
|
||||||
fetch = bb.fetch2.Fetch(src_uri, d)
|
fetch = bb.fetch2.Fetch(src_uri, d)
|
||||||
locals = (fetch.localpath(url) for url in fetch.urls)
|
locals = (fetch.localpath(url) for url in fetch.urls)
|
||||||
for local in locals:
|
for local in locals:
|
||||||
@@ -90,7 +82,8 @@ def get_all_patches(d):
|
|||||||
shutil.copy(patch,dest)
|
shutil.copy(patch,dest)
|
||||||
except IOError:
|
except IOError:
|
||||||
if os.path.isdir(patch):
|
if os.path.isdir(patch):
|
||||||
oe.path.copytree(patch,dest)
|
bb.mkdirhier(os.path.join(dest,patch))
|
||||||
|
oe.path.copytree(patch, os.path.join(dest,patch))
|
||||||
return dest
|
return dest
|
||||||
|
|
||||||
def get_applying_patches(d):
|
def get_applying_patches(d):
|
||||||
@@ -124,92 +117,86 @@ def not_tarball(d):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_source_from_downloads(d,middle_name):
|
def get_source_from_downloads(d,stage_name):
|
||||||
'''copy tarball of $P to $WORKDIR when this tarball exists in $DL_DIR'''
|
'''copy tarball of $P to $WORKDIR when this tarball exists in $DL_DIR'''
|
||||||
if middle_name in 'patched' 'configured':
|
if stage_name in 'patched' 'configured':
|
||||||
return
|
return
|
||||||
pf = d.getVar('PF', True)
|
pf = d.getVar('PF', True)
|
||||||
dl_dir = d.getVar('DL_DIR',True)
|
dl_dir = d.getVar('DL_DIR',True)
|
||||||
try:
|
try:
|
||||||
source = os.path.basename(d.getVar('SRC_URI', 1).split()[0])
|
source = os.path.join(dl_dir,os.path.basename(d.getVar('SRC_URI', True).split()[0]))
|
||||||
os.chdir(dl_dir)
|
|
||||||
if os.path.exists(source) and not os.path.isdir(source):
|
if os.path.exists(source) and not os.path.isdir(source):
|
||||||
return source
|
return source
|
||||||
except (IndexError, OSError):
|
except (IndexError, OSError):
|
||||||
pass
|
pass
|
||||||
|
return ''
|
||||||
def archive_sources_from_directory(d,middle_name):
|
|
||||||
'''archive sources codes tree to tarball when tarball of $P doesn't exist in $DL_DIR'''
|
def do_tarball(workdir,srcdir,tarname):
|
||||||
|
'''tar "srcdir" under "workdir" to "tarname"'''
|
||||||
import tarfile
|
import tarfile
|
||||||
|
|
||||||
|
sav_dir = os.getcwd()
|
||||||
|
os.chdir(workdir)
|
||||||
|
if (len(os.listdir(srcdir))) != 0:
|
||||||
|
tar = tarfile.open(tarname, "w:gz")
|
||||||
|
tar.add(srcdir)
|
||||||
|
tar.close()
|
||||||
|
else:
|
||||||
|
tarname = ''
|
||||||
|
os.chdir(sav_dir)
|
||||||
|
return tarname
|
||||||
|
|
||||||
|
def archive_sources_from_directory(d,stage_name):
|
||||||
|
'''archive sources codes tree to tarball when tarball of $P doesn't exist in $DL_DIR'''
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
s = d.getVar('S',True)
|
s = d.getVar('S',True)
|
||||||
workdir=d.getVar('WORKDIR', True)
|
work_dir=d.getVar('WORKDIR', True)
|
||||||
PF = d.getVar('PF',True)
|
PF = d.getVar('PF',True)
|
||||||
tarname = PF + '-' + middle_name + ".tar.gz"
|
tarname = PF + '-' + stage_name + ".tar.gz"
|
||||||
|
|
||||||
if os.path.exists(s) and s is not workdir:
|
if os.path.exists(s) and work_dir in s:
|
||||||
sourcedir = os.path.basename(s)
|
|
||||||
tarbase = os.path.dirname(s)
|
|
||||||
if not sourcedir or os.path.dirname(tarbase) == workdir:
|
|
||||||
sourcedir = os.path.basename(os.path.dirname(s))
|
|
||||||
tarbase = os.path.dirname(os.path.dirname(s))
|
|
||||||
os.chdir(tarbase)
|
|
||||||
else:
|
|
||||||
sourcedir = os.path.basename(s)
|
|
||||||
if not os.path.exists(sourcedir):
|
|
||||||
os.mkdir(sourcedir)
|
|
||||||
try:
|
try:
|
||||||
for file in os.listdir(s):
|
source_dir = os.path.join(work_dir,[ i for i in s.replace(work_dir,'').split('/') if i][0])
|
||||||
if file is not 'temp' and file is not sourcedir:
|
except IndexError:
|
||||||
shutil.copy(file,sourcedir)
|
if not cmp(s,work_dir):
|
||||||
except (IOError,OSError):
|
return ''
|
||||||
pass
|
|
||||||
|
|
||||||
if (len(os.listdir(sourcedir))) != 0:
|
|
||||||
tar = tarfile.open( tarname, "w:gz")
|
|
||||||
tar.add(sourcedir)
|
|
||||||
tar.close()
|
|
||||||
if cmp(workdir,os.path.dirname(s)) and not os.path.exists(workdir + '/' + tarname):
|
|
||||||
shutil.move(os.path.dirname(s) + '/' + tarname,workdir)
|
|
||||||
else:
|
else:
|
||||||
return
|
return ''
|
||||||
return tarname
|
source = os.path.basename(source_dir)
|
||||||
|
return do_tarball(work_dir,source,tarname)
|
||||||
|
|
||||||
def archive_sources(d,middle_name):
|
def archive_sources(d,stage_name):
|
||||||
'''copy tarball from $DL_DIR to $WORKDIR if have tarball, archive source codes tree in $WORKDIR if $P is directory instead of tarball'''
|
'''copy tarball from $DL_DIR to $WORKDIR if have tarball, archive source codes tree in $WORKDIR if $P is directory instead of tarball'''
|
||||||
import shutil
|
import shutil
|
||||||
work_dir = d.getVar('WORKDIR',True)
|
work_dir = d.getVar('WORKDIR',True)
|
||||||
file = get_source_from_downloads(d,middle_name)
|
file = get_source_from_downloads(d,stage_name)
|
||||||
if file:
|
if file:
|
||||||
shutil.copy(file,work_dir)
|
shutil.copy(file,work_dir)
|
||||||
|
file = os.path.basename(file)
|
||||||
else:
|
else:
|
||||||
file = archive_sources_from_directory(d,middle_name)
|
file = archive_sources_from_directory(d,stage_name)
|
||||||
return file
|
return file
|
||||||
|
|
||||||
|
|
||||||
def archive_patches(d,patchdir,series):
|
def archive_patches(d,patchdir,series):
|
||||||
'''archive patches to tarball and also include series files if 'series' is True'''
|
'''archive patches to tarball and also include series files if 'series' is True'''
|
||||||
import tarfile
|
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
s = d.getVar('S',True)
|
s = d.getVar('S',True)
|
||||||
work_dir = d.getVar('WORKDIR', True)
|
work_dir = d.getVar('WORKDIR', True)
|
||||||
os.chdir(work_dir)
|
|
||||||
patch_dir = os.path.basename(patchdir)
|
patch_dir = os.path.basename(patchdir)
|
||||||
tarname = patch_dir + ".tar.gz"
|
tarname = patch_dir + ".tar.gz"
|
||||||
if series == 'all' and os.path.exists(s + '/patches/series'):
|
if series == 'all' and os.path.exists(os.path.join(s,'patches/series')):
|
||||||
shutil.copy(s + '/patches/series',patch_dir)
|
shutil.copy(os.path.join(s,'patches/series'),patchdir)
|
||||||
tar = tarfile.open(tarname, "w:gz")
|
tarname = do_tarball(work_dir,patch_dir,tarname)
|
||||||
tar.add(patch_dir)
|
shutil.rmtree(patchdir, ignore_errors=True)
|
||||||
tar.close()
|
|
||||||
shutil.rmtree(patch_dir, ignore_errors=True)
|
|
||||||
return tarname
|
return tarname
|
||||||
|
|
||||||
def select_archive_patches(d,option):
|
def select_archive_patches(d,option):
|
||||||
'''select to archive all patches including non-applying and series or applying patches '''
|
'''select to archive all patches including non-applying and series or applying patches '''
|
||||||
if option == "all":
|
if option == "all":
|
||||||
patchdir = get_all_patches(d)
|
patchdir = get_series(d)
|
||||||
elif option == "applying":
|
elif option == "applying":
|
||||||
patchdir = get_applying_patches(d)
|
patchdir = get_applying_patches(d)
|
||||||
try:
|
try:
|
||||||
@@ -221,17 +208,15 @@ def select_archive_patches(d,option):
|
|||||||
|
|
||||||
def archive_logs(d,logdir,bbinc=False):
|
def archive_logs(d,logdir,bbinc=False):
|
||||||
'''archive logs in temp to tarball and .bb and .inc files if bbinc is True '''
|
'''archive logs in temp to tarball and .bb and .inc files if bbinc is True '''
|
||||||
import tarfile
|
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
log_dir = os.path.basename(logdir)
|
|
||||||
pf = d.getVar('PF',True)
|
pf = d.getVar('PF',True)
|
||||||
|
work_dir = d.getVar('WORKDIR',True)
|
||||||
|
log_dir = os.path.basename(logdir)
|
||||||
tarname = pf + '-' + log_dir + ".tar.gz"
|
tarname = pf + '-' + log_dir + ".tar.gz"
|
||||||
tar = tarfile.open(tarname, "w:gz")
|
tarname = do_tarball(work_dir,log_dir,tarname)
|
||||||
tar.add(log_dir)
|
|
||||||
tar.close()
|
|
||||||
if bbinc:
|
if bbinc:
|
||||||
shutil.rmtree(log_dir, ignore_errors=True)
|
shutil.rmtree(logdir, ignore_errors=True)
|
||||||
return tarname
|
return tarname
|
||||||
|
|
||||||
def get_licenses(d):
|
def get_licenses(d):
|
||||||
@@ -258,16 +243,17 @@ def move_tarball_deploy(d,tarball_list):
|
|||||||
target_sys = d.getVar('TARGET_SYS', True)
|
target_sys = d.getVar('TARGET_SYS', True)
|
||||||
pf = d.getVar('PF', True)
|
pf = d.getVar('PF', True)
|
||||||
licenses = get_licenses(d)
|
licenses = get_licenses(d)
|
||||||
|
work_dir = d.getVar('WORKDIR',True)
|
||||||
tar_sources = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
tar_sources = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
||||||
if not os.path.exists(tar_sources):
|
if not os.path.exists(tar_sources):
|
||||||
bb.mkdirhier(tar_sources)
|
bb.mkdirhier(tar_sources)
|
||||||
for source in tarball_list:
|
for source in tarball_list:
|
||||||
if source:
|
if source:
|
||||||
if os.path.exists(tar_sources + '/' + source):
|
if os.path.exists(os.path.join(tar_sources, source)):
|
||||||
os.remove(tar_sources + '/' + source)
|
os.remove(os.path.join(tar_sources,source))
|
||||||
shutil.move(source,tar_sources)
|
shutil.move(os.path.join(work_dir,source),tar_sources)
|
||||||
|
|
||||||
def verify_var(d):
|
def check_archiving_type(d):
|
||||||
'''check the type for archiving package('tar' or 'srpm')'''
|
'''check the type for archiving package('tar' or 'srpm')'''
|
||||||
try:
|
try:
|
||||||
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() not in d.getVar('ARCHIVE_TYPE', True).split():
|
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() not in d.getVar('ARCHIVE_TYPE', True).split():
|
||||||
@@ -278,7 +264,7 @@ def verify_var(d):
|
|||||||
def store_package(d,package_name):
|
def store_package(d,package_name):
|
||||||
'''store tarbablls name to file "tar-package"'''
|
'''store tarbablls name to file "tar-package"'''
|
||||||
try:
|
try:
|
||||||
f = open(d.getVar('WORKDIR',True )+ '/tar-package','a')
|
f = open(os.path.join(d.getVar('WORKDIR',True),'tar-package'),'a')
|
||||||
f.write(package_name + ' ')
|
f.write(package_name + ' ')
|
||||||
f.close()
|
f.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
@@ -286,25 +272,27 @@ def store_package(d,package_name):
|
|||||||
|
|
||||||
def get_package(d):
|
def get_package(d):
|
||||||
'''get tarballs name from "tar-package"'''
|
'''get tarballs name from "tar-package"'''
|
||||||
|
work_dir = (d.getVar('WORKDIR', True))
|
||||||
|
tarpackage = os.path.join(work_dir,'tar-package')
|
||||||
try:
|
try:
|
||||||
os.chdir(d.getVar('WORKDIR', True))
|
f = open(tarpackage,'r')
|
||||||
f = open('tar-package','r')
|
|
||||||
line = list(set(f.readline().replace('\n','').split()))
|
line = list(set(f.readline().replace('\n','').split()))
|
||||||
f.close()
|
|
||||||
return line
|
|
||||||
except IOError:
|
except IOError:
|
||||||
pass
|
pass
|
||||||
|
f.close()
|
||||||
|
return line
|
||||||
|
|
||||||
|
|
||||||
def archive_sources_patches(d,middle_name):
|
def archive_sources_patches(d,stage_name):
|
||||||
'''archive sources and patches to tarball. middle_name will append strings ${middle_name} to ${PR} as middle name. for example, zlib-1.4.6-prepatch(middle_name).tar.gz '''
|
'''archive sources and patches to tarball. stage_name will append strings ${stage_name} to ${PR} as middle name. for example, zlib-1.4.6-prepatch(stage_name).tar.gz '''
|
||||||
import shutil
|
import shutil
|
||||||
verify_var(d)
|
|
||||||
|
check_archiving_type(d)
|
||||||
if not_tarball(d):
|
if not_tarball(d):
|
||||||
return
|
return
|
||||||
|
|
||||||
source_tar_name = archive_sources(d,middle_name)
|
source_tar_name = archive_sources(d,stage_name)
|
||||||
if middle_name == "prepatch":
|
if stage_name == "prepatch":
|
||||||
if d.getVar('PATCHES_ARCHIVE_WITH_SERIES',True).upper() == 'TRUE':
|
if d.getVar('PATCHES_ARCHIVE_WITH_SERIES',True).upper() == 'TRUE':
|
||||||
patch_tar_name = select_archive_patches(d,"all")
|
patch_tar_name = select_archive_patches(d,"all")
|
||||||
elif d.getVar('PATCHES_ARCHIVE_WITH_SERIES',True).upper() == 'FALSE':
|
elif d.getVar('PATCHES_ARCHIVE_WITH_SERIES',True).upper() == 'FALSE':
|
||||||
@@ -313,14 +301,14 @@ def archive_sources_patches(d,middle_name):
|
|||||||
bb.fatal("Please define 'PATCHES_ARCHIVE_WITH_SERIES' is strings 'True' or 'False' ")
|
bb.fatal("Please define 'PATCHES_ARCHIVE_WITH_SERIES' is strings 'True' or 'False' ")
|
||||||
else:
|
else:
|
||||||
patch_tar_name = ''
|
patch_tar_name = ''
|
||||||
|
|
||||||
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() not in 'SRPM':
|
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() not in 'SRPM':
|
||||||
move_tarball_deploy(d,[source_tar_name,patch_tar_name])
|
move_tarball_deploy(d,[source_tar_name,patch_tar_name])
|
||||||
else:
|
else:
|
||||||
tarpackage = d.getVar('WORKDIR', True) + '/tar-package'
|
tarpackage = os.path.join(d.getVar('WORKDIR', True),'tar-package')
|
||||||
if os.path.exists(tarpackage):
|
if os.path.exists(tarpackage):
|
||||||
os.remove(tarpackage)
|
os.remove(tarpackage)
|
||||||
for package in source_tar_name, patch_tar_name:
|
for package in os.path.basename(source_tar_name), patch_tar_name:
|
||||||
if package:
|
if package:
|
||||||
store_package(d,str(package) + ' ')
|
store_package(d,str(package) + ' ')
|
||||||
|
|
||||||
@@ -328,14 +316,14 @@ def archive_scripts_logs(d):
|
|||||||
'''archive scripts and logs. scripts include .bb and .inc files and logs include stuff in "temp".'''
|
'''archive scripts and logs. scripts include .bb and .inc files and logs include stuff in "temp".'''
|
||||||
|
|
||||||
work_dir = d.getVar('WORKDIR', True)
|
work_dir = d.getVar('WORKDIR', True)
|
||||||
os.chdir(work_dir)
|
temp_dir = os.path.join(work_dir,'temp')
|
||||||
source_archive_log_with_scripts = d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True)
|
source_archive_log_with_scripts = d.getVar('SOURCE_ARCHIVE_LOG_WITH_SCRIPTS', True)
|
||||||
if source_archive_log_with_scripts == 'logs_with_scripts':
|
if source_archive_log_with_scripts == 'logs_with_scripts':
|
||||||
logdir = get_bb_inc(d)
|
logdir = get_bb_inc(d)
|
||||||
tarlog = archive_logs(d,logdir,True)
|
tarlog = archive_logs(d,logdir,True)
|
||||||
elif source_archive_log_with_scripts == 'logs':
|
elif source_archive_log_with_scripts == 'logs':
|
||||||
if os.path.exists('temp'):
|
if os.path.exists(temp_dir):
|
||||||
tarlog = archive_logs(d,'temp',False)
|
tarlog = archive_logs(d,temp_dir,False)
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -374,14 +362,14 @@ def create_diff_gz(d):
|
|||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
work_dir = d.getVar('WORKDIR', True)
|
work_dir = d.getVar('WORKDIR', True)
|
||||||
exclude_from = d.getVar('EXCLUDE_FROM', True).split()
|
exclude_from = d.getVar('ARCHIVE_EXCLUDE_FROM', True).split()
|
||||||
pf = d.getVar('PF', True)
|
pf = d.getVar('PF', True)
|
||||||
licenses = get_licenses(d)
|
licenses = get_licenses(d)
|
||||||
target_sys = d.getVar('TARGET_SYS', True)
|
target_sys = d.getVar('TARGET_SYS', True)
|
||||||
diff_dir = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
diff_dir = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
||||||
diff_file = os.path.join(diff_dir, bb.data.expand("${P}-${PR}.diff.gz",d))
|
diff_file = os.path.join(diff_dir, bb.data.expand("${P}-${PR}.diff.gz",d))
|
||||||
os.chdir(work_dir)
|
|
||||||
f = open('temp/exclude-from-file', 'a')
|
f = open(os.path.join(work_dir,'temp/exclude-from-file'), 'a')
|
||||||
for i in exclude_from:
|
for i in exclude_from:
|
||||||
f.write(i)
|
f.write(i)
|
||||||
f.write("\n")
|
f.write("\n")
|
||||||
@@ -394,7 +382,10 @@ def create_diff_gz(d):
|
|||||||
bb.mkdirhier(dest)
|
bb.mkdirhier(dest)
|
||||||
for i in os.listdir(os.getcwd()):
|
for i in os.listdir(os.getcwd()):
|
||||||
if os.path.isfile(i):
|
if os.path.isfile(i):
|
||||||
shutil.copy(i, dest)
|
try:
|
||||||
|
shutil.copy(i, dest)
|
||||||
|
except IOError:
|
||||||
|
os.system('fakeroot cp -rf ' + i + " " + dest )
|
||||||
|
|
||||||
bb.note("Creating .diff.gz in ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz")
|
bb.note("Creating .diff.gz in ${DEPLOY_DIR_SRC}/${P}-${PR}.diff.gz")
|
||||||
cmd = "LC_ALL=C TZ=UTC0 diff --exclude-from=" + work_dir + "/temp/exclude-from-file -Naur " + s + '.org' + ' ' + s + " | gzip -c > " + diff_file
|
cmd = "LC_ALL=C TZ=UTC0 diff --exclude-from=" + work_dir + "/temp/exclude-from-file -Naur " + s + '.org' + ' ' + s + " | gzip -c > " + diff_file
|
||||||
@@ -445,12 +436,11 @@ do_kernel_checkout[postfuncs] += "do_archive_linux_yocto "
|
|||||||
python do_remove_tarball(){
|
python do_remove_tarball(){
|
||||||
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
|
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
|
||||||
work_dir = d.getVar('WORKDIR', True)
|
work_dir = d.getVar('WORKDIR', True)
|
||||||
os.chdir(work_dir)
|
|
||||||
try:
|
try:
|
||||||
for file in os.listdir(os.getcwd()):
|
for file in os.listdir(os.getcwd()):
|
||||||
if file in get_package(d):
|
if file in get_package(d):
|
||||||
os.remove(file)
|
os.remove(file)
|
||||||
os.remove('tar-package')
|
os.remove(os.path.join(work_dir,'tar-package'))
|
||||||
except (TypeError,OSError):
|
except (TypeError,OSError):
|
||||||
pass
|
pass
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ def autotools_dep_prepend(d):
|
|||||||
if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"):
|
if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"):
|
||||||
deps += 'libtool-native '
|
deps += 'libtool-native '
|
||||||
if not bb.data.inherits_class('native', d) \
|
if not bb.data.inherits_class('native', d) \
|
||||||
|
and not bb.data.inherits_class('nativesdk', d) \
|
||||||
and not bb.data.inherits_class('cross', d) \
|
and not bb.data.inherits_class('cross', d) \
|
||||||
and not d.getVar('INHIBIT_DEFAULT_DEPS', True):
|
and not d.getVar('INHIBIT_DEFAULT_DEPS', True):
|
||||||
deps += 'libtool-cross '
|
deps += 'libtool-cross '
|
||||||
@@ -81,6 +82,27 @@ oe_runconf () {
|
|||||||
|
|
||||||
AUTOTOOLS_AUXDIR ?= "${S}"
|
AUTOTOOLS_AUXDIR ?= "${S}"
|
||||||
|
|
||||||
|
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
|
||||||
|
|
||||||
|
autotools_preconfigure() {
|
||||||
|
if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
|
||||||
|
if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
|
||||||
|
echo "Previously configured separate build directory detected, cleaning ${B}"
|
||||||
|
rm -rf ${B}
|
||||||
|
mkdir ${B}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
autotools_postconfigure(){
|
||||||
|
if [ -n "${CONFIGURESTAMPFILE}" ]; then
|
||||||
|
echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
do_configure[prefuncs] += "autotools_preconfigure"
|
||||||
|
do_configure[postfuncs] += "autotools_postconfigure"
|
||||||
|
|
||||||
autotools_do_configure() {
|
autotools_do_configure() {
|
||||||
case ${PN} in
|
case ${PN} in
|
||||||
autoconf*)
|
autoconf*)
|
||||||
|
|||||||
@@ -305,9 +305,32 @@ python () {
|
|||||||
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
|
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
|
||||||
if pkgconfigflags:
|
if pkgconfigflags:
|
||||||
pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
|
pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
|
||||||
|
pn = d.getVar("PN", True)
|
||||||
|
mlprefix = d.getVar("MLPREFIX", True)
|
||||||
|
|
||||||
|
def expandFilter(appends, extension, prefix):
|
||||||
|
appends = bb.utils.explode_deps(d.expand(" ".join(appends)))
|
||||||
|
newappends = []
|
||||||
|
for a in appends:
|
||||||
|
if a.endswith("-native") or a.endswith("-cross"):
|
||||||
|
newappends.append(a)
|
||||||
|
elif a.startswith("virtual/"):
|
||||||
|
subs = a.split("/", 1)[1]
|
||||||
|
newappends.append("virtual/" + prefix + subs + extension)
|
||||||
|
else:
|
||||||
|
newappends.append(prefix + a + extension)
|
||||||
|
return newappends
|
||||||
|
|
||||||
def appendVar(varname, appends):
|
def appendVar(varname, appends):
|
||||||
if not appends:
|
if not appends:
|
||||||
return
|
return
|
||||||
|
if varname.find("DEPENDS") != -1:
|
||||||
|
if pn.endswith("-nativesdk"):
|
||||||
|
appends = expandFilter(appends, "-nativesdk", "")
|
||||||
|
if pn.endswith("-native"):
|
||||||
|
appends = expandFilter(appends, "-native", "")
|
||||||
|
if mlprefix:
|
||||||
|
appends = expandFilter(appends, "", mlprefix)
|
||||||
varname = d.expand(varname)
|
varname = d.expand(varname)
|
||||||
d.appendVar(varname, " " + " ".join(appends))
|
d.appendVar(varname, " " + " ".join(appends))
|
||||||
|
|
||||||
@@ -324,11 +347,14 @@ python () {
|
|||||||
elif len(items) == 4:
|
elif len(items) == 4:
|
||||||
enable, disable, depend, rdepend = items
|
enable, disable, depend, rdepend = items
|
||||||
if flag in pkgconfig:
|
if flag in pkgconfig:
|
||||||
extradeps.append(depend)
|
if depend:
|
||||||
extrardeps.append(rdepend)
|
extradeps.append(depend)
|
||||||
extraconf.append(enable)
|
if rdepend:
|
||||||
else:
|
extrardeps.append(rdepend)
|
||||||
extraconf.append(disable)
|
if enable:
|
||||||
|
extraconf.append(enable)
|
||||||
|
elif disable:
|
||||||
|
extraconf.append(disable)
|
||||||
appendVar('DEPENDS', extradeps)
|
appendVar('DEPENDS', extradeps)
|
||||||
appendVar('RDEPENDS_${PN}', extrardeps)
|
appendVar('RDEPENDS_${PN}', extrardeps)
|
||||||
appendVar('EXTRA_OECONF', extraconf)
|
appendVar('EXTRA_OECONF', extraconf)
|
||||||
|
|||||||
@@ -40,16 +40,13 @@ AUTO_SYSLINUXCFG = "1"
|
|||||||
SYSLINUX_ROOT ?= "root=/dev/sda2"
|
SYSLINUX_ROOT ?= "root=/dev/sda2"
|
||||||
SYSLINUX_TIMEOUT ?= "10"
|
SYSLINUX_TIMEOUT ?= "10"
|
||||||
|
|
||||||
SYSLINUXCFG = "${HDDDIR}/syslinux.cfg"
|
|
||||||
SYSLINUXMENU = "${HDDDIR}/menu"
|
|
||||||
|
|
||||||
inherit syslinux
|
inherit syslinux
|
||||||
|
|
||||||
build_boot_dd() {
|
build_boot_dd() {
|
||||||
IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
|
IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
|
||||||
|
|
||||||
install -d ${HDDDIR}
|
install -d ${HDDDIR}
|
||||||
install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage ${HDDDIR}/vmlinuz
|
install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${HDDDIR}/vmlinuz
|
||||||
install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg
|
install -m 0644 ${S}/syslinux.cfg ${HDDDIR}/syslinux.cfg
|
||||||
install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
|
install -m 444 ${STAGING_LIBDIR}/syslinux/ldlinux.sys ${HDDDIR}/ldlinux.sys
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ populate() {
|
|||||||
install -d ${DEST}
|
install -d ${DEST}
|
||||||
|
|
||||||
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
|
# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
|
||||||
install -m 0644 ${STAGING_DIR_HOST}/kernel/bzImage ${DEST}/vmlinuz
|
install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz
|
||||||
|
|
||||||
if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
|
if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
|
||||||
install -m 0644 ${INITRD} ${DEST}/initrd
|
install -m 0644 ${INITRD} ${DEST}/initrd
|
||||||
|
|||||||
@@ -300,16 +300,16 @@ buildhistory_get_image_installed() {
|
|||||||
echo $pkgsize $pkg >> ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
|
echo $pkgsize $pkg >> ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
deps=`list_package_depends $pkg | sort | uniq`
|
deps=`list_package_depends $pkg`
|
||||||
for dep in $deps ; do
|
for dep in $deps ; do
|
||||||
echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
|
echo "$pkg OPP $dep;" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'
|
||||||
done
|
done
|
||||||
|
|
||||||
recs=`list_package_recommends $pkg | sort | uniq`
|
recs=`list_package_recommends $pkg`
|
||||||
for rec in $recs ; do
|
for rec in $recs ; do
|
||||||
echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g' >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
|
echo "$pkg OPP $rec [style=dotted];" | sed -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' | sed 's:OPP:->:g'
|
||||||
done
|
done
|
||||||
done
|
done | sort | uniq >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
|
||||||
echo "}" >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
|
echo "}" >> ${BUILDHISTORY_DIR_IMAGE}/depends.dot
|
||||||
|
|
||||||
cat ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.txt
|
cat ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.txt
|
||||||
@@ -401,10 +401,15 @@ buildhistory_commit() {
|
|||||||
if [ "$repostatus" != "" ] ; then
|
if [ "$repostatus" != "" ] ; then
|
||||||
git add ${BUILDHISTORY_DIR}/*
|
git add ${BUILDHISTORY_DIR}/*
|
||||||
HOSTNAME=`hostname 2>/dev/null || echo unknown`
|
HOSTNAME=`hostname 2>/dev/null || echo unknown`
|
||||||
git commit ${BUILDHISTORY_DIR}/ -m "Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
|
# porcelain output looks like "?? packages/foo/bar"
|
||||||
|
for entry in `echo "$repostatus" | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
|
||||||
|
git commit ${BUILDHISTORY_DIR}/$entry -m "$entry: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
|
||||||
|
done
|
||||||
if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
|
if [ "${BUILDHISTORY_PUSH_REPO}" != "" ] ; then
|
||||||
git push -q ${BUILDHISTORY_PUSH_REPO}
|
git push -q ${BUILDHISTORY_PUSH_REPO}
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
git commit ${BUILDHISTORY_DIR}/ --allow-empty -m "No changes: Build ${BUILDNAME} of ${DISTRO} ${DISTRO_VERSION} for machine ${MACHINE} on $HOSTNAME" --author "${BUILDHISTORY_COMMIT_AUTHOR}" > /dev/null
|
||||||
fi) || true
|
fi) || true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,23 @@ addtask configure after do_unpack do_patch before do_compile
|
|||||||
inherit terminal
|
inherit terminal
|
||||||
|
|
||||||
python do_menuconfig() {
|
python do_menuconfig() {
|
||||||
|
try:
|
||||||
|
mtime = os.path.getmtime(".config")
|
||||||
|
except OSError:
|
||||||
|
mtime = 0
|
||||||
|
|
||||||
oe_terminal("make menuconfig", '${PN} Configuration', d)
|
oe_terminal("make menuconfig", '${PN} Configuration', d)
|
||||||
|
|
||||||
|
# FIXME this check can be removed when the minimum bitbake version has been bumped
|
||||||
|
if hasattr(bb.build, 'write_taint'):
|
||||||
|
try:
|
||||||
|
newmtime = os.path.getmtime(".config")
|
||||||
|
except OSError:
|
||||||
|
newmtime = 0
|
||||||
|
|
||||||
|
if newmtime > mtime:
|
||||||
|
bb.note("Configuration changed, recompile will be forced")
|
||||||
|
bb.build.write_taint('do_compile', d)
|
||||||
}
|
}
|
||||||
do_menuconfig[nostamp] = "1"
|
do_menuconfig[nostamp] = "1"
|
||||||
addtask menuconfig after do_configure
|
addtask menuconfig after do_configure
|
||||||
|
|||||||
@@ -47,14 +47,14 @@ def copyleft_should_include(d):
|
|||||||
exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
|
exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
is_included, excluded = oe.license.is_included(d.getVar('LICENSE', True), include, exclude)
|
is_included, reason = oe.license.is_included(d.getVar('LICENSE', True), include, exclude)
|
||||||
except oe.license.LicenseError as exc:
|
except oe.license.LicenseError as exc:
|
||||||
bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
|
bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
|
||||||
else:
|
else:
|
||||||
if is_included:
|
if is_included:
|
||||||
return True, None
|
return True, 'recipe has included licenses: %s' % ', '.join(reason)
|
||||||
else:
|
else:
|
||||||
return False, 'recipe has excluded licenses: %s' % ', '.join(excluded)
|
return False, 'recipe has excluded licenses: %s' % ', '.join(reason)
|
||||||
|
|
||||||
python do_prepare_copyleft_sources () {
|
python do_prepare_copyleft_sources () {
|
||||||
"""Populate a tree of the recipe sources and emit patch series files"""
|
"""Populate a tree of the recipe sources and emit patch series files"""
|
||||||
@@ -67,7 +67,7 @@ python do_prepare_copyleft_sources () {
|
|||||||
bb.debug(1, 'copyleft: %s is excluded: %s' % (p, reason))
|
bb.debug(1, 'copyleft: %s is excluded: %s' % (p, reason))
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
bb.debug(1, 'copyleft: %s is included' % p)
|
bb.debug(1, 'copyleft: %s is included: %s' % (p, reason))
|
||||||
|
|
||||||
sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', True)
|
sources_dir = d.getVar('COPYLEFT_SOURCES_DIR', True)
|
||||||
src_uri = d.getVar('SRC_URI', True).split()
|
src_uri = d.getVar('SRC_URI', True).split()
|
||||||
|
|||||||
@@ -48,7 +48,9 @@ DPKG_ARCH = "${SDK_ARCH}"
|
|||||||
CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
|
CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
|
||||||
CFLAGS = "${BUILDSDK_CFLAGS}"
|
CFLAGS = "${BUILDSDK_CFLAGS}"
|
||||||
CXXFLAGS = "${BUILDSDK_CFLAGS}"
|
CXXFLAGS = "${BUILDSDK_CFLAGS}"
|
||||||
LDFLAGS = "${BUILDSDK_LDFLAGS}"
|
LDFLAGS = "${BUILDSDK_LDFLAGS} \
|
||||||
|
-Wl,-rpath-link,${STAGING_LIBDIR}/.. \
|
||||||
|
-Wl,-rpath,${libdir}/.. "
|
||||||
|
|
||||||
DEPENDS_GETTEXT = "gettext-native gettext-nativesdk"
|
DEPENDS_GETTEXT = "gettext-native gettext-nativesdk"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
inherit cross
|
inherit cross
|
||||||
|
|
||||||
PACKAGE_ARCH = "${SDK_ARCH}"
|
PACKAGE_ARCH = "${SDK_ARCH}"
|
||||||
|
python () {
|
||||||
|
# set TUNE_PKGARCH to SDK_ARCH
|
||||||
|
d.setVar('TUNE_PKGARCH', d.getVar('SDK_ARCH', True))
|
||||||
|
}
|
||||||
|
|
||||||
STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
|
STAGING_DIR_TARGET = "${STAGING_DIR}/${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
|
||||||
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
||||||
|
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ python do_checkpkg() {
|
|||||||
such as:
|
such as:
|
||||||
gnome-common-2.20.0.tar.gz (most common format)
|
gnome-common-2.20.0.tar.gz (most common format)
|
||||||
gtk+-2.90.1.tar.gz
|
gtk+-2.90.1.tar.gz
|
||||||
xf86-intput-synaptics-12.6.9.tar.gz
|
xf86-input-synaptics-12.6.9.tar.gz
|
||||||
dri2proto-2.3.tar.gz
|
dri2proto-2.3.tar.gz
|
||||||
blktool_4.orig.tar.gz
|
blktool_4.orig.tar.gz
|
||||||
libid3tag-0.15.1b.tar.gz
|
libid3tag-0.15.1b.tar.gz
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ distutils_do_install() {
|
|||||||
STAGING_LIBDIR=${STAGING_LIBDIR} \
|
STAGING_LIBDIR=${STAGING_LIBDIR} \
|
||||||
PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
|
PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
|
||||||
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
|
BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
|
||||||
${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_INSTALL_ARGS} || \
|
${STAGING_BINDIR_NATIVE}/python setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
|
||||||
bbfatal "python setup.py install execution failed."
|
bbfatal "python setup.py install execution failed."
|
||||||
|
|
||||||
for i in `find ${D} -name "*.py"` ; do \
|
for i in `find ${D} -name "*.py"` ; do \
|
||||||
|
|||||||
@@ -1,10 +1,18 @@
|
|||||||
DEPENDS += "gconf gconf-native"
|
DEPENDS += "gconf gconf-native"
|
||||||
|
|
||||||
# This is referenced by the gconf m4 macros and would default to the value hardcoded
|
# These are for when gconftool is used natively and the prefix isn't necessarily
|
||||||
# into gconf at compile time otherwise
|
# the sysroot. TODO: replicate the postinst logic for -native packages going
|
||||||
|
# into sysroot as they won't be running their own install-time schema
|
||||||
|
# registration (disabled below) nor the postinst script (as they don't happen).
|
||||||
export GCONF_SCHEMA_INSTALL_SOURCE = "xml:merged:${STAGING_DIR_NATIVE}${sysconfdir}/gconf/gconf.xml.defaults"
|
export GCONF_SCHEMA_INSTALL_SOURCE = "xml:merged:${STAGING_DIR_NATIVE}${sysconfdir}/gconf/gconf.xml.defaults"
|
||||||
export GCONF_BACKEND_DIR = "${STAGING_LIBDIR_NATIVE}/GConf/2"
|
export GCONF_BACKEND_DIR = "${STAGING_LIBDIR_NATIVE}/GConf/2"
|
||||||
|
|
||||||
|
# Disable install-time schema registration as we're a packaging system so this
|
||||||
|
# happens in the postinst script, not at install time. Set both the configure
|
||||||
|
# script option and the traditional envionment variable just to make sure.
|
||||||
|
EXTRA_OECONF += "--disable-schemas-install"
|
||||||
|
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL = "1"
|
||||||
|
|
||||||
gconf_postinst() {
|
gconf_postinst() {
|
||||||
if [ "x$D" != "x" ]; then
|
if [ "x$D" != "x" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
@@ -57,7 +65,7 @@ python populate_packages_append () {
|
|||||||
prerm += d.getVar('gconf_prerm', True)
|
prerm += d.getVar('gconf_prerm', True)
|
||||||
d.setVar('pkg_prerm_%s' % pkg, prerm)
|
d.setVar('pkg_prerm_%s' % pkg, prerm)
|
||||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||||
rdepends += " gconf"
|
rdepends += ' ' + d.getVar('MLPREFIX') + 'gconf'
|
||||||
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ def gettext_oeconf(d):
|
|||||||
return '--disable-nls'
|
return '--disable-nls'
|
||||||
return "--enable-nls"
|
return "--enable-nls"
|
||||||
|
|
||||||
DEPENDS_GETTEXT = "virtual/gettext gettext-native"
|
DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
|
||||||
|
|
||||||
BASEDEPENDS =+ "${@gettext_dependencies(d)}"
|
BASEDEPENDS =+ "${@gettext_dependencies(d)}"
|
||||||
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
|
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
|
|||||||
do_rootfs[nostamp] = "1"
|
do_rootfs[nostamp] = "1"
|
||||||
do_rootfs[dirs] = "${TOPDIR}"
|
do_rootfs[dirs] = "${TOPDIR}"
|
||||||
do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
|
do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
|
||||||
|
do_rootfs[cleandirs] += "${S}"
|
||||||
do_build[nostamp] = "1"
|
do_build[nostamp] = "1"
|
||||||
|
|
||||||
# Must call real_do_rootfs() from inside here, rather than as a separate
|
# Must call real_do_rootfs() from inside here, rather than as a separate
|
||||||
@@ -142,6 +143,12 @@ fakeroot do_rootfs () {
|
|||||||
# When use the rpm incremental image generation, don't remove the rootfs
|
# When use the rpm incremental image generation, don't remove the rootfs
|
||||||
if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then
|
if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then
|
||||||
rm -rf ${IMAGE_ROOTFS}
|
rm -rf ${IMAGE_ROOTFS}
|
||||||
|
elif [ -d ${T}/saved_rpmlib/var/lib/rpm ]; then
|
||||||
|
# Move the rpmlib back
|
||||||
|
if [ ! -d ${IMAGE_ROOTFS}/var/lib/rpm ]; then
|
||||||
|
mkdir -p ${IMAGE_ROOTFS}/var/lib/
|
||||||
|
mv ${T}/saved_rpmlib/var/lib/rpm ${IMAGE_ROOTFS}/var/lib/
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
rm -rf ${MULTILIB_TEMP_ROOTFS}
|
rm -rf ${MULTILIB_TEMP_ROOTFS}
|
||||||
mkdir -p ${IMAGE_ROOTFS}
|
mkdir -p ${IMAGE_ROOTFS}
|
||||||
|
|||||||
@@ -188,7 +188,12 @@ IMAGE_CMD_ubi () {
|
|||||||
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
|
IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
|
||||||
|
|
||||||
EXTRA_IMAGECMD = ""
|
EXTRA_IMAGECMD = ""
|
||||||
EXTRA_IMAGECMD_jffs2 ?= "--pad --little-endian --eraseblock=0x40000"
|
|
||||||
|
inherit siteinfo
|
||||||
|
JFFS2_ENDIANNESS ?= "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--little-endian', '--big-endian', d)}"
|
||||||
|
JFFS2_ERASEBLOCK ?= "0x40000"
|
||||||
|
EXTRA_IMAGECMD_jffs2 ?= "--pad ${JFFS2_ENDIANNESS} --eraseblock=${JFFS2_ERASEBLOCK} --no-cleanmarkers"
|
||||||
|
|
||||||
# Change these if you want default genext2fs behavior (i.e. create minimal inode number)
|
# Change these if you want default genext2fs behavior (i.e. create minimal inode number)
|
||||||
EXTRA_IMAGECMD_ext2 ?= "-i 8192"
|
EXTRA_IMAGECMD_ext2 ?= "-i 8192"
|
||||||
EXTRA_IMAGECMD_ext3 ?= "-i 8192"
|
EXTRA_IMAGECMD_ext3 ?= "-i 8192"
|
||||||
|
|||||||
@@ -328,6 +328,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
|
|||||||
target_os = d.getVar('TARGET_OS', True)
|
target_os = d.getVar('TARGET_OS', True)
|
||||||
target_arch = d.getVar('TARGET_ARCH', True)
|
target_arch = d.getVar('TARGET_ARCH', True)
|
||||||
provides = d.getVar('PROVIDES', d, True)
|
provides = d.getVar('PROVIDES', d, True)
|
||||||
|
bpn = d.getVar('BPN', True)
|
||||||
|
|
||||||
# FIXME: Cross package confuse this check, so just skip them
|
# FIXME: Cross package confuse this check, so just skip them
|
||||||
for s in ['cross', 'nativesdk', 'cross-canadian']:
|
for s in ['cross', 'nativesdk', 'cross-canadian']:
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ def find_sccs(d):
|
|||||||
sources_list=[]
|
sources_list=[]
|
||||||
for s in sources:
|
for s in sources:
|
||||||
base, ext = os.path.splitext(os.path.basename(s))
|
base, ext = os.path.splitext(os.path.basename(s))
|
||||||
if ext and ext in ('.scc'):
|
if ext and ext in ('.scc' '.cfg'):
|
||||||
|
sources_list.append(s)
|
||||||
|
elif base and base in 'defconfig':
|
||||||
sources_list.append(s)
|
sources_list.append(s)
|
||||||
|
|
||||||
return sources_list
|
return sources_list
|
||||||
@@ -73,72 +75,9 @@ do_patch() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
sccs="${@" ".join(find_sccs(d))}"
|
sccs="${@" ".join(find_sccs(d))}"
|
||||||
patches_and_dirs="${@" ".join(find_urls(d))}"
|
patches="${@" ".join(find_patches(d))}"
|
||||||
|
|
||||||
# This loops through all patches, and looks for directories that do
|
|
||||||
# not already have feature descriptions. If a directory doesn't have
|
|
||||||
# a feature description, we switch to the ${WORKDIR} variant of the
|
|
||||||
# feature (so we can write to it) and generate a feature for those
|
|
||||||
# patches. The generated feature will respect the patch order.
|
|
||||||
#
|
|
||||||
# By leaving source patch directories that already have .scc files
|
|
||||||
# as-is it means that a SRC_URI can only contain a .scc file, and all
|
|
||||||
# patches that the .scc references will be picked up, without having
|
|
||||||
# to be repeated on the SRC_URI line .. which is more intutive
|
|
||||||
set +e
|
set +e
|
||||||
patch_dirs=
|
|
||||||
for pp in ${patches_and_dirs}; do
|
|
||||||
p=`echo $pp | cut -f1 -d:`
|
|
||||||
wp=`echo $pp | cut -f2 -d:`
|
|
||||||
pdir=`dirname ${p}`
|
|
||||||
pname=`basename ${p}`
|
|
||||||
scc=`find ${pdir} -maxdepth 1 -name '*.scc'`
|
|
||||||
if [ -z "${scc}" ]; then
|
|
||||||
# there is no scc file. We need to switch to someplace that we know
|
|
||||||
# we can create content (the workdir)
|
|
||||||
workdir_subdir=`dirname ${wp}`
|
|
||||||
suggested_dir="${WORKDIR}/${workdir_subdir}"
|
|
||||||
echo ${gen_feature_dirs} | grep -q ${suggested_dir}
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
gen_feature_dirs="${gen_feature_dirs} ${suggested_dir}"
|
|
||||||
fi
|
|
||||||
# we call the file *.scc_tmp, so the test above will continue to find
|
|
||||||
# that patches from a common subdirectory don't have a scc file and
|
|
||||||
# they'll be placed in order, into this file. We'll rename it later.
|
|
||||||
gen_feature_name="gen_`echo ${workdir_subdir} | sed 's%/%%g'`_desc.scc_tmp"
|
|
||||||
echo "patch ${pname}" >> ${WORKDIR}/${workdir_subdir}/${gen_feature_name}
|
|
||||||
else
|
|
||||||
suggested_dir="${pdir}"
|
|
||||||
fi
|
|
||||||
echo ${patch_dirs} | grep -q ${suggested_dir}
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
patch_dirs="${patch_dirs} ${suggested_dir}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# look for any found scc files, and ensure they are added to the list
|
|
||||||
# of directories passsed to updateme
|
|
||||||
for s in ${sccs}; do
|
|
||||||
sdir=`dirname ${s}`
|
|
||||||
echo ${patch_dirs} | grep -q ${sdir}
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
patch_dirs="${patch_dirs} ${sdir}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# go through the patch directories and look for any scc feature files
|
|
||||||
# that were constructed above. If one is found, rename it to ".scc" so
|
|
||||||
# the kernel patching can see it.
|
|
||||||
for pdir in ${patch_dirs}; do
|
|
||||||
scc=`find ${pdir} -maxdepth 1 -name '*.scc_tmp'`
|
|
||||||
if [ -n "${scc}" ]; then
|
|
||||||
new_scc=`echo ${scc} | sed 's/_tmp//'`
|
|
||||||
mv -f ${scc} ${new_scc}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
patch_dirs="${patch_dirs} ${WORKDIR}"
|
|
||||||
|
|
||||||
# add any explicitly referenced features onto the end of the feature
|
# add any explicitly referenced features onto the end of the feature
|
||||||
# list that is passed to the kernel build scripts.
|
# list that is passed to the kernel build scripts.
|
||||||
if [ -n "${KERNEL_FEATURES}" ]; then
|
if [ -n "${KERNEL_FEATURES}" ]; then
|
||||||
@@ -146,9 +85,10 @@ do_patch() {
|
|||||||
addon_features="$addon_features --feature $feat"
|
addon_features="$addon_features --feature $feat"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# updates or generates the target description
|
# updates or generates the target description
|
||||||
updateme --branch ${kbranch} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
|
updateme --branch ${kbranch} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
|
||||||
${addon_features} ${ARCH} ${KMACHINE} ${patch_dirs}
|
${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR. Could not update ${kbranch}"
|
echo "ERROR. Could not update ${kbranch}"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -274,63 +214,108 @@ python do_kernel_configcheck() {
|
|||||||
bb.plain( "%s" % result )
|
bb.plain( "%s" % result )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ensure that the branches (BSP and meta) are on the locations specified by
|
||||||
# Ensure that the branches (BSP and meta) are on the locatios specified by
|
|
||||||
# their SRCREV values. If they are NOT on the right commits, the branches
|
# their SRCREV values. If they are NOT on the right commits, the branches
|
||||||
# are reset to the correct commit.
|
# are corrected to the proper commit.
|
||||||
do_validate_branches() {
|
do_validate_branches() {
|
||||||
cd ${S}
|
cd ${S}
|
||||||
|
export KMETA=${KMETA}
|
||||||
|
|
||||||
# nothing to do if bootstrapping
|
set +e
|
||||||
if [ -n "${YOCTO_KERNEL_EXTERNAL_BRANCH}" ]; then
|
# if SRCREV is AUTOREV it shows up as AUTOINC there's nothing to
|
||||||
return
|
# check and we can exit early
|
||||||
fi
|
|
||||||
|
|
||||||
# nothing to do if SRCREV is AUTOREV
|
|
||||||
if [ "${SRCREV_machine}" = "AUTOINC" ]; then
|
if [ "${SRCREV_machine}" = "AUTOINC" ]; then
|
||||||
# restore the branch for builds
|
|
||||||
git checkout -f ${KBRANCH}
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
branch_head=`git show-ref -s --heads ${KBRANCH}`
|
# If something other than the default branch was requested, it must
|
||||||
meta_head=`git show-ref -s --heads ${KMETA}`
|
# exist in the tree, and it's a hard error if it wasn't
|
||||||
target_branch_head="${SRCREV_machine}"
|
git show-ref --quiet --verify -- "refs/heads/${KBRANCH}"
|
||||||
target_meta_head="${SRCREV_meta}"
|
if [ $? -eq 1 ]; then
|
||||||
|
if [ -n "${KBRANCH_DEFAULT}" ] &&
|
||||||
|
[ "${KBRANCH}" != "${KBRANCH_DEFAULT}" ]; then
|
||||||
|
echo "ERROR: branch ${KBRANCH} was set for kernel compilation, "
|
||||||
|
echo " but it does not exist in the kernel repository."
|
||||||
|
echo " Check the value of KBRANCH and ensure that it describes"
|
||||||
|
echo " a valid banch in the source kernel repository"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
current=`git branch |grep \*|sed 's/^\* //'`
|
if [ -z "${SRCREV_machine}" ]; then
|
||||||
if [ -n "$target_branch_head" ] && [ "$branch_head" != "$target_branch_head" ]; then
|
target_branch_head="${SRCREV}"
|
||||||
if [ -n "${KERNEL_REVISION_CHECKING}" ]; then
|
else
|
||||||
ref=`git show ${target_meta_head} 2>&1 | head -n1 || true`
|
target_branch_head="${SRCREV_machine}"
|
||||||
if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
|
fi
|
||||||
echo "ERROR ${target_branch_head} is not a valid commit ID."
|
|
||||||
echo "The kernel source tree may be out of sync"
|
# $SRCREV could have also been AUTOINC, so check again
|
||||||
exit 1
|
if [ "${target_branch_head}" = "AUTOINC" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
containing_branches=`git branch --contains $target_branch_head | sed 's/^..//'`
|
||||||
|
if [ -z "$containing_branches" ]; then
|
||||||
|
echo "ERROR: SRCREV was set to \"$target_branch_head\", but no branches"
|
||||||
|
echo " contain this commit"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ref=`git show ${target_branch_head} 2>&1 | head -n1 || true`
|
||||||
|
if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
|
||||||
|
echo "ERROR ${target_branch_head} is not a valid commit ID."
|
||||||
|
echo "The kernel source tree may be out of sync"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# force the SRCREV in each branch that contains the specified
|
||||||
|
# SRCREV (if it isn't the current HEAD of that branch)
|
||||||
|
git checkout -q master
|
||||||
|
for b in $containing_branches; do
|
||||||
|
branch_head=`git show-ref -s --heads ${b}`
|
||||||
|
if [ "$branch_head" != "$target_branch_head" ]; then
|
||||||
|
echo "[INFO] Setting branch $b to ${target_branch_head}"
|
||||||
|
if [ "$b" == "master" ]; then
|
||||||
|
git reset --hard $target_branch_head > /dev/null
|
||||||
else
|
else
|
||||||
echo "Forcing branch $current to ${target_branch_head}"
|
git branch -D $b > /dev/null
|
||||||
git branch -m $current $current-orig
|
git branch $b $target_branch_head > /dev/null
|
||||||
git checkout -b $current ${target_branch_head}
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
## KMETA branch validation
|
||||||
|
meta_head=`git show-ref -s --heads ${KMETA}`
|
||||||
|
target_meta_head="${SRCREV_meta}"
|
||||||
|
git show-ref --quiet --verify -- "refs/heads/${KMETA}"
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${target_meta_head}" = "AUTOINC" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$meta_head" != "$target_meta_head" ]; then
|
||||||
|
ref=`git show ${target_meta_head} 2>&1 | head -n1 || true`
|
||||||
|
if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
|
||||||
|
echo "ERROR ${target_meta_head} is not a valid commit ID"
|
||||||
|
echo "The kernel source tree may be out of sync"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "[INFO] Setting branch ${KMETA} to ${target_meta_head}"
|
||||||
|
git branch -m ${KMETA} ${KMETA}-orig
|
||||||
|
git checkout -q -b ${KMETA} ${target_meta_head}
|
||||||
|
if [ $? -ne 0 ];then
|
||||||
|
echo "ERROR: could not checkout ${KMETA} branch from known hash ${target_meta_head}"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$meta_head" != "$target_meta_head" ]; then
|
git show-ref --quiet --verify -- "refs/heads/${KBRANCH}"
|
||||||
if [ -n "${KERNEL_REVISION_CHECKING}" ]; then
|
if [ $? -eq 0 ]; then
|
||||||
ref=`git show ${target_meta_head} 2>&1 | head -n1 || true`
|
# restore the branch for builds
|
||||||
if [ "$ref" = "fatal: bad object ${target_meta_head}" ]; then
|
git checkout -q -f ${KBRANCH}
|
||||||
echo "ERROR ${target_meta_head} is not a valid commit ID"
|
|
||||||
echo "The kernel source tree may be out of sync"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Forcing branch meta to ${target_meta_head}"
|
|
||||||
git branch -m ${KMETA} ${KMETA}-orig
|
|
||||||
git checkout -b ${KMETA} ${target_meta_head}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# restore the branch for builds
|
|
||||||
git checkout -f ${KBRANCH}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Many scripts want to look in arch/$arch/boot for the bootable
|
# Many scripts want to look in arch/$arch/boot for the bootable
|
||||||
|
|||||||
@@ -77,6 +77,10 @@ EXTRA_OEMAKE = ""
|
|||||||
|
|
||||||
KERNEL_ALT_IMAGETYPE ??= ""
|
KERNEL_ALT_IMAGETYPE ??= ""
|
||||||
|
|
||||||
|
# Define where the kernel headers are installed on the target as well as where
|
||||||
|
# they are staged.
|
||||||
|
KERNEL_SRC_PATH = "/usr/src/kernel"
|
||||||
|
|
||||||
KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
|
KERNEL_IMAGETYPE_FOR_MAKE = "${@(lambda s: s[:-3] if s[-3:] == ".gz" else s)(d.getVar('KERNEL_IMAGETYPE', True))}"
|
||||||
|
|
||||||
kernel_do_compile() {
|
kernel_do_compile() {
|
||||||
@@ -130,7 +134,7 @@ kernel_do_install() {
|
|||||||
# Support for external module building - create a minimal copy of the
|
# Support for external module building - create a minimal copy of the
|
||||||
# kernel source tree.
|
# kernel source tree.
|
||||||
#
|
#
|
||||||
kerneldir=${D}/kernel
|
kerneldir=${D}${KERNEL_SRC_PATH}
|
||||||
install -d $kerneldir
|
install -d $kerneldir
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -173,7 +177,7 @@ kernel_do_install() {
|
|||||||
#
|
#
|
||||||
oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean
|
oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean
|
||||||
make -C $kerneldir _mrproper_scripts
|
make -C $kerneldir _mrproper_scripts
|
||||||
find $kerneldir -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
|
find $kerneldir -path $kerneldir/lib -prune -o -path $kerneldir/tools -prune -o -path $kerneldir/scripts -prune -o -name "*.[csS]" -exec rm '{}' \;
|
||||||
find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
|
find $kerneldir/Documentation -name "*.txt" -exec rm '{}' \;
|
||||||
|
|
||||||
# As of Linux kernel version 3.0.1, the clean target removes
|
# As of Linux kernel version 3.0.1, the clean target removes
|
||||||
@@ -183,23 +187,23 @@ kernel_do_install() {
|
|||||||
cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
|
cp arch/powerpc/lib/crtsavres.o $kerneldir/arch/powerpc/lib/crtsavres.o
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Necessary for building modules like compat-wireless.
|
||||||
|
if [ -f include/generated/bounds.h ]; then
|
||||||
|
cp include/generated/bounds.h $kerneldir/include/generated/bounds.h
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove the following binaries which cause strip errors
|
# Remove the following binaries which cause strip errors
|
||||||
# during do_package for cross-compiled platforms
|
# during do_package for cross-compiled platforms
|
||||||
bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
|
bin_files="arch/powerpc/boot/addnote arch/powerpc/boot/hack-coff \
|
||||||
arch/powerpc/boot/mktree"
|
arch/powerpc/boot/mktree scripts/kconfig/zconf.tab.o \
|
||||||
|
scripts/kconfig/conf.o scripts/kconfig/kxgettext.o"
|
||||||
for entry in $bin_files; do
|
for entry in $bin_files; do
|
||||||
rm -f $kerneldir/$entry
|
rm -f $kerneldir/$entry
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess"
|
|
||||||
|
|
||||||
kernel_package_preprocess () {
|
|
||||||
rm -rf ${PKGD}/kernel
|
|
||||||
}
|
|
||||||
|
|
||||||
sysroot_stage_all_append() {
|
sysroot_stage_all_append() {
|
||||||
sysroot_stage_dir ${D}/kernel ${SYSROOT_DESTDIR}/kernel
|
sysroot_stage_dir ${D}${KERNEL_SRC_PATH} ${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}
|
||||||
}
|
}
|
||||||
|
|
||||||
kernel_do_configure() {
|
kernel_do_configure() {
|
||||||
@@ -247,19 +251,18 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
|
|||||||
|
|
||||||
# kernel-base becomes kernel-${KERNEL_VERSION}
|
# kernel-base becomes kernel-${KERNEL_VERSION}
|
||||||
# kernel-image becomes kernel-image-${KERNEL_VERISON}
|
# kernel-image becomes kernel-image-${KERNEL_VERISON}
|
||||||
PACKAGES = "kernel kernel-base kernel-image kernel-dev kernel-vmlinux kernel-misc"
|
PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev"
|
||||||
FILES = ""
|
FILES = ""
|
||||||
FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
|
FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*"
|
||||||
FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config*"
|
FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* ${KERNEL_SRC_PATH}"
|
||||||
FILES_kernel-vmlinux = "/boot/vmlinux*"
|
FILES_kernel-vmlinux = "/boot/vmlinux*"
|
||||||
# misc is a package to contain files we need in staging
|
|
||||||
FILES_kernel-misc = "/kernel/include/config /kernel/scripts /kernel/drivers/crypto /kernel/drivers/media"
|
|
||||||
RDEPENDS_kernel = "kernel-base"
|
RDEPENDS_kernel = "kernel-base"
|
||||||
# Allow machines to override this dependency if kernel image files are
|
# Allow machines to override this dependency if kernel image files are
|
||||||
# not wanted in images as standard
|
# not wanted in images as standard
|
||||||
RDEPENDS_kernel-base ?= "kernel-image"
|
RDEPENDS_kernel-base ?= "kernel-image"
|
||||||
PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
|
PKG_kernel-image = "kernel-image-${@legitimize_package_name('${KERNEL_VERSION}')}"
|
||||||
PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
|
PKG_kernel-base = "kernel-${@legitimize_package_name('${KERNEL_VERSION}')}"
|
||||||
|
RPROVIDES_kernel-base += "kernel-${KERNEL_VERSION}"
|
||||||
ALLOW_EMPTY_kernel = "1"
|
ALLOW_EMPTY_kernel = "1"
|
||||||
ALLOW_EMPTY_kernel-base = "1"
|
ALLOW_EMPTY_kernel-base = "1"
|
||||||
ALLOW_EMPTY_kernel-image = "1"
|
ALLOW_EMPTY_kernel-image = "1"
|
||||||
@@ -271,15 +274,13 @@ fi
|
|||||||
if [ -n "$D" ]; then
|
if [ -n "$D" ]; then
|
||||||
${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
||||||
else
|
else
|
||||||
depmod -a
|
depmod -a ${KERNEL_VERSION}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst_modules () {
|
pkg_postinst_modules () {
|
||||||
if [ -n "$D" ]; then
|
if [ -z "$D" ]; then
|
||||||
${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
depmod -a ${KERNEL_VERSION}
|
||||||
else
|
|
||||||
depmod -a
|
|
||||||
update-modules || true
|
update-modules || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -464,7 +465,7 @@ python populate_packages_prepend () {
|
|||||||
# avoid warnings. removedirs only raises an OSError if an empty
|
# avoid warnings. removedirs only raises an OSError if an empty
|
||||||
# directory cannot be removed.
|
# directory cannot be removed.
|
||||||
dvar = d.getVar('PKGD', True)
|
dvar = d.getVar('PKGD', True)
|
||||||
for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
|
for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
|
||||||
if len(os.listdir(dir)) == 0:
|
if len(os.listdir(dir)) == 0:
|
||||||
os.rmdir(dir)
|
os.rmdir(dir)
|
||||||
|
|
||||||
@@ -472,7 +473,7 @@ python populate_packages_prepend () {
|
|||||||
metapkg = "kernel-modules"
|
metapkg = "kernel-modules"
|
||||||
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
|
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
|
||||||
d.setVar('FILES_' + metapkg, "")
|
d.setVar('FILES_' + metapkg, "")
|
||||||
blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'perf', 'perf-dbg', 'kernel-misc' ]
|
blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base', 'kernel-vmlinux', 'perf', 'perf-dbg' ]
|
||||||
for l in module_deps.values():
|
for l in module_deps.values():
|
||||||
for i in l:
|
for i in l:
|
||||||
pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
|
pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
|
||||||
@@ -545,4 +546,5 @@ EXPORT_FUNCTIONS do_deploy
|
|||||||
PACKAGES =+ "perf-dbg perf"
|
PACKAGES =+ "perf-dbg perf"
|
||||||
FILES_perf = "${bindir}/* \
|
FILES_perf = "${bindir}/* \
|
||||||
${libexecdir}"
|
${libexecdir}"
|
||||||
FILES_perf-dbg = "${FILES_${PN}-dbg}"
|
FILES_perf-dbg = "${FILES_${PN}-dbg} \
|
||||||
|
${KERNEL_SRC_PATH}/tools/perf/.debug"
|
||||||
|
|||||||
@@ -35,6 +35,14 @@ python __anonymous () {
|
|||||||
d.setVar("DEPENDS", depends)
|
d.setVar("DEPENDS", depends)
|
||||||
d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile")
|
d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile")
|
||||||
break
|
break
|
||||||
|
|
||||||
|
distro_features = (d.getVar('DISTRO_FEATURES', True) or '').split()
|
||||||
|
|
||||||
|
# try to fix disable charsets/locales/locale-code compile fail
|
||||||
|
if 'libc-charsets' in distro_features and 'libc-locales' in distro_features and 'libc-locale-code' in distro_features:
|
||||||
|
d.setVar('PACKAGE_NO_GCONV', '0')
|
||||||
|
else:
|
||||||
|
d.setVar('PACKAGE_NO_GCONV', '1')
|
||||||
}
|
}
|
||||||
|
|
||||||
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
|
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
|
||||||
@@ -249,7 +257,7 @@ python package_do_split_gconvs () {
|
|||||||
else:
|
else:
|
||||||
libc_name = name
|
libc_name = name
|
||||||
d.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
|
d.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
|
||||||
% (bpn, libc_name)))
|
% (d.getVar('MLPREFIX') + bpn, libc_name)))
|
||||||
|
|
||||||
commands = {}
|
commands = {}
|
||||||
|
|
||||||
@@ -271,6 +279,7 @@ python package_do_split_gconvs () {
|
|||||||
"mips": " --uint32-align=4 --big-endian ", \
|
"mips": " --uint32-align=4 --big-endian ", \
|
||||||
"mipsel": " --uint32-align=4 --little-endian ", \
|
"mipsel": " --uint32-align=4 --little-endian ", \
|
||||||
"i586": " --uint32-align=4 --little-endian ", \
|
"i586": " --uint32-align=4 --little-endian ", \
|
||||||
|
"i686": " --uint32-align=4 --little-endian ", \
|
||||||
"x86_64": " --uint32-align=4 --little-endian " }
|
"x86_64": " --uint32-align=4 --little-endian " }
|
||||||
|
|
||||||
if target_arch in locale_arch_options:
|
if target_arch in locale_arch_options:
|
||||||
|
|||||||
@@ -79,6 +79,10 @@ license_create_manifest() {
|
|||||||
# Get list of installed packages
|
# Get list of installed packages
|
||||||
list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
|
list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
|
||||||
INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
|
INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
|
||||||
|
# remove existing license.manifest file
|
||||||
|
if [ -f ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest ]; then
|
||||||
|
rm ${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest
|
||||||
|
fi
|
||||||
# list of installed packages is broken for deb
|
# list of installed packages is broken for deb
|
||||||
for pkg in ${INSTALLED_PKGS}; do
|
for pkg in ${INSTALLED_PKGS}; do
|
||||||
# not the best way to do this but licenses are not arch dependant iirc
|
# not the best way to do this but licenses are not arch dependant iirc
|
||||||
@@ -211,9 +215,10 @@ python do_populate_lic() {
|
|||||||
if spdx_generic and license_source:
|
if spdx_generic and license_source:
|
||||||
# we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest
|
# we really should copy to generic_ + spdx_generic, however, that ends up messing the manifest
|
||||||
# audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes)
|
# audit up. This should be fixed in emit_pkgdata (or, we actually got and fix all the recipes)
|
||||||
ret = bb.copyfile(os.path.join(license_source, spdx_generic), os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type))
|
|
||||||
|
bb.copyfile(os.path.join(license_source, spdx_generic), os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type))
|
||||||
|
if not os.path.isfile(os.path.join(os.path.join(d.getVar('LICSSTATEDIR', True), pn), "generic_" + license_type)):
|
||||||
# If the copy didn't occur, something horrible went wrong and we fail out
|
# If the copy didn't occur, something horrible went wrong and we fail out
|
||||||
if not ret:
|
|
||||||
bb.warn("%s for %s could not be copied for some reason. It may not exist. WARN for now." % (spdx_generic, pn))
|
bb.warn("%s for %s could not be copied for some reason. It may not exist. WARN for now." % (spdx_generic, pn))
|
||||||
else:
|
else:
|
||||||
# And here is where we warn people that their licenses are lousy
|
# And here is where we warn people that their licenses are lousy
|
||||||
@@ -377,7 +382,7 @@ do_populate_lic[sstate-name] = "populate-lic"
|
|||||||
do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
|
do_populate_lic[sstate-inputdirs] = "${LICSSTATEDIR}"
|
||||||
do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
|
do_populate_lic[sstate-outputdirs] = "${LICENSE_DIRECTORY}/"
|
||||||
|
|
||||||
ROOTFS_POSTINSTALL_COMMAND += "license_create_manifest; "
|
ROOTFS_POSTPROCESS_COMMAND_prepend = "license_create_manifest; "
|
||||||
|
|
||||||
python do_populate_lic_setscene () {
|
python do_populate_lic_setscene () {
|
||||||
sstate_setscene(d)
|
sstate_setscene(d)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
MIRRORS += "\
|
MIRRORS += "\
|
||||||
${DEBIAN_MIRROR}/main http://snapshot.debian.net/archive/pool \n \
|
${DEBIAN_MIRROR}/main http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool/ \n \
|
||||||
${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool \n \
|
${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool \n \
|
||||||
${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool \n \
|
${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool \n \
|
||||||
${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool \n \
|
${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool \n \
|
||||||
@@ -25,7 +25,6 @@ ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/ \n \
|
|||||||
ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n \
|
ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN \n \
|
||||||
ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n \
|
ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/ \n \
|
||||||
ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n \
|
ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/ \n \
|
||||||
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnutls.org/pub/gnutls/ \n \
|
|
||||||
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/ \n \
|
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/ \n \
|
||||||
ftp://ftp.gnutls.org/pub/gnutls http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \n \
|
ftp://ftp.gnutls.org/pub/gnutls http://www.mirrors.wiretapped.net/security/network-security/gnutls/ \n \
|
||||||
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \n \
|
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/ \n \
|
||||||
|
|||||||
@@ -37,15 +37,14 @@ module_do_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst_append () {
|
pkg_postinst_append () {
|
||||||
if [ -n "$D" ]; then
|
if [ -z "$D" ]; then
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
depmod -a
|
depmod -a
|
||||||
update-modules || true
|
update-modules || true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postrm_append () {
|
pkg_postrm_append () {
|
||||||
update-modules || true
|
update-modules || true
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_FUNCTIONS do_compile do_install
|
EXPORT_FUNCTIONS do_compile do_install
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user