mirror of
https://git.yoctoproject.org/poky
synced 2026-02-15 21:23:04 +01:00
Compare commits
352 Commits
1.2_M4.rc4
...
1.2_M4.rc4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
@@ -96,8 +96,9 @@ USB Device:
|
||||
|
||||
# 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
|
||||
cannot understand the physical layout of the disk (or rather it expects a
|
||||
If the device fails to boot with "Boot error" displayed, or apparently
|
||||
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
|
||||
solutions to this problem:
|
||||
|
||||
@@ -106,26 +107,47 @@ USB Device:
|
||||
geometry from the device.
|
||||
|
||||
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.
|
||||
Remove and reinsert the device to allow the kernel to detect the new
|
||||
partition layout.
|
||||
Where 1019, 124 and 62 are the cylinder, head and sectors/track counts
|
||||
as reported by fdisk (substitute the values reported for your device).
|
||||
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 /dev/sdb4 /tmp/usbkey
|
||||
# cp -rf /tmp/image/* /tmp/usbkey
|
||||
|
||||
c. Install the syslinux boot loader:
|
||||
d. Install the syslinux boot loader:
|
||||
|
||||
# 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
|
||||
from it.
|
||||
|
||||
@@ -241,8 +263,8 @@ Setup instructions
|
||||
You will need the following:
|
||||
* NFS root setup on your workstation
|
||||
* TFTP server installed on your workstation
|
||||
* Null modem cable connected from your workstation to the first serial port
|
||||
on the board
|
||||
* Straight-thru 9-conductor serial cable (DB9, M/F) connected from your
|
||||
PC to UART1
|
||||
* Ethernet connected to the first ethernet port on the board
|
||||
|
||||
--- Preparation ---
|
||||
|
||||
@@ -69,7 +69,7 @@ def get_ui(config):
|
||||
return getattr(module, interface).main
|
||||
except AttributeError:
|
||||
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"""
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
import cmd
|
||||
import logging
|
||||
import warnings
|
||||
import os
|
||||
import sys
|
||||
import fnmatch
|
||||
@@ -28,6 +29,7 @@ import bb.fetch2
|
||||
|
||||
logger = logging.getLogger('BitBake')
|
||||
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
def main(args):
|
||||
# Set up logging
|
||||
|
||||
@@ -251,7 +251,7 @@ of the event and the content of the <varname>FILE</varname> variable.</para>
|
||||
<section>
|
||||
<title>Variants</title>
|
||||
<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><screen>BBVERSIONS = "1.0 2.0 git"
|
||||
SRC_URI_git = "git://someurl/somepath.git"</screen></para>
|
||||
|
||||
@@ -291,12 +291,13 @@ def _exec_task(fn, task, d, quieterr):
|
||||
|
||||
bb.utils.mkdirhier(tempdir)
|
||||
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:
|
||||
bb.utils.remove(loglink)
|
||||
|
||||
try:
|
||||
os.symlink(logfn, loglink)
|
||||
os.symlink(logbase, loglink)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
|
||||
@@ -179,12 +179,12 @@ class CommandsSync:
|
||||
"""
|
||||
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]
|
||||
bb.event.fire(eval(event), command.cooker.configuration.data)
|
||||
filterfunc = params[0]
|
||||
bb.parse.parse_py.ConfHandler.confFilters.append(filterfunc)
|
||||
|
||||
class CommandsAsync:
|
||||
"""
|
||||
@@ -359,3 +359,13 @@ class CommandsAsync:
|
||||
command.cooker.parseConfigurationFiles(prefiles, postfiles)
|
||||
command.finishAsyncCommand()
|
||||
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()
|
||||
|
||||
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()
|
||||
bb.data.inheritFromOS(self.configuration.data, self.savedenv, filtered_keys)
|
||||
|
||||
@@ -462,13 +462,14 @@ class DataSmart(MutableMapping):
|
||||
self.delVar(var)
|
||||
|
||||
def get_hash(self):
|
||||
data = ""
|
||||
data = {}
|
||||
config_whitelist = set((self.getVar("BB_HASHCONFIG_WHITELIST", True) or "").split())
|
||||
keys = set(key for key in iter(self) if not key.startswith("__"))
|
||||
for key in keys:
|
||||
if key in config_whitelist:
|
||||
continue
|
||||
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()
|
||||
|
||||
@@ -476,9 +476,10 @@ def try_mirrors(d, origud, mirrors, check = False):
|
||||
|
||||
if not os.path.exists(ud.donestamp) or ud.method.need_update(newuri, ud, ld):
|
||||
ud.method.download(newuri, ud, ld)
|
||||
open(ud.donestamp, 'w').close()
|
||||
if hasattr(ud.method,"build_mirror_data"):
|
||||
ud.method.build_mirror_data(newuri, ud, ld)
|
||||
if os.path.exists(ud.localpath):
|
||||
open(ud.donestamp, 'w').close()
|
||||
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):
|
||||
continue
|
||||
|
||||
@@ -136,10 +136,13 @@ def getInterval(configuration):
|
||||
|
||||
""" 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)
|
||||
if not interval:
|
||||
# The default value is 50M and 5K.
|
||||
return 50 * 1024 * 1024, 5 * 1024
|
||||
return spaceDefault, inodeDefault
|
||||
else:
|
||||
# The disk space or inode interval is optional, but it should
|
||||
# have a correct value once it is specified
|
||||
@@ -151,12 +154,16 @@ def getInterval(configuration):
|
||||
if not intervalSpace:
|
||||
printErr("Invalid disk space interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(1))
|
||||
return None, None
|
||||
else:
|
||||
intervalSpace = spaceDefault
|
||||
intervalInode = intervalRe.group(2)
|
||||
if intervalInode:
|
||||
intervalInode = convertGMK(intervalInode)
|
||||
if not intervalInode:
|
||||
printErr("Invalid disk inode interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(2))
|
||||
return None, None
|
||||
else:
|
||||
intervalInode = inodeDefault
|
||||
return intervalSpace, intervalInode
|
||||
else:
|
||||
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)
|
||||
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):
|
||||
init(data)
|
||||
|
||||
@@ -107,6 +115,9 @@ def handle(fn, data, include):
|
||||
if oldfile:
|
||||
data.setVar('FILE', oldfile)
|
||||
|
||||
for f in confFilters:
|
||||
f(fn, data)
|
||||
|
||||
return data
|
||||
|
||||
def feeder(lineno, s, fn, statements):
|
||||
|
||||
@@ -1068,6 +1068,7 @@ class RunQueueExecute:
|
||||
for k, v in self.build_pids.iteritems():
|
||||
try:
|
||||
os.kill(-k, signal.SIGTERM)
|
||||
os.waitpid(-1, 0)
|
||||
except:
|
||||
pass
|
||||
for pipe in self.build_pipes:
|
||||
|
||||
@@ -83,15 +83,15 @@ class BuildConfigurationTreeView(gtk.TreeView):
|
||||
|
||||
def show(self, src_config_info, src_params):
|
||||
vars = []
|
||||
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_OS:", src_params.target_os))
|
||||
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_VERSION:", src_params.distro_version))
|
||||
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("LAYERS:", src_config_info.layers))
|
||||
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 OS:", src_params.target_os))
|
||||
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 version:", src_params.distro_version))
|
||||
vars.append(self.set_vars("SDK machine:", src_config_info.curr_sdk_machine))
|
||||
vars.append(self.set_vars("Tune features:", src_params.tune_pkgarch))
|
||||
vars.append(self.set_vars("Layers:", src_config_info.layers))
|
||||
|
||||
for path in src_config_info.layers:
|
||||
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)
|
||||
if f:
|
||||
branch = f.readline().lstrip('\n').rstrip('\n')
|
||||
vars.append(self.set_vars("BRANCH:", branch))
|
||||
vars.append(self.set_vars("Branch:", branch))
|
||||
f.close()
|
||||
break
|
||||
|
||||
self.set_config_model(vars)
|
||||
|
||||
def reset(self):
|
||||
self.set_model(None)
|
||||
|
||||
#
|
||||
# BuildDetailsPage
|
||||
#
|
||||
@@ -133,6 +136,7 @@ class BuildDetailsPage (HobPage):
|
||||
self.progress_hbox.pack_start(self.progress_bar, expand=True, fill=True)
|
||||
self.stop_button = HobAltButton("Stop")
|
||||
self.stop_button.connect("clicked", self.stop_button_clicked_cb)
|
||||
self.stop_button.set_sensitive(False)
|
||||
self.progress_hbox.pack_end(self.stop_button, expand=False, fill=False)
|
||||
|
||||
self.notebook = HobNotebook()
|
||||
@@ -140,7 +144,7 @@ class BuildDetailsPage (HobPage):
|
||||
self.scrolled_view_config = gtk.ScrolledWindow ()
|
||||
self.scrolled_view_config.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
|
||||
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_model = self.builder.handler.build.model.failure_model()
|
||||
@@ -169,9 +173,11 @@ class BuildDetailsPage (HobPage):
|
||||
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)
|
||||
self.task_status.set_markup(tsk_msg)
|
||||
self.stop_button.set_sensitive(True)
|
||||
|
||||
def reset_build_status(self):
|
||||
self.task_status.set_markup("\n") # to ensure layout is correct
|
||||
self.endpath = (0,)
|
||||
|
||||
def show_issues(self):
|
||||
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.progress_bar.reset()
|
||||
self.config_tv.reset()
|
||||
self.vbox.pack_start(self.progress_box, expand=False, fill=False)
|
||||
|
||||
self.vbox.pack_start(self.notebook, expand=True, fill=True)
|
||||
@@ -213,7 +220,10 @@ class BuildDetailsPage (HobPage):
|
||||
self.show_all()
|
||||
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.set_title(title)
|
||||
self.progress_bar.set_rcstyle(status)
|
||||
@@ -228,13 +238,15 @@ class BuildDetailsPage (HobPage):
|
||||
self.builder.stop_build()
|
||||
|
||||
def hide_stop_button(self):
|
||||
self.stop_button.set_sensitive(False)
|
||||
self.stop_button.hide()
|
||||
|
||||
def scroll_to_present_row(self, model, path, iter, v_adj, treeview):
|
||||
if treeview and v_adj:
|
||||
if path[0] > self.endpath[0]: # check the event is a new row append or not
|
||||
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)
|
||||
|
||||
def show_configurations(self, configurations, params):
|
||||
|
||||
@@ -32,23 +32,57 @@ from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
|
||||
from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
|
||||
from bb.ui.crumbs.builddetailspage import BuildDetailsPage
|
||||
from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
|
||||
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
|
||||
from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton, hcc
|
||||
from bb.ui.crumbs.hig import CrumbsMessageDialog, ImageSelectionDialog, \
|
||||
AdvancedSettingDialog, LayerSelectionDialog, \
|
||||
DeployImageDialog
|
||||
from bb.ui.crumbs.persistenttooltip import PersistentTooltip
|
||||
import bb.ui.crumbs.utils
|
||||
|
||||
class Configuration:
|
||||
'''Represents the data structure of configuration.'''
|
||||
|
||||
def __init__(self, params):
|
||||
# Settings
|
||||
def __init__(self):
|
||||
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 = ""
|
||||
|
||||
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.dldir = params["dldir"]
|
||||
self.sstatedir = params["sstatedir"]
|
||||
self.sstatemirror = params["sstatemirror"]
|
||||
self.pmake = params["pmake"]
|
||||
self.pmake = int(params["pmake"].split()[1])
|
||||
self.bbthread = params["bbthread"]
|
||||
self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
|
||||
self.image_rootfs_size = params["image_rootfs_size"]
|
||||
@@ -58,15 +92,11 @@ class Configuration:
|
||||
self.curr_sdk_machine = params["sdk_machine"]
|
||||
self.conf_version = params["conf_version"]
|
||||
self.lconf_version = params["lconf_version"]
|
||||
self.extra_setting = {}
|
||||
self.toolchain_build = False
|
||||
self.image_fstypes = params["image_fstypes"].split()
|
||||
self.image_fstypes = params["image_fstypes"]
|
||||
# self.extra_setting/self.toolchain_build
|
||||
# bblayers.conf
|
||||
self.layers = params["layer"].split()
|
||||
# image/recipes/packages
|
||||
self.selected_image = None
|
||||
self.selected_recipes = []
|
||||
self.selected_packages = []
|
||||
self.default_task = params["default_task"]
|
||||
|
||||
# proxy settings
|
||||
self.all_proxy = params["all_proxy"]
|
||||
@@ -85,10 +115,22 @@ class Configuration:
|
||||
self.dldir = template.getVar("DL_DIR")
|
||||
self.sstatedir = template.getVar("SSTATE_DIR")
|
||||
self.sstatemirror = template.getVar("SSTATE_MIRROR")
|
||||
self.pmake = int(template.getVar("PARALLEL_MAKE").split()[1])
|
||||
self.bbthread = int(template.getVar("BB_NUMBER_THREADS"))
|
||||
self.image_rootfs_size = int(template.getVar("IMAGE_ROOTFS_SIZE"))
|
||||
self.image_extra_size = int(template.getVar("IMAGE_EXTRA_SPACE"))
|
||||
try:
|
||||
self.pmake = int(template.getVar("PARALLEL_MAKE").split()[1])
|
||||
except:
|
||||
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.
|
||||
self.incompat_license = template.getVar("INCOMPATIBLE_LICENSE")
|
||||
self.curr_sdk_machine = template.getVar("SDKMACHINE")
|
||||
@@ -96,7 +138,7 @@ class Configuration:
|
||||
self.lconf_version = template.getVar("LCONF_VERSION")
|
||||
self.extra_setting = eval(template.getVar("EXTRA_SETTING"))
|
||||
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
|
||||
self.layers = template.getVar("BBLAYERS").split()
|
||||
# image/recipes/packages
|
||||
@@ -113,11 +155,12 @@ class Configuration:
|
||||
self.cvs_proxy_host = template.getVar("CVS_PROXY_HOST")
|
||||
self.cvs_proxy_port = template.getVar("CVS_PROXY_PORT")
|
||||
|
||||
def save(self, template, filename):
|
||||
def save(self, template, defaults=False):
|
||||
# bblayers.conf
|
||||
template.setVar("BBLAYERS", " ".join(self.layers))
|
||||
# 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("DL_DIR", self.dldir)
|
||||
template.setVar("SSTATE_DIR", self.sstatedir)
|
||||
@@ -133,12 +176,12 @@ class Configuration:
|
||||
template.setVar("LCONF_VERSION", self.lconf_version)
|
||||
template.setVar("EXTRA_SETTING", self.extra_setting)
|
||||
template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
|
||||
template.setVar("IMAGE_FSTYPES", " ".join(self.image_fstypes).lstrip(" "))
|
||||
# image/recipes/packages
|
||||
self.selected_image = filename
|
||||
template.setVar("__SELECTED_IMAGE__", self.selected_image)
|
||||
template.setVar("DEPENDS", self.selected_recipes)
|
||||
template.setVar("IMAGE_INSTALL", self.selected_packages)
|
||||
template.setVar("IMAGE_FSTYPES", self.image_fstypes)
|
||||
if not defaults:
|
||||
# image/recipes/packages
|
||||
template.setVar("__SELECTED_IMAGE__", self.selected_image)
|
||||
template.setVar("DEPENDS", self.selected_recipes)
|
||||
template.setVar("IMAGE_INSTALL", self.user_selected_packages)
|
||||
# proxy
|
||||
template.setVar("all_proxy", self.all_proxy)
|
||||
template.setVar("http_proxy", self.http_proxy)
|
||||
@@ -152,34 +195,75 @@ class Configuration:
|
||||
class Parameters:
|
||||
'''Represents other variables like available machines, etc.'''
|
||||
|
||||
def __init__(self, params):
|
||||
def __init__(self):
|
||||
# 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_package_formats = []
|
||||
self.all_distros = []
|
||||
self.all_sdk_machines = []
|
||||
self.max_threads = params["max_threads"]
|
||||
self.all_layers = []
|
||||
self.core_base = params["core_base"]
|
||||
self.image_names = []
|
||||
self.enable_proxy = False
|
||||
|
||||
# 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_types = params["image_types"].split()
|
||||
self.runnable_image_types = params["runnable_image_types"].split()
|
||||
self.runnable_machine_patterns = params["runnable_machine_patterns"].split()
|
||||
self.deployable_image_types = params["deployable_image_types"].split()
|
||||
self.tmpdir = params["tmpdir"]
|
||||
self.distro_version = params["distro_version"]
|
||||
self.target_os = params["target_os"]
|
||||
self.target_arch = params["target_arch"]
|
||||
self.tune_pkgarch = params["tune_pkgarch"]
|
||||
# for build log to show
|
||||
self.bb_version = params["bb_version"]
|
||||
self.tune_arch = params["tune_arch"]
|
||||
self.enable_proxy = False
|
||||
self.target_arch = params["target_arch"]
|
||||
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):
|
||||
|
||||
(MACHINE_SELECTION,
|
||||
LAYER_CHANGED,
|
||||
RCPPKGINFO_POPULATING,
|
||||
RCPPKGINFO_POPULATED,
|
||||
BASEIMG_SELECTED,
|
||||
@@ -192,7 +276,7 @@ class Builder(gtk.Window):
|
||||
IMAGE_GENERATED,
|
||||
MY_IMAGE_OPENED,
|
||||
BACK,
|
||||
END_NOOP) = range(15)
|
||||
END_NOOP) = range(14)
|
||||
|
||||
(IMAGE_CONFIGURATION,
|
||||
RECIPE_DETAILS,
|
||||
@@ -203,7 +287,6 @@ class Builder(gtk.Window):
|
||||
|
||||
__step2page__ = {
|
||||
MACHINE_SELECTION : IMAGE_CONFIGURATION,
|
||||
LAYER_CHANGED : IMAGE_CONFIGURATION,
|
||||
RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
|
||||
RCPPKGINFO_POPULATED : IMAGE_CONFIGURATION,
|
||||
BASEIMG_SELECTED : IMAGE_CONFIGURATION,
|
||||
@@ -221,11 +304,18 @@ class Builder(gtk.Window):
|
||||
def __init__(self, hobHandler, recipe_model, package_model):
|
||||
super(Builder, self).__init__()
|
||||
|
||||
self.hob_image = "hob-image"
|
||||
self.hob_toolchain = "hob-toolchain"
|
||||
|
||||
# handler
|
||||
self.handler = hobHandler
|
||||
|
||||
self.template = None
|
||||
|
||||
# configuration and parameters
|
||||
self.configuration = Configuration()
|
||||
self.parameters = Parameters()
|
||||
|
||||
# build step
|
||||
self.current_step = None
|
||||
self.previous_step = None
|
||||
@@ -236,6 +326,12 @@ class Builder(gtk.Window):
|
||||
self.recipe_model = recipe_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
|
||||
self.create_visual_elements()
|
||||
|
||||
@@ -245,7 +341,6 @@ class Builder(gtk.Window):
|
||||
self.package_model.connect("package-selection-changed", self.packagelist_changed_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("layers-updated", self.handler_layers_updated_cb)
|
||||
self.handler.connect("parsing-started", self.handler_parsing_started_cb)
|
||||
self.handler.connect("parsing", self.handler_parsing_cb)
|
||||
self.handler.connect("parsing-completed", self.handler_parsing_completed_cb)
|
||||
@@ -254,16 +349,15 @@ class Builder(gtk.Window):
|
||||
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("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("data-generated", self.handler_data_generated_cb)
|
||||
self.handler.connect("command-succeeded", self.handler_command_succeeded_cb)
|
||||
self.handler.connect("command-failed", self.handler_command_failed_cb)
|
||||
|
||||
self.handler.init_cooker()
|
||||
self.handler.set_extra_inherit("image_types")
|
||||
self.handler.parse_config()
|
||||
self.handler.set_config_filter(hob_conf_filter)
|
||||
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
self.initiate_new_build_async()
|
||||
|
||||
def create_visual_elements(self):
|
||||
self.set_title("Hob")
|
||||
@@ -299,21 +393,96 @@ class Builder(gtk.Window):
|
||||
self.show_all()
|
||||
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 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):
|
||||
if not os.path.isfile(path):
|
||||
return None
|
||||
|
||||
self.template = TemplateMgr()
|
||||
self.template.load(path)
|
||||
self.configuration.load(self.template)
|
||||
try:
|
||||
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:
|
||||
if not os.path.exists(layer+'/conf/layer.conf'):
|
||||
return False
|
||||
|
||||
self.switch_page(self.LAYER_CHANGED)
|
||||
self.save_defaults() # remember layers and settings
|
||||
self.update_config_async()
|
||||
return True
|
||||
|
||||
self.template.destroy()
|
||||
self.template = None
|
||||
|
||||
def save_template(self, path):
|
||||
def save_template(self, path, defaults=False):
|
||||
if path.rfind("/") == -1:
|
||||
filename = "default"
|
||||
path = "."
|
||||
@@ -322,12 +491,22 @@ class Builder(gtk.Window):
|
||||
path = path[0:path.rfind("/")]
|
||||
|
||||
self.template = TemplateMgr()
|
||||
self.template.open(filename, path)
|
||||
self.configuration.save(self.template, filename)
|
||||
try:
|
||||
self.template.open(filename, path)
|
||||
self.configuration.save(self.template, defaults)
|
||||
|
||||
self.template.save()
|
||||
self.template.destroy()
|
||||
self.template = None
|
||||
self.template.save()
|
||||
except Exception as e:
|
||||
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):
|
||||
# Main Workflow (Business Logic)
|
||||
@@ -336,16 +515,10 @@ class Builder(gtk.Window):
|
||||
if next_step == self.MACHINE_SELECTION: # init step
|
||||
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:
|
||||
# MACHINE CHANGED action or SETTINGS CHANGED
|
||||
# show the progress bar
|
||||
self.image_configuration_page.show_info_populating()
|
||||
self.generate_recipes()
|
||||
|
||||
elif next_step == self.RCPPKGINFO_POPULATED:
|
||||
self.image_configuration_page.show_info_populated()
|
||||
@@ -362,7 +535,6 @@ class Builder(gtk.Window):
|
||||
elif next_step == self.PACKAGE_GENERATING or next_step == self.FAST_IMAGE_GENERATING:
|
||||
# both PACKAGE_GENEATING and FAST_IMAGE_GENERATING share the same page
|
||||
self.build_details_page.show_page(next_step)
|
||||
self.generate_packages()
|
||||
|
||||
elif next_step == self.PACKAGE_GENERATED:
|
||||
pass
|
||||
@@ -371,7 +543,6 @@ class Builder(gtk.Window):
|
||||
# after packages are generated, selected_packages need to
|
||||
# be updated in package_model per selected_image in recipe_model
|
||||
self.build_details_page.show_page(next_step)
|
||||
self.generate_image()
|
||||
|
||||
elif next_step == self.IMAGE_GENERATED:
|
||||
self.image_details_page.show_page(next_step)
|
||||
@@ -402,6 +573,7 @@ class Builder(gtk.Window):
|
||||
self.handler.set_image_fstypes(self.configuration.image_fstypes)
|
||||
self.handler.set_extra_config(self.configuration.extra_setting)
|
||||
self.handler.set_extra_inherit("packageinfo")
|
||||
self.handler.set_extra_inherit("image_types")
|
||||
# set proxies
|
||||
if self.parameters.enable_proxy:
|
||||
self.handler.set_http_proxy(self.configuration.http_proxy)
|
||||
@@ -419,25 +591,16 @@ class Builder(gtk.Window):
|
||||
left = self.package_model.set_selected_packages(selected_packages)
|
||||
self.configuration.selected_packages += left
|
||||
|
||||
def generate_packages(self):
|
||||
# Build packages
|
||||
_, all_recipes = self.recipe_model.get_selected_recipes()
|
||||
self.set_user_config()
|
||||
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 update_configuration_parameters(self, params):
|
||||
if params:
|
||||
self.configuration.update(params)
|
||||
self.parameters.update(params)
|
||||
|
||||
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
|
||||
def handler_config_updated_cb(self, handler, which, values):
|
||||
@@ -452,22 +615,15 @@ class Builder(gtk.Window):
|
||||
def handler_package_formats_updated_cb(self, handler, 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):
|
||||
if initcmd == self.handler.PARSE_CONFIG:
|
||||
# settings
|
||||
params = self.handler.get_parameters()
|
||||
self.configuration = Configuration(params)
|
||||
self.parameters = Parameters(params)
|
||||
self.handler.generate_configuration()
|
||||
elif initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||
if initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||
self.update_configuration_parameters(self.get_parameters_sync())
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
elif initcmd in [self.handler.GENERATE_RECIPES,
|
||||
self.handler.GENERATE_PACKAGES,
|
||||
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:
|
||||
if self.current_step == self.RCPPKGINFO_POPULATING:
|
||||
self.switch_page(self.RCPPKGINFO_POPULATED)
|
||||
@@ -476,25 +632,22 @@ class Builder(gtk.Window):
|
||||
|
||||
self.rcppkglist_populated()
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
self.switch_page(self.IMAGE_GENERATING)
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
self.switch_page(self.PACKAGE_GENERATED)
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
self.switch_page(self.IMAGE_GENERATED)
|
||||
self.generate_image_async()
|
||||
|
||||
def show_error_dialog(self, msg):
|
||||
lbl = "<b>Error</b>\n"
|
||||
lbl = lbl + "%s\n\n" % 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):
|
||||
if msg:
|
||||
lbl = "<b>Error</b>\n"
|
||||
lbl = lbl + "%s\n\n" % msg
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_WARNING)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
self.handler.clear_busy()
|
||||
self.configuration.curr_mach = None
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
msg = msg.replace("your local.conf", "Settings")
|
||||
self.show_error_dialog(msg)
|
||||
self.reset()
|
||||
|
||||
def window_sensitive(self, sensitive):
|
||||
self.image_configuration_page.machine_combo.set_sensitive(sensitive)
|
||||
@@ -515,6 +668,7 @@ class Builder(gtk.Window):
|
||||
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.LEFT_PTR))
|
||||
else:
|
||||
self.get_root_window().set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
||||
self.sensitive = sensitive
|
||||
|
||||
|
||||
def handler_generating_data_cb(self, handler):
|
||||
@@ -528,11 +682,8 @@ class Builder(gtk.Window):
|
||||
selected_recipes = self.configuration.selected_recipes[:]
|
||||
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_desc(selected_image)
|
||||
self.update_recipe_model(selected_image, selected_recipes)
|
||||
self.update_package_model(selected_packages)
|
||||
|
||||
@@ -587,8 +738,6 @@ class Builder(gtk.Window):
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
fraction = 0
|
||||
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)
|
||||
|
||||
def build_succeeded(self):
|
||||
@@ -597,24 +746,42 @@ class Builder(gtk.Window):
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
fraction = 1.0
|
||||
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:
|
||||
linkpath = self.parameters.image_addr + '/' + linkname + '.' + image_type
|
||||
if os.path.exists(linkpath):
|
||||
self.parameters.image_names.append(os.readlink(linkpath))
|
||||
for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[image_type]:
|
||||
linkpath = self.parameters.image_addr + '/' + linkname + '.' + real_image_type
|
||||
if os.path.exists(linkpath):
|
||||
self.parameters.image_names.append(os.readlink(linkpath))
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
fraction = 1.0
|
||||
self.build_details_page.update_progress_bar("Build Completed: ", fraction)
|
||||
self.handler.build_succeeded_async()
|
||||
self.stopping = False
|
||||
|
||||
def build_failed(self):
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
fraction = 0.9
|
||||
if self.current_step == self.PACKAGE_GENERATING:
|
||||
self.switch_page(self.PACKAGE_GENERATED)
|
||||
elif self.current_step == self.IMAGE_GENERATING:
|
||||
fraction = 1.0
|
||||
elif self.current_step == self.PACKAGE_GENERATING:
|
||||
fraction = 1.0
|
||||
self.build_details_page.update_progress_bar("Build Failed: ", fraction, False)
|
||||
self.switch_page(self.IMAGE_GENERATED)
|
||||
|
||||
def build_failed(self):
|
||||
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.hide_stop_button()
|
||||
self.handler.build_failed_async()
|
||||
@@ -630,6 +797,14 @@ class Builder(gtk.Window):
|
||||
def handler_build_failed_cb(self, running_build):
|
||||
self.build_failed()
|
||||
|
||||
def handler_no_provider_cb(self, running_build, msg):
|
||||
dialog = CrumbsMessageDialog(self, 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):
|
||||
fraction = message["current"] * 1.0/message["total"]
|
||||
title = "Build packages"
|
||||
@@ -662,6 +837,8 @@ class Builder(gtk.Window):
|
||||
self.build_details_page.show_issues()
|
||||
|
||||
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>"
|
||||
dialog = CrumbsMessageDialog(self, lbl, gtk.STOCK_DIALOG_INFO)
|
||||
button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
|
||||
@@ -688,7 +865,7 @@ class Builder(gtk.Window):
|
||||
dialog.run()
|
||||
dialog.destroy()
|
||||
return
|
||||
self.switch_page(self.PACKAGE_GENERATING)
|
||||
self.generate_packages_async()
|
||||
|
||||
def build_image(self):
|
||||
selected_packages = self.package_model.get_selected_packages()
|
||||
@@ -701,7 +878,7 @@ class Builder(gtk.Window):
|
||||
dialog.run()
|
||||
dialog.destroy()
|
||||
return
|
||||
self.switch_page(self.IMAGE_GENERATING)
|
||||
self.generate_image_async()
|
||||
|
||||
def just_bake(self):
|
||||
selected_image = self.recipe_model.get_selected_image()
|
||||
@@ -718,11 +895,11 @@ class Builder(gtk.Window):
|
||||
dialog.destroy()
|
||||
return
|
||||
|
||||
self.switch_page(self.FAST_IMAGE_GENERATING)
|
||||
self.fast_generate_image_async()
|
||||
|
||||
def show_binb_dialog(self, binb):
|
||||
markup = "<b>Brought in by:</b>\n%s" % binb
|
||||
ptip = PersistentTooltip(markup)
|
||||
ptip = PersistentTooltip(markup, self)
|
||||
|
||||
ptip.show()
|
||||
|
||||
@@ -734,14 +911,17 @@ class Builder(gtk.Window):
|
||||
flags = gtk.DIALOG_MODAL
|
||||
| gtk.DIALOG_DESTROY_WITH_PARENT
|
||||
| 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)
|
||||
response = dialog.run()
|
||||
if response == gtk.RESPONSE_YES:
|
||||
self.configuration.layers = dialog.layers
|
||||
self.save_defaults() # remember layers
|
||||
# DO refresh layers
|
||||
if dialog.layers_changed:
|
||||
self.switch_page(self.LAYER_CHANGED)
|
||||
self.update_config_async()
|
||||
dialog.destroy()
|
||||
|
||||
def show_load_template_dialog(self):
|
||||
@@ -757,10 +937,11 @@ class Builder(gtk.Window):
|
||||
dialog.add_filter(filter)
|
||||
|
||||
response = dialog.run()
|
||||
path = None
|
||||
if response == gtk.RESPONSE_YES:
|
||||
path = dialog.get_filename()
|
||||
self.load_template(path)
|
||||
dialog.destroy()
|
||||
return response == gtk.RESPONSE_YES, path
|
||||
|
||||
def show_save_template_dialog(self):
|
||||
dialog = gtk.FileChooserDialog("Save Template Files", self,
|
||||
@@ -820,16 +1001,22 @@ class Builder(gtk.Window):
|
||||
button = dialog.add_button("Save", gtk.RESPONSE_YES)
|
||||
HobButton.style_button(button)
|
||||
response = dialog.run()
|
||||
settings_changed = False
|
||||
if response == gtk.RESPONSE_YES:
|
||||
self.parameters.enable_proxy = dialog.enable_proxy
|
||||
self.configuration = dialog.configuration
|
||||
# DO reparse recipes
|
||||
if dialog.settings_changed:
|
||||
if self.configuration.curr_mach == "":
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
else:
|
||||
self.switch_page(self.RCPPKGINFO_POPULATING)
|
||||
self.save_defaults() # remember settings
|
||||
settings_changed = dialog.settings_changed
|
||||
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):
|
||||
if not image_name:
|
||||
@@ -887,12 +1074,13 @@ class Builder(gtk.Window):
|
||||
if response == gtk.RESPONSE_YES:
|
||||
source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
|
||||
tmp_path = self.parameters.tmpdir
|
||||
cmdline = bb.ui.crumbs.utils.which_terminal()
|
||||
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):
|
||||
cmdline = "/usr/bin/xterm -e "
|
||||
cmdline += "\" export OE_TMPDIR=" + tmp_path + "; "
|
||||
and os.path.exists(source_env_path) and os.path.exists(tmp_path) \
|
||||
and cmdline:
|
||||
cmdline += "\' bash -c \"export OE_TMPDIR=" + tmp_path + "; "
|
||||
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))
|
||||
else:
|
||||
lbl = "<b>Path error</b>\nOne of your paths is wrong,"
|
||||
@@ -901,6 +1089,7 @@ class Builder(gtk.Window):
|
||||
lbl = lbl + "kernel path:" + kernel_path + "\n"
|
||||
lbl = lbl + "source environment path:" + source_env_path + "\n"
|
||||
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)
|
||||
button = dialog.add_button("Close", gtk.RESPONSE_OK)
|
||||
HobButton.style_button(button)
|
||||
@@ -921,7 +1110,7 @@ class Builder(gtk.Window):
|
||||
response = dialog.run()
|
||||
dialog.destroy()
|
||||
if response == gtk.RESPONSE_YES:
|
||||
self.switch_page(self.PACKAGE_GENERATING)
|
||||
self.generate_packages_async()
|
||||
else:
|
||||
self.switch_page(self.PACKAGE_SELECTION)
|
||||
else:
|
||||
@@ -930,17 +1119,9 @@ class Builder(gtk.Window):
|
||||
def show_recipes(self):
|
||||
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):
|
||||
self.switch_page(self.BASEIMG_SELECTED)
|
||||
|
||||
def stop_parse(self):
|
||||
self.handler.cancel_parse()
|
||||
|
||||
def stop_build(self):
|
||||
if self.stopping:
|
||||
lbl = "<b>Force Stop build?</b>\nYou've already selected Stop once,"
|
||||
@@ -974,6 +1155,6 @@ class Builder(gtk.Window):
|
||||
if response != gtk.RESPONSE_CANCEL:
|
||||
self.stopping = True
|
||||
if response == gtk.RESPONSE_OK:
|
||||
self.handler.cancel_build()
|
||||
self.cancel_build_sync()
|
||||
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.hobwidget import hcc, hic, HobViewTable, HobInfoButton, HobButton, HobAltButton, HobIconChecker
|
||||
from bb.ui.crumbs.progressbar import HobProgressBar
|
||||
import bb.ui.crumbs.utils
|
||||
|
||||
"""
|
||||
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.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)
|
||||
|
||||
rootfs_vbox = gtk.VBox(False, 6)
|
||||
@@ -195,8 +196,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
if curr_package_format:
|
||||
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)
|
||||
rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip_combo)
|
||||
rootfs_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
|
||||
|
||||
extra_vbox = gtk.VBox(False, 6)
|
||||
@@ -214,8 +214,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
check_button.set_active(is_active)
|
||||
check_hbox.pack_start(check_button, expand=False, fill=False)
|
||||
|
||||
tooltip = "Extra package formats to build"
|
||||
info = HobInfoButton(tooltip, self)
|
||||
info = HobInfoButton(tooltip_extra, self)
|
||||
check_hbox.pack_end(info, expand=False, fill=False)
|
||||
|
||||
rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
|
||||
@@ -337,19 +336,30 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
self.setting_store = None
|
||||
self.image_types_checkbuttons = {}
|
||||
|
||||
self.variables = {}
|
||||
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.md5 = self.config_md5()
|
||||
self.settings_changed = False
|
||||
|
||||
# create visual elements on the dialog
|
||||
self.create_visual_elements()
|
||||
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))
|
||||
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):
|
||||
self.nb = gtk.Notebook()
|
||||
self.nb.set_show_tabs(True)
|
||||
@@ -372,7 +382,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
table = gtk.Table(rows + 1, 10, True)
|
||||
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)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select image types:</span>")
|
||||
table.attach(label, 0, 9, 0, 1)
|
||||
@@ -382,9 +392,12 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
j = 1
|
||||
for image_type in self.image_types:
|
||||
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)
|
||||
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)
|
||||
i += 1
|
||||
if i > rows:
|
||||
@@ -399,26 +412,26 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Packaging Format:</span>")
|
||||
tooltip = "Select package formats that will be used. "
|
||||
tooltip += "The first format will be used for final image"
|
||||
pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Packaging format:</span>")
|
||||
tooltip_combo = "Selects the package format used to generate rootfs."
|
||||
tooltip_extra = "Selects extra package formats to build"
|
||||
pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats, tooltip_combo, tooltip_extra)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Image Rootfs Size: (MB)</span>")
|
||||
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\"."
|
||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 1024, tooltip)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Image rootfs size: (MB)</span>")
|
||||
tooltip = "Sets the basic size of your target image.\nThis is the basic size of your target image unless your selected package size exceeds this value or you select \'Image Extra Size\'."
|
||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(rootfs_size_widget, expand=False, fill=False)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">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."
|
||||
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 1024, tooltip)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Image extra size: (MB)</span>")
|
||||
tooltip = "Sets the extra free space of your target image.\nBy default, the system reserves 30% of your image size as free space. If your image contains zypper, it brings in 50MB more space. The maximum free space is 64GB."
|
||||
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 65536, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(extra_size_widget, expand=False, fill=False)
|
||||
|
||||
@@ -432,12 +445,12 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
|
||||
sub_hbox = gtk.HBox(False, 6)
|
||||
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_active(self.configuration.toolchain_build)
|
||||
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)
|
||||
sub_hbox.pack_start(sdk_machine_widget, expand=False, fill=False)
|
||||
|
||||
@@ -449,31 +462,35 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select Distro:</span>")
|
||||
tooltip = "This is the Yocto distribution you would like to use"
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select distro:</span>")
|
||||
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)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(distro_widget, expand=False, fill=False)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">BB_NUMBER_THREADS:</span>")
|
||||
tooltip = "Sets the number of threads that bitbake tasks can run simultaneously"
|
||||
label = self.gen_label_widget("<span weight=\"bold\">BB number threads:</span>")
|
||||
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)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(bbthread_widget, expand=False, fill=False)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">PARALLEL_MAKE:</span>")
|
||||
tooltip = "Sets the make parallism, as known as 'make -j'"
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Parallel make:</span>")
|
||||
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)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(pmake_widget, expand=False, fill=False)
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">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"
|
||||
dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
@@ -481,7 +498,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE Directory:</span>")
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE directory:</span>")
|
||||
tooltip = "Select a folder that caches your prebuilt results"
|
||||
sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
@@ -489,8 +506,8 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE Mirror:</span>")
|
||||
tooltip = "Select the prebuilt mirror that will fasten your build speed"
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Select SSTATE mirror:</span>")
|
||||
tooltip = "Select the pre-built mirror that will speed your build"
|
||||
sstatemirror_widget, self.sstatemirror_text = self.gen_entry_widget(self.configuration.sstatemirror, self, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(sstatemirror_widget, expand=False, fill=False)
|
||||
@@ -503,7 +520,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
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_active(self.enable_proxy)
|
||||
self.proxy_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)
|
||||
@@ -566,7 +583,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
sub_vbox = gtk.VBox(False, 6)
|
||||
advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
|
||||
label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
|
||||
tooltip = "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)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(setting_widget, expand=True, fill=True)
|
||||
@@ -589,15 +606,12 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
self.cvs_proxy_text.set_sensitive(self.enable_proxy)
|
||||
|
||||
def response_cb(self, dialog, response_id):
|
||||
self.variables = {}
|
||||
|
||||
package_format = []
|
||||
package_format.append(self.rootfs_combo.get_active_text())
|
||||
for child in self.check_hbox:
|
||||
if isinstance(child, gtk.CheckButton) and child.get_active():
|
||||
package_format.append(child.get_label())
|
||||
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.dldir = self.dldir_text.get_text()
|
||||
@@ -608,11 +622,11 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
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_fstypes = []
|
||||
self.configuration.image_fstypes = ""
|
||||
for image_type in self.image_types:
|
||||
if self.image_types_checkbuttons[image_type].get_active():
|
||||
self.configuration.image_fstypes.append(image_type)
|
||||
self.variables["IMAGE_FSTYPES"] = self.configuration.image_fstypes
|
||||
self.configuration.image_fstypes += (" " + image_type)
|
||||
self.configuration.image_fstypes.strip()
|
||||
|
||||
if self.gplv3_checkbox.get_active():
|
||||
if "GPLv3" not in self.configuration.incompat_license.split():
|
||||
@@ -622,7 +636,6 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
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 = self.configuration.incompat_license.strip()
|
||||
self.variables["INCOMPATIBLE_LICENSE"] = self.configuration.incompat_license
|
||||
|
||||
self.configuration.toolchain_build = self.toolchain_checkbox.get_active()
|
||||
|
||||
@@ -632,7 +645,6 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
key = self.setting_store.get_value(it, 0)
|
||||
value = self.setting_store.get_value(it, 1)
|
||||
self.configuration.extra_setting[key] = value
|
||||
self.variables[key] = value
|
||||
it = self.setting_store.iter_next(it)
|
||||
|
||||
self.configuration.all_proxy = self.all_proxy_text.get_text()
|
||||
@@ -642,7 +654,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
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(':')
|
||||
|
||||
md5 = hashlib.md5(str(sorted(self.variables.items()))).hexdigest()
|
||||
md5 = self.config_md5()
|
||||
self.settings_changed = (self.md5 != md5)
|
||||
|
||||
#
|
||||
@@ -731,11 +743,12 @@ class DeployImageDialog (CrumbsDialog):
|
||||
if response_id == gtk.RESPONSE_YES:
|
||||
combo_item = self.usb_combo.get_active_text()
|
||||
if combo_item and combo_item != self.__dummy_usb__:
|
||||
cmdline = "/usr/bin/xterm -e "
|
||||
cmdline += "\"sudo dd if=" + self.image_path + " of=" + combo_item + "; bash\""
|
||||
subprocess.Popen(args=shlex.split(cmdline))
|
||||
cmdline = bb.ui.crumbs.utils.which_terminal()
|
||||
if 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.set_title(title)
|
||||
self.progress_bar.set_rcstyle(status)
|
||||
@@ -952,7 +965,10 @@ class LayerSelectionDialog (CrumbsDialog):
|
||||
layers.append(model.get_value(it, 0))
|
||||
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
|
||||
|
||||
"""
|
||||
@@ -1091,7 +1107,7 @@ class ImageSelectionDialog (CrumbsDialog):
|
||||
for image_type in self.image_types:
|
||||
for real_image_type in hcc.SUPPORTED_IMAGE_TYPES[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)
|
||||
|
||||
for image in imageset:
|
||||
|
||||
@@ -21,17 +21,15 @@
|
||||
class HobColors:
|
||||
WHITE = "#ffffff"
|
||||
PALE_GREEN = "#aaffaa"
|
||||
ORANGE = "#ff7c24"
|
||||
ORANGE = "#eb8e68"
|
||||
PALE_RED = "#ffaaaa"
|
||||
GRAY = "#aaaaaa"
|
||||
LIGHT_GRAY = "#dddddd"
|
||||
DEEP_GRAY = "#7c7c77"
|
||||
SLIGHT_DARK = "#5f5f5f"
|
||||
DARK = "#3c3b37"
|
||||
BLACK = "#000000"
|
||||
LIGHT_ORANGE = "#f7a787"
|
||||
YELLOW = "#ffff00"
|
||||
PALE_BLUE = "#53b8ff"
|
||||
DEEP_RED = "#aa3e3e"
|
||||
|
||||
OK = WHITE
|
||||
RUNNING = PALE_GREEN
|
||||
|
||||
@@ -30,9 +30,6 @@ class HobHandler(gobject.GObject):
|
||||
This object does BitBake event handling for the hob gui.
|
||||
"""
|
||||
__gsignals__ = {
|
||||
"layers-updated" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
"package-formats-updated" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
@@ -62,7 +59,7 @@ class HobHandler(gobject.GObject):
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
}
|
||||
|
||||
(PARSE_CONFIG, GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(6)
|
||||
(GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(5)
|
||||
(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)
|
||||
|
||||
def __init__(self, server, recipe_model, package_model):
|
||||
@@ -94,6 +91,15 @@ class HobHandler(gobject.GObject):
|
||||
self.emit("data-generated")
|
||||
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):
|
||||
if initcmd != None:
|
||||
self.initcmd = initcmd
|
||||
@@ -108,37 +114,37 @@ class HobHandler(gobject.GObject):
|
||||
return
|
||||
|
||||
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:
|
||||
self.server.runCommand(["findConfigFiles", "DISTRO"])
|
||||
self.runCommand(["findConfigFiles", "DISTRO"])
|
||||
elif next_command == self.SUB_FILES_MACH:
|
||||
self.server.runCommand(["findConfigFiles", "MACHINE"])
|
||||
self.runCommand(["findConfigFiles", "MACHINE"])
|
||||
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:
|
||||
self.server.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
|
||||
self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
|
||||
elif next_command == self.SUB_PARSE_CONFIG:
|
||||
self.server.runCommand(["parseConfigurationFiles", "", ""])
|
||||
self.runCommand(["parseConfigurationFiles", "", ""])
|
||||
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:
|
||||
self.server.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
|
||||
self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
|
||||
elif next_command == self.SUB_BUILD_RECIPES:
|
||||
self.clear_busy()
|
||||
self.building = True
|
||||
self.server.runCommand(["buildTargets", self.recipe_queue, "build"])
|
||||
self.runCommand(["buildTargets", self.recipe_queue, self.default_task])
|
||||
self.recipe_queue = []
|
||||
elif next_command == self.SUB_BUILD_IMAGE:
|
||||
self.clear_busy()
|
||||
self.building = True
|
||||
targets = ["hob-image"]
|
||||
self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
|
||||
self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
|
||||
if self.toolchain_build:
|
||||
pkgs = self.package_queue + [i+'-dev' for i in self.package_queue] + [i+'-dbg' for i in self.package_queue]
|
||||
self.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(pkgs)])
|
||||
targets.append("hob-toolchain")
|
||||
self.server.runCommand(["buildTargets", targets, "build"])
|
||||
targets = [self.image]
|
||||
if self.package_queue:
|
||||
self.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
|
||||
self.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
|
||||
if self.toolchain_packages:
|
||||
self.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)])
|
||||
targets.append(self.toolchain)
|
||||
self.runCommand(["buildTargets", targets, self.default_task])
|
||||
|
||||
def handle_event(self, event):
|
||||
if not event:
|
||||
@@ -152,7 +158,7 @@ class HobHandler(gobject.GObject):
|
||||
self.package_model.populate(event._pkginfolist)
|
||||
self.run_next_command()
|
||||
|
||||
elif(isinstance(event, logging.LogRecord)):
|
||||
elif isinstance(event, logging.LogRecord):
|
||||
if event.levelno >= logging.ERROR:
|
||||
self.error_msg += event.msg + '\n'
|
||||
|
||||
@@ -160,10 +166,6 @@ class HobHandler(gobject.GObject):
|
||||
self.current_phase = "data generation"
|
||||
if event._model:
|
||||
self.recipe_model.populate(event._model)
|
||||
elif isinstance(event, bb.event.CoreBaseFilesFound):
|
||||
self.current_phase = "configuration lookup"
|
||||
paths = event._paths
|
||||
self.emit('layers-updated', paths)
|
||||
elif isinstance(event, bb.event.ConfigFilesFound):
|
||||
self.current_phase = "configuration lookup"
|
||||
var = event._variable
|
||||
@@ -187,29 +189,9 @@ class HobHandler(gobject.GObject):
|
||||
elif isinstance(event, bb.command.CommandCompleted):
|
||||
self.current_phase = None
|
||||
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):
|
||||
self.commands_async = []
|
||||
self.clear_busy()
|
||||
self.emit("command-failed", self.error_msg)
|
||||
self.error_msg = ""
|
||||
elif isinstance(event, (bb.event.ParseStarted,
|
||||
@@ -244,100 +226,94 @@ class HobHandler(gobject.GObject):
|
||||
return
|
||||
|
||||
def init_cooker(self):
|
||||
self.server.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()
|
||||
self.runCommand(["initCooker"])
|
||||
|
||||
def set_extra_inherit(self, bbclass):
|
||||
inherits = self.server.runCommand(["getVariable", "INHERIT"]) or ""
|
||||
inherits = self.runCommand(["getVariable", "INHERIT"]) or ""
|
||||
inherits = inherits + " " + bbclass
|
||||
self.server.runCommand(["setVariable", "INHERIT", inherits])
|
||||
self.runCommand(["setVariable", "INHERIT", inherits])
|
||||
|
||||
def set_bblayers(self, bblayers):
|
||||
self.server.runCommand(["setVariable", "BBLAYERS", " ".join(bblayers)])
|
||||
self.runCommand(["setVariable", "BBLAYERS_HOB", " ".join(bblayers)])
|
||||
|
||||
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):
|
||||
self.server.runCommand(["setVariable", "SDKMACHINE", sdk_machine])
|
||||
self.runCommand(["setVariable", "SDKMACHINE_HOB", sdk_machine])
|
||||
|
||||
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):
|
||||
if distro != "defaultsetup":
|
||||
self.server.runCommand(["setVariable", "DISTRO", distro])
|
||||
self.runCommand(["setVariable", "DISTRO_HOB", distro])
|
||||
|
||||
def set_package_format(self, format):
|
||||
package_classes = ""
|
||||
for pkgfmt in format.split():
|
||||
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):
|
||||
self.server.runCommand(["setVariable", "BB_NUMBER_THREADS", threads])
|
||||
self.runCommand(["setVariable", "BB_NUMBER_THREADS_HOB", threads])
|
||||
|
||||
def set_pmake(self, 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):
|
||||
self.server.runCommand(["setVariable", "DL_DIR", directory])
|
||||
self.runCommand(["setVariable", "DL_DIR_HOB", 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):
|
||||
self.server.runCommand(["setVariable", "SSTATE_MIRROR", url])
|
||||
self.runCommand(["setVariable", "SSTATE_MIRROR_HOB", url])
|
||||
|
||||
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):
|
||||
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):
|
||||
self.server.runCommand(["setVariable", "INCOMPATIBLE_LICENSE", incompat_license])
|
||||
self.runCommand(["setVariable", "INCOMPATIBLE_LICENSE_HOB", incompat_license])
|
||||
|
||||
def set_extra_config(self, extra_setting):
|
||||
for key in extra_setting.keys():
|
||||
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):
|
||||
self.server.runCommand(["setVariable", "http_proxy", http_proxy])
|
||||
self.runCommand(["setVariable", "http_proxy", http_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):
|
||||
self.server.runCommand(["setVariable", "ftp_proxy", ftp_proxy])
|
||||
self.runCommand(["setVariable", "ftp_proxy", ftp_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):
|
||||
self.server.runCommand(["setVariable", "GIT_PROXY_HOST", host])
|
||||
self.server.runCommand(["setVariable", "GIT_PROXY_PORT", port])
|
||||
self.runCommand(["setVariable", "GIT_PROXY_HOST", host])
|
||||
self.runCommand(["setVariable", "GIT_PROXY_PORT", port])
|
||||
|
||||
def set_cvs_proxy(self, host, port):
|
||||
self.server.runCommand(["setVariable", "CVS_PROXY_HOST", host])
|
||||
self.server.runCommand(["setVariable", "CVS_PROXY_PORT", port])
|
||||
self.runCommand(["setVariable", "CVS_PROXY_HOST", host])
|
||||
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.run_next_command(self.POPULATE_PACKAGEINFO)
|
||||
|
||||
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_FILES_DISTRO)
|
||||
self.commands_async.append(self.SUB_FILES_MACH)
|
||||
@@ -350,132 +326,168 @@ class HobHandler(gobject.GObject):
|
||||
self.commands_async.append(self.SUB_GNERATE_TGTS)
|
||||
self.run_next_command(self.GENERATE_RECIPES)
|
||||
|
||||
def generate_packages(self, tgts):
|
||||
def generate_packages(self, tgts, default_task="build"):
|
||||
targets = []
|
||||
targets.extend(tgts)
|
||||
self.recipe_queue = targets
|
||||
self.default_task = default_task
|
||||
self.commands_async.append(self.SUB_PARSE_CONFIG)
|
||||
self.commands_async.append(self.SUB_BUILD_RECIPES)
|
||||
self.run_next_command(self.GENERATE_PACKAGES)
|
||||
|
||||
def generate_image(self, tgts, toolchain_build=False):
|
||||
self.package_queue = tgts
|
||||
self.toolchain_build = toolchain_build
|
||||
def generate_image(self, image, toolchain, image_packages=[], toolchain_packages=[], default_task="build"):
|
||||
self.image = image
|
||||
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_BUILD_IMAGE)
|
||||
self.run_next_command(self.GENERATE_IMAGE)
|
||||
|
||||
def build_succeeded_async(self):
|
||||
self.building = False
|
||||
|
||||
def build_failed_async(self):
|
||||
self.initcmd = None
|
||||
self.commands_async = []
|
||||
self.building = False
|
||||
|
||||
def cancel_parse(self):
|
||||
self.server.runCommand(["stateStop"])
|
||||
self.runCommand(["stateStop"])
|
||||
|
||||
def cancel_build(self, force=False):
|
||||
if force:
|
||||
# Force the cooker to stop as quickly as possible
|
||||
self.server.runCommand(["stateStop"])
|
||||
self.runCommand(["stateStop"])
|
||||
else:
|
||||
# Wait for tasks to complete before shutting down, this helps
|
||||
# leave the workdir in a usable state
|
||||
self.server.runCommand(["stateShutdown"])
|
||||
self.runCommand(["stateShutdown"])
|
||||
|
||||
def reset_build(self):
|
||||
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):
|
||||
# retrieve the parameters from bitbake
|
||||
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"
|
||||
params["layer"] = (self.server.runCommand(["getVariable", "BBLAYERS"]) or "") + " " + hob_layer
|
||||
params["dldir"] = self.server.runCommand(["getVariable", "DL_DIR"]) or ""
|
||||
params["machine"] = self.server.runCommand(["getVariable", "MACHINE"]) or ""
|
||||
params["distro"] = self.server.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
|
||||
params["pclass"] = self.server.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
|
||||
params["sstatedir"] = self.server.runCommand(["getVariable", "SSTATE_DIR"]) or ""
|
||||
params["sstatemirror"] = self.server.runCommand(["getVariable", "SSTATE_MIRROR"]) or ""
|
||||
params["layer"] = self.runCommand(["getVariable", "BBLAYERS"]) or ""
|
||||
if hob_layer not in params["layer"].split():
|
||||
params["layer"] += (" " + hob_layer)
|
||||
params["dldir"] = self.runCommand(["getVariable", "DL_DIR"]) or ""
|
||||
params["machine"] = self.runCommand(["getVariable", "MACHINE"]) or ""
|
||||
params["distro"] = self.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
|
||||
params["pclass"] = self.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
|
||||
params["sstatedir"] = self.runCommand(["getVariable", "SSTATE_DIR"]) or ""
|
||||
params["sstatemirror"] = self.runCommand(["getVariable", "SSTATE_MIRROR"]) or ""
|
||||
|
||||
num_threads = self.server.runCommand(["getCpuCount"])
|
||||
num_threads = self.runCommand(["getCpuCount"])
|
||||
if not num_threads:
|
||||
num_threads = 1
|
||||
max_threads = 65536
|
||||
else:
|
||||
num_threads = int(num_threads)
|
||||
max_threads = 16 * num_threads
|
||||
try:
|
||||
num_threads = int(num_threads)
|
||||
max_threads = 16 * num_threads
|
||||
except:
|
||||
num_threads = 1
|
||||
max_threads = 65536
|
||||
params["max_threads"] = max_threads
|
||||
|
||||
bbthread = self.server.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
||||
bbthread = self.runCommand(["getVariable", "BB_NUMBER_THREADS"])
|
||||
if not bbthread:
|
||||
bbthread = num_threads
|
||||
else:
|
||||
bbthread = int(bbthread)
|
||||
try:
|
||||
bbthread = int(bbthread)
|
||||
except:
|
||||
bbthread = num_threads
|
||||
params["bbthread"] = bbthread
|
||||
|
||||
pmake = self.server.runCommand(["getVariable", "PARALLEL_MAKE"])
|
||||
pmake = self.runCommand(["getVariable", "PARALLEL_MAKE"])
|
||||
if not pmake:
|
||||
pmake = num_threads
|
||||
elif isinstance(pmake, int):
|
||||
pass
|
||||
else:
|
||||
pmake = int(pmake.lstrip("-j "))
|
||||
params["pmake"] = pmake
|
||||
try:
|
||||
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:
|
||||
image_extra_size = 0
|
||||
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
|
||||
|
||||
image_rootfs_size = self.server.runCommand(["getVariable", "IMAGE_ROOTFS_SIZE"])
|
||||
image_rootfs_size = self.runCommand(["getVariable", "IMAGE_ROOTFS_SIZE"])
|
||||
if not image_rootfs_size:
|
||||
image_rootfs_size = 0
|
||||
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
|
||||
|
||||
image_overhead_factor = self.server.runCommand(["getVariable", "IMAGE_OVERHEAD_FACTOR"])
|
||||
image_overhead_factor = self.runCommand(["getVariable", "IMAGE_OVERHEAD_FACTOR"])
|
||||
if not image_overhead_factor:
|
||||
image_overhead_factor = 1
|
||||
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["incompat_license"] = self.server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or ""
|
||||
params["sdk_machine"] = self.server.runCommand(["getVariable", "SDKMACHINE"]) or self.server.runCommand(["getVariable", "SDK_ARCH"]) or ""
|
||||
params["incompat_license"] = self._remove_redundant(self.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) 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["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or ""
|
||||
params["conf_version"] = self.runCommand(["getVariable", "CONF_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_machine_patterns"] = self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or ""
|
||||
params["deployable_image_types"] = self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or ""
|
||||
params["tmpdir"] = self.server.runCommand(["getVariable", "TMPDIR"]) or ""
|
||||
params["distro_version"] = self.server.runCommand(["getVariable", "DISTRO_VERSION"]) or ""
|
||||
params["target_os"] = self.server.runCommand(["getVariable", "TARGET_OS"]) or ""
|
||||
params["target_arch"] = self.server.runCommand(["getVariable", "TARGET_ARCH"]) or ""
|
||||
params["tune_pkgarch"] = self.server.runCommand(["getVariable", "TUNE_PKGARCH"]) or ""
|
||||
params["bb_version"] = self.server.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
|
||||
params["tune_arch"] = self.server.runCommand(["getVariable", "TUNE_ARCH"]) or ""
|
||||
params["runnable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "")
|
||||
params["runnable_machine_patterns"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "")
|
||||
params["deployable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "")
|
||||
params["tmpdir"] = self.runCommand(["getVariable", "TMPDIR"]) or ""
|
||||
params["distro_version"] = self.runCommand(["getVariable", "DISTRO_VERSION"]) or ""
|
||||
params["target_os"] = self.runCommand(["getVariable", "TARGET_OS"]) or ""
|
||||
params["target_arch"] = self.runCommand(["getVariable", "TARGET_ARCH"]) or ""
|
||||
params["tune_pkgarch"] = self.runCommand(["getVariable", "TUNE_PKGARCH"]) or ""
|
||||
params["bb_version"] = self.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
|
||||
|
||||
params["git_proxy_host"] = self.server.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
|
||||
params["git_proxy_port"] = self.server.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
|
||||
params["default_task"] = self.runCommand(["getVariable", "BB_DEFAULT_TASK"]) or "build"
|
||||
|
||||
params["http_proxy"] = self.server.runCommand(["getVariable", "http_proxy"]) or ""
|
||||
params["ftp_proxy"] = self.server.runCommand(["getVariable", "ftp_proxy"]) or ""
|
||||
params["https_proxy"] = self.server.runCommand(["getVariable", "https_proxy"]) or ""
|
||||
params["all_proxy"] = self.server.runCommand(["getVariable", "all_proxy"]) or ""
|
||||
params["git_proxy_host"] = self.runCommand(["getVariable", "GIT_PROXY_HOST"]) or ""
|
||||
params["git_proxy_port"] = self.runCommand(["getVariable", "GIT_PROXY_PORT"]) or ""
|
||||
|
||||
params["cvs_proxy_host"] = self.server.runCommand(["getVariable", "CVS_PROXY_HOST"]) or ""
|
||||
params["cvs_proxy_port"] = self.server.runCommand(["getVariable", "CVS_PROXY_PORT"]) or ""
|
||||
params["http_proxy"] = self.runCommand(["getVariable", "http_proxy"]) 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
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
import gtk
|
||||
import gobject
|
||||
from bb.ui.crumbs.hobpages import HobPage
|
||||
|
||||
#
|
||||
# PackageListModel
|
||||
@@ -33,7 +34,7 @@ class PackageListModel(gtk.TreeStore):
|
||||
providing convenience functions to access gtk.TreeModel subclasses which
|
||||
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__ = {
|
||||
"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):
|
||||
|
||||
self.contents = None
|
||||
@@ -61,6 +64,7 @@ class PackageListModel(gtk.TreeStore):
|
||||
gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING,
|
||||
gobject.TYPE_BOOLEAN,
|
||||
gobject.TYPE_BOOLEAN)
|
||||
|
||||
|
||||
@@ -175,10 +179,8 @@ class PackageListModel(gtk.TreeStore):
|
||||
if pkgsize == "0" and not allow_empty:
|
||||
continue
|
||||
|
||||
if len(pkgsize) > 3:
|
||||
size = '%.1f' % (int(pkgsize)*1.0/1024) + ' MB'
|
||||
else:
|
||||
size = pkgsize + ' KB'
|
||||
# pkgsize is in KB
|
||||
size = HobPage._size_to_string(HobPage._string_to_size(pkgsize + ' KB'))
|
||||
|
||||
it = self.append(pniter)
|
||||
self.pkg_path[pkg] = self.get_path(it)
|
||||
@@ -342,6 +344,23 @@ class PackageListModel(gtk.TreeStore):
|
||||
self.selection_change_notification()
|
||||
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):
|
||||
packagelist = []
|
||||
|
||||
@@ -357,8 +376,24 @@ class PackageListModel(gtk.TreeStore):
|
||||
|
||||
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):
|
||||
packages_size = 0
|
||||
@@ -371,16 +406,11 @@ class PackageListModel(gtk.TreeStore):
|
||||
if not str_size:
|
||||
continue
|
||||
|
||||
unit = str_size.split()
|
||||
if unit[1] == 'MB':
|
||||
size = float(unit[0])*1024
|
||||
else:
|
||||
size = float(unit[0])
|
||||
packages_size += size
|
||||
packages_size += HobPage._string_to_size(str_size)
|
||||
|
||||
child_it = self.iter_next(child_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
|
||||
@@ -400,6 +430,19 @@ class PackageListModel(gtk.TreeStore):
|
||||
|
||||
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
|
||||
#
|
||||
@@ -410,7 +453,7 @@ class RecipeListModel(gtk.ListStore):
|
||||
providing convenience functions to access gtk.TreeModel subclasses which
|
||||
provide filtered views of the data.
|
||||
"""
|
||||
(COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_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"
|
||||
|
||||
@@ -434,7 +477,8 @@ class RecipeListModel(gtk.ListStore):
|
||||
gobject.TYPE_BOOLEAN,
|
||||
gobject.TYPE_BOOLEAN,
|
||||
gobject.TYPE_STRING,
|
||||
gobject.TYPE_STRING)
|
||||
gobject.TYPE_STRING,
|
||||
gobject.TYPE_BOOLEAN)
|
||||
|
||||
"""
|
||||
Find the model path for the item_name
|
||||
@@ -471,21 +515,25 @@ class RecipeListModel(gtk.ListStore):
|
||||
|
||||
return True
|
||||
|
||||
def sort_func(self, model, iter1, iter2):
|
||||
val1 = model.get_value(iter1, RecipeListModel.COL_NAME)
|
||||
val2 = model.get_value(iter2, RecipeListModel.COL_NAME)
|
||||
return val1 > val2
|
||||
def exclude_item_sort_func(self, model, iter1, iter2):
|
||||
val1 = model.get_value(iter1, RecipeListModel.COL_FADE_INC)
|
||||
val2 = model.get_value(iter2, RecipeListModel.COL_INC)
|
||||
return ((val1 == True) and (val2 == False))
|
||||
|
||||
"""
|
||||
Create, if required, and return a filtered gtk.TreeModelSort
|
||||
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.set_visible_func(self.tree_model_filter, filter)
|
||||
|
||||
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
|
||||
|
||||
def convert_vpath_to_path(self, view_model, view_path):
|
||||
@@ -517,7 +565,9 @@ class RecipeListModel(gtk.ListStore):
|
||||
|
||||
# dummy image for prompt
|
||||
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_DEPS, "", self.COL_BINB, "",
|
||||
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, [])
|
||||
|
||||
if ('task-' in name):
|
||||
if ('lib32-' in name or 'lib64-' in name):
|
||||
atype = 'mltask'
|
||||
else:
|
||||
atype = 'task'
|
||||
atype = 'task'
|
||||
elif ('image.bbclass' in " ".join(inherits)):
|
||||
if name != "hob-image":
|
||||
atype = 'image'
|
||||
@@ -547,10 +594,7 @@ class RecipeListModel(gtk.ListStore):
|
||||
elif (name == 'dummy-image' or name == 'dummy-toolchain'):
|
||||
atype = 'dummy'
|
||||
else:
|
||||
if ('lib32-' in name or 'lib64-' in name):
|
||||
atype = 'mlrecipe'
|
||||
else:
|
||||
atype = 'recipe'
|
||||
atype = 'recipe'
|
||||
|
||||
self.set(self.append(), self.COL_NAME, item, self.COL_DESC, desc,
|
||||
self.COL_LIC, lic, self.COL_GROUP, group,
|
||||
@@ -575,22 +619,6 @@ class RecipeListModel(gtk.ListStore):
|
||||
def path_included(self, item_path):
|
||||
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
|
||||
"""
|
||||
|
||||
@@ -35,7 +35,7 @@ class HobPage (gtk.VBox):
|
||||
self.builder_width, self.builder_height = self.builder.size_request()
|
||||
|
||||
if not title:
|
||||
self.title = "HOB -- Image Creator"
|
||||
self.title = "Hob -- Image Creator"
|
||||
else:
|
||||
self.title = title
|
||||
|
||||
@@ -59,7 +59,7 @@ class HobPage (gtk.VBox):
|
||||
hbox = gtk.HBox()
|
||||
|
||||
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)
|
||||
|
||||
if widget:
|
||||
@@ -69,8 +69,8 @@ class HobPage (gtk.VBox):
|
||||
|
||||
return eventbox
|
||||
|
||||
def span_tag(self, px="12px", weight="normal", forground="#1c1c1c"):
|
||||
span_tag = "weight=\'%s\' foreground=\'%s\' font_desc=\'%s\'" % (weight, forground, px)
|
||||
def span_tag(self, size="medium", weight="normal", forground="#1c1c1c"):
|
||||
span_tag = "weight='%s' foreground='%s' size='%s'" % (weight, forground, size)
|
||||
return span_tag
|
||||
|
||||
def append_toolbar_button(self, toolbar, buttonname, icon_disp, icon_hovor, tip, cb):
|
||||
@@ -83,3 +83,42 @@ class HobPage (gtk.VBox):
|
||||
tip_text = tip
|
||||
button = toolbar.append_item(buttonname, tip, None, icon, cb)
|
||||
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_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_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_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'))
|
||||
@@ -60,6 +60,7 @@ class hic:
|
||||
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_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:
|
||||
|
||||
@@ -104,6 +105,11 @@ class HobViewTable (gtk.VBox):
|
||||
gobject.TYPE_NONE,
|
||||
(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):
|
||||
@@ -126,6 +132,8 @@ class HobViewTable (gtk.VBox):
|
||||
col.set_min_width(column['col_min'])
|
||||
if 'col_max' in column.keys():
|
||||
col.set_max_width(column['col_max'])
|
||||
if 'expand' in column.keys():
|
||||
col.set_expand(True)
|
||||
self.table_tree.append_column(col)
|
||||
|
||||
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.set_attributes(cell, text=column['col_id'])
|
||||
elif column['col_style'] == 'check toggle':
|
||||
cell = gtk.CellRendererToggle()
|
||||
cell = HobCellRendererToggle()
|
||||
cell.set_property('activatable', True)
|
||||
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
|
||||
col.pack_end(cell, True)
|
||||
col.set_attributes(cell, active=column['col_id'])
|
||||
@@ -149,13 +158,26 @@ class HobViewTable (gtk.VBox):
|
||||
col.pack_end(cell, True)
|
||||
col.set_attributes(cell, active=column['col_id'])
|
||||
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.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
|
||||
scroll.set_shadow_type(gtk.SHADOW_IN)
|
||||
scroll.add(self.table_tree)
|
||||
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):
|
||||
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:
|
||||
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
|
||||
provided state.
|
||||
@@ -240,7 +265,7 @@ class HobAltButton(gtk.Button):
|
||||
"""
|
||||
@staticmethod
|
||||
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)
|
||||
else:
|
||||
HobAltButton.set_text(button, True)
|
||||
@@ -254,7 +279,7 @@ class HobAltButton(gtk.Button):
|
||||
colour = HobColors.PALE_BLUE
|
||||
else:
|
||||
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)
|
||||
|
||||
@staticmethod
|
||||
@@ -281,7 +306,7 @@ class HobImageButton(gtk.Button):
|
||||
self.icon_path = icon_path
|
||||
self.hover_icon_path = hover_icon_path
|
||||
|
||||
hbox = gtk.HBox(False, 3)
|
||||
hbox = gtk.HBox(False, 10)
|
||||
hbox.show()
|
||||
self.add(hbox)
|
||||
self.icon = gtk.Image()
|
||||
@@ -295,7 +320,7 @@ class HobImageButton(gtk.Button):
|
||||
label = gtk.Label()
|
||||
label.set_alignment(0.0, 0.5)
|
||||
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.show()
|
||||
hbox.pack_start(label, True, True, 0)
|
||||
@@ -400,6 +425,7 @@ class HobTabBar(gtk.DrawingArea):
|
||||
self.connect("expose-event", self.on_draw)
|
||||
self.connect("button-press-event", self.button_pressed_cb)
|
||||
self.connect("button-release-event", self.button_released_cb)
|
||||
self.connect("query-tooltip", self.query_tooltip_cb)
|
||||
self.show_all()
|
||||
|
||||
def button_released_cb(self, widget, event):
|
||||
@@ -463,7 +489,7 @@ class HobTabBar(gtk.DrawingArea):
|
||||
child["g"] = color.green
|
||||
child["b"] = color.blue
|
||||
|
||||
def append_tab_child(self, title, page):
|
||||
def append_tab_child(self, title, page, tooltip=""):
|
||||
num = len(self.children) + 1
|
||||
self.tab_width = self.tab_width * len(self.children) / num
|
||||
|
||||
@@ -488,8 +514,11 @@ class HobTabBar(gtk.DrawingArea):
|
||||
"title" : title,
|
||||
"indicator_show" : False,
|
||||
"indicator_number" : 0,
|
||||
"tooltip_markup" : tooltip,
|
||||
}
|
||||
self.children.append(new_one)
|
||||
if tooltip and (not self.props.has_tooltip):
|
||||
self.props.has_tooltip = True
|
||||
# set the default current child
|
||||
if not self.current_child:
|
||||
self.current_child = new_one
|
||||
@@ -558,7 +587,10 @@ class HobTabBar(gtk.DrawingArea):
|
||||
off_y = (self.tab_height - fonth) / 2
|
||||
x = child["x"] + off_x
|
||||
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):
|
||||
if not self.current_child:
|
||||
@@ -616,7 +648,10 @@ class HobTabBar(gtk.DrawingArea):
|
||||
y = tab_y + self.tab_height/2 - 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
|
||||
back_round_can_contain_width = float(2 * r * 0.707)
|
||||
if float(textw) > back_round_can_contain_width:
|
||||
@@ -635,7 +670,7 @@ class HobTabBar(gtk.DrawingArea):
|
||||
x = x + (dest_w/2)-(textw/2)
|
||||
y = y + (dest_h/2) - (texth/2)
|
||||
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):
|
||||
child["indicator_show"] = True
|
||||
@@ -652,6 +687,18 @@ class HobTabBar(gtk.DrawingArea):
|
||||
|
||||
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):
|
||||
|
||||
def __init__(self):
|
||||
@@ -736,13 +783,15 @@ class HobNotebook(gtk.VBox):
|
||||
if not notebook:
|
||||
return
|
||||
title = notebook.get_tab_label_text(notebook_child)
|
||||
label = notebook.get_tab_label(notebook_child)
|
||||
tooltip_markup = label.get_tooltip_markup()
|
||||
if not title:
|
||||
return
|
||||
for child in self.tabbar.children:
|
||||
if child["title"] == title:
|
||||
child["toggled_page"] = page
|
||||
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=""):
|
||||
for child in self.tabbar.children:
|
||||
@@ -820,7 +869,7 @@ class HobIconChecker(hic):
|
||||
"""
|
||||
def check_stock_icon(self, 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-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,
|
||||
@@ -836,14 +885,23 @@ class HobIconChecker(hic):
|
||||
|
||||
return valid_stock_id
|
||||
|
||||
class RefreshRuningController(gobject.GObject):
|
||||
def __init__(self, widget=None, iter=None):
|
||||
class HobCellRendererController(gobject.GObject):
|
||||
(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)
|
||||
self.timeout_id = None
|
||||
self.current_angle_pos = 0.0
|
||||
self.step_angle = 0.0
|
||||
self.tree_headers_height = 0
|
||||
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):
|
||||
if self.timeout_id:
|
||||
@@ -851,10 +909,10 @@ class RefreshRuningController(gobject.GObject):
|
||||
else:
|
||||
return False
|
||||
|
||||
def reset(self):
|
||||
self.force_stop(True)
|
||||
def reset_run(self):
|
||||
self.force_stop()
|
||||
self.running_cell_areas = []
|
||||
self.current_angle_pos = 0.0
|
||||
self.timeout_id = None
|
||||
self.step_angle = 0.0
|
||||
|
||||
''' 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.make_image_on_progressing_cb, 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:
|
||||
gobject.source_remove(self.timeout_id)
|
||||
self.timeout_id = None
|
||||
if self.running_cell_areas:
|
||||
self.running_cell_areas = []
|
||||
if gobject.source_remove(self.timeout_id):
|
||||
self.timeout_id = None
|
||||
|
||||
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:
|
||||
r = max(img_width/2, img_height/2)
|
||||
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.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):
|
||||
if tree and (tree.get_property("headers-visible") == True):
|
||||
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):
|
||||
self.current_angle_pos += self.step_angle
|
||||
if (self.current_angle_pos >= 1):
|
||||
self.current_angle_pos = self.step_angle
|
||||
if self.running_mode == self.MODE_CYCLE_RUNNING:
|
||||
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:
|
||||
tree.queue_draw_area(rect.x, rect.y + self.tree_headers_height, rect.width, rect.height)
|
||||
if self.is_queue_draw_row_area:
|
||||
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):
|
||||
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:
|
||||
self.running_cell_areas.remove(cell_area)
|
||||
if not self.running_cell_areas:
|
||||
self.reset()
|
||||
self.reset_run()
|
||||
|
||||
gobject.type_register(RefreshRuningController)
|
||||
gobject.type_register(HobCellRendererController)
|
||||
|
||||
class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
|
||||
def __init__(self):
|
||||
gtk.CellRendererPixbuf.__init__(self)
|
||||
self.control = RefreshRuningController()
|
||||
self.control = HobCellRendererController()
|
||||
# add icon checker for make the gtk-icon transfer to hob-icon
|
||||
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):
|
||||
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':
|
||||
self.control.append_running_cell_area(cell_area)
|
||||
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:
|
||||
self.control.start_run(200, 0, 0, 1000, 200, tree)
|
||||
else:
|
||||
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):
|
||||
if self.props.icon_name or self.props.pixbuf or self.props.stock_id:
|
||||
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
|
||||
|
||||
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")
|
||||
|
||||
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()
|
||||
|
||||
def create_visual_elements(self):
|
||||
@@ -49,19 +53,19 @@ class ImageConfigurationPage (HobPage):
|
||||
"Templates",
|
||||
hic.ICON_TEMPLATES_DISPLAY_FILE,
|
||||
hic.ICON_TEMPLATES_HOVER_FILE,
|
||||
"Load a hob building template saved before",
|
||||
"Load a previously saved template",
|
||||
self.template_button_clicked_cb)
|
||||
my_images_button = self.append_toolbar_button(self.toolbar,
|
||||
"My images",
|
||||
"Images",
|
||||
hic.ICON_IMAGES_DISPLAY_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)
|
||||
settings_button = self.append_toolbar_button(self.toolbar,
|
||||
"Settings",
|
||||
hic.ICON_SETTINGS_DISPLAY_FILE,
|
||||
hic.ICON_SETTINGS_HOVER_FILE,
|
||||
"Other advanced settings for build",
|
||||
"View additional build settings",
|
||||
self.settings_button_clicked_cb)
|
||||
|
||||
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.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.set_title(title)
|
||||
self.progress_bar.set_rcstyle(status)
|
||||
@@ -133,16 +137,17 @@ class ImageConfigurationPage (HobPage):
|
||||
def create_config_machine(self):
|
||||
self.machine_title = gtk.Label()
|
||||
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_desc = gtk.Label()
|
||||
self.machine_title_desc.set_alignment(0, 0.5)
|
||||
mark = ("<span %s>This is the profile of the target machine for which you"
|
||||
" are building the image.\n</span>") % (self.span_tag(px='14px'))
|
||||
self.machine_title_desc.set_alignment(0.0, 0.5)
|
||||
mark = ("<span %s>Your selection is the profile of the target machine for which you"
|
||||
" are building the image.\n</span>") % (self.span_tag('medium'))
|
||||
self.machine_title_desc.set_markup(mark)
|
||||
|
||||
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)
|
||||
|
||||
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 += "with your own functionality.\n"
|
||||
markup += "For more on layers, check the <a href=\""
|
||||
markup += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
|
||||
markup += "poky-ref-manual.html#usingpoky-changes-layers\">reference manual</a>."
|
||||
markup += "http://www.yoctoproject.org/docs/current/dev-manual/"
|
||||
markup += "dev-manual.html#understanding-and-using-layers\">reference manual</a>."
|
||||
self.layer_info_icon = HobInfoButton(markup, self.get_parent())
|
||||
|
||||
self.progress_box = gtk.HBox(False, 6)
|
||||
@@ -170,37 +175,38 @@ class ImageConfigurationPage (HobPage):
|
||||
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_desc, 0, 40, 4, 6)
|
||||
self.gtable.attach(self.machine_combo, 0, 12, 6, 9)
|
||||
self.gtable.attach(self.layer_button, 12, 36, 6, 11)
|
||||
self.gtable.attach(self.layer_info_icon, 36, 40, 6, 10)
|
||||
self.gtable.attach(self.machine_combo, 0, 12, 7, 10)
|
||||
self.gtable.attach(self.layer_button, 14, 36, 7, 12)
|
||||
self.gtable.attach(self.layer_info_icon, 36, 40, 7, 11)
|
||||
if show_progress_bar:
|
||||
self.gtable.attach(self.progress_box, 0, 40, 13, 17)
|
||||
self.gtable.attach(self.machine_separator, 0, 40, 12, 13)
|
||||
self.gtable.attach(self.progress_box, 0, 40, 15, 19)
|
||||
self.gtable.attach(self.machine_separator, 0, 40, 13, 14)
|
||||
|
||||
def create_config_baseimg(self):
|
||||
self.image_title = gtk.Label()
|
||||
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_desc = gtk.Label()
|
||||
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. "
|
||||
"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_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_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)
|
||||
|
||||
# button to view recipes
|
||||
icon_file = hic.ICON_RCIPE_DISPLAY_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",
|
||||
icon_file, hover_file)
|
||||
self.view_recipes_button.connect("clicked", self.view_recipes_button_clicked_cb)
|
||||
@@ -208,7 +214,7 @@ class ImageConfigurationPage (HobPage):
|
||||
# button to view packages
|
||||
icon_file = hic.ICON_PACKAGES_DISPLAY_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",
|
||||
icon_file, hover_file)
|
||||
self.view_packages_button.connect("clicked", self.view_packages_button_clicked_cb)
|
||||
@@ -216,24 +222,24 @@ class ImageConfigurationPage (HobPage):
|
||||
self.image_separator = gtk.HSeparator()
|
||||
|
||||
def set_config_baseimg_layout(self):
|
||||
self.gtable.attach(self.image_title, 0, 40, 13, 17)
|
||||
self.gtable.attach(self.image_title_desc, 0, 40, 18, 23)
|
||||
self.gtable.attach(self.image_combo, 0, 12, 24, 27)
|
||||
self.gtable.attach(self.image_desc, 14, 38, 24, 29)
|
||||
self.gtable.attach(self.image_title, 0, 40, 15, 17)
|
||||
self.gtable.attach(self.image_title_desc, 0, 40, 18, 22)
|
||||
self.gtable.attach(self.image_combo, 0, 12, 23, 26)
|
||||
self.gtable.attach(self.image_desc, 13, 38, 23, 28)
|
||||
self.gtable.attach(self.image_separator, 0, 40, 35, 36)
|
||||
|
||||
def set_rcppkg_layout(self):
|
||||
self.gtable.attach(self.view_recipes_button, 0, 20, 30, 35)
|
||||
self.gtable.attach(self.view_packages_button, 20, 40, 30, 35)
|
||||
self.gtable.attach(self.view_recipes_button, 0, 20, 28, 33)
|
||||
self.gtable.attach(self.view_packages_button, 20, 40, 28, 33)
|
||||
|
||||
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)
|
||||
|
||||
# create button "Just bake"
|
||||
just_bake_button = HobButton("Just bake")
|
||||
# create button "Build image"
|
||||
just_bake_button = HobButton("Build image")
|
||||
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)
|
||||
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)
|
||||
|
||||
# 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.set_tooltip_text("Build recipes into packages")
|
||||
button_box.pack_end(build_packages_button, expand=False, fill=False)
|
||||
|
||||
return button_box
|
||||
|
||||
def stop_button_clicked_cb(self, button):
|
||||
self.builder.stop_parse()
|
||||
self.builder.cancel_parse_sync()
|
||||
|
||||
def machine_combo_changed_cb(self, machine_combo):
|
||||
combo_item = machine_combo.get_active_text()
|
||||
@@ -256,8 +263,13 @@ class ImageConfigurationPage (HobPage):
|
||||
return
|
||||
|
||||
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
|
||||
self.builder.switch_page(self.builder.RCPPKGINFO_POPULATING)
|
||||
self.builder.populate_recipe_package_info_async()
|
||||
|
||||
def update_machine_combo(self):
|
||||
all_machines = self.builder.parameters.all_machines
|
||||
@@ -269,6 +281,7 @@ class ImageConfigurationPage (HobPage):
|
||||
self.machine_combo.set_active(-1)
|
||||
|
||||
def switch_machine_combo(self):
|
||||
self.machine_combo_changed_by_manual = False
|
||||
model = self.machine_combo.get_model()
|
||||
active = 0
|
||||
while active < len(model):
|
||||
@@ -278,6 +291,16 @@ class ImageConfigurationPage (HobPage):
|
||||
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):
|
||||
self.builder.update_recipe_model(selected_image, selected_recipes)
|
||||
self.builder.update_package_model(selected_packages)
|
||||
@@ -289,14 +312,14 @@ class ImageConfigurationPage (HobPage):
|
||||
if not selected_image:
|
||||
return
|
||||
|
||||
self.builder.customized = False
|
||||
|
||||
selected_recipes = []
|
||||
|
||||
image_path = self.builder.recipe_model.pn_path[selected_image]
|
||||
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()
|
||||
|
||||
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.update_image_desc(selected_image)
|
||||
|
||||
self.builder.recipe_model.reset()
|
||||
self.builder.package_model.reset()
|
||||
@@ -338,11 +361,17 @@ class ImageConfigurationPage (HobPage):
|
||||
active = cnt
|
||||
cnt = cnt + 1
|
||||
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(active)
|
||||
|
||||
if active != -1:
|
||||
self.show_baseimg_selected()
|
||||
|
||||
self._image_combo_connect_signal()
|
||||
|
||||
def layer_button_clicked_cb(self, button):
|
||||
# Create a layer selection dialog
|
||||
self.builder.show_layer_selection_dialog()
|
||||
@@ -360,11 +389,19 @@ class ImageConfigurationPage (HobPage):
|
||||
self.builder.build_packages()
|
||||
|
||||
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):
|
||||
self.builder.show_load_my_images_dialog()
|
||||
|
||||
def settings_button_clicked_cb(self, button):
|
||||
# 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")
|
||||
|
||||
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()
|
||||
|
||||
def create_visual_elements(self):
|
||||
@@ -122,12 +124,24 @@ class ImageDetailsPage (HobPage):
|
||||
self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
|
||||
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",
|
||||
"Images",
|
||||
hic.ICON_IMAGES_DISPLAY_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)
|
||||
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)
|
||||
|
||||
@@ -138,15 +152,9 @@ class ImageDetailsPage (HobPage):
|
||||
children = self.box_group_area.get_children() or []
|
||||
for child in children:
|
||||
self.box_group_area.remove(child)
|
||||
|
||||
def _size_to_string(self, size):
|
||||
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'
|
||||
return size_str
|
||||
children = self.details_bottom_buttons.get_children() or []
|
||||
for child in children:
|
||||
self.details_bottom_buttons.remove(child)
|
||||
|
||||
def show_page(self, step):
|
||||
build_succeeded = (step == self.builder.IMAGE_GENERATED)
|
||||
@@ -160,10 +168,15 @@ class ImageDetailsPage (HobPage):
|
||||
else:
|
||||
pkg_num = "N/A"
|
||||
|
||||
# remove
|
||||
for button_id, button in self.button_ids.items():
|
||||
button.disconnect(button_id)
|
||||
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)
|
||||
|
||||
self.build_result = None
|
||||
if build_succeeded:
|
||||
# building is the previous step
|
||||
icon = gtk.Image()
|
||||
@@ -173,26 +186,48 @@ class ImageDetailsPage (HobPage):
|
||||
icon.set_from_pixbuf(pix_buffer)
|
||||
varlist = [""]
|
||||
vallist = ["Your image is ready"]
|
||||
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.build_result = self.DetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
|
||||
self.box_group_area.pack_start(self.build_result, expand=False, fill=False)
|
||||
|
||||
# create the buttons at the bottom first because the buttons are used in apply_button_per_image()
|
||||
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
|
||||
self.image_store.clear()
|
||||
default_toggled = False
|
||||
default_image_size = 0
|
||||
i = 0
|
||||
for image_name in image_names:
|
||||
image_size = self._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)
|
||||
image_size = HobPage._size_to_string(os.stat(os.path.join(image_addr, image_name)).st_size)
|
||||
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.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)
|
||||
view_files_button = HobAltButton("View files")
|
||||
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
|
||||
layer_num_limit = 15
|
||||
varlist = ["Machine: ", "Base image: ", "Layers: "]
|
||||
vallist = []
|
||||
self.setting_detail = None
|
||||
if build_succeeded:
|
||||
vallist.append(machine)
|
||||
vallist.append(base_image)
|
||||
@@ -214,29 +249,27 @@ class ImageDetailsPage (HobPage):
|
||||
i += 1
|
||||
|
||||
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)
|
||||
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.setting_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_config_button)
|
||||
self.box_group_area.pack_start(self.setting_detail, expand=False, fill=False)
|
||||
|
||||
# Packages included, and Total image size
|
||||
varlist = ["Packages included: ", "Total image size: "]
|
||||
vallist = []
|
||||
vallist.append(pkg_num)
|
||||
vallist.append(image_size)
|
||||
vallist.append(default_image_size)
|
||||
if build_succeeded:
|
||||
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)
|
||||
else: # get to this page from "My images"
|
||||
edit_packages_button = None
|
||||
self.package_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_packages_button)
|
||||
self.box_group_area.pack_start(self.package_detail, expand=False, fill=False)
|
||||
|
||||
if build_succeeded:
|
||||
buttonlist = ["Build new image", "Save as template", "Run image", "Deploy image"]
|
||||
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)
|
||||
# pack the buttons at the bottom, at this time they are already created.
|
||||
self.box_group_area.pack_end(self.details_bottom_buttons, expand=False, fill=False)
|
||||
|
||||
self.show_all()
|
||||
|
||||
@@ -246,6 +279,30 @@ class ImageDetailsPage (HobPage):
|
||||
def refresh_package_detail_box(self, 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):
|
||||
model = tree.get_model()
|
||||
if not model:
|
||||
@@ -259,80 +316,97 @@ class ImageDetailsPage (HobPage):
|
||||
model[path][columnid] = True
|
||||
self.refresh_package_detail_box(model[path][1])
|
||||
|
||||
type_runnable = False
|
||||
mach_runnable = False
|
||||
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:
|
||||
if t in image_name:
|
||||
mach_runnable = True
|
||||
break
|
||||
# remove
|
||||
for button_id, button in self.button_ids.items():
|
||||
button.disconnect(button_id)
|
||||
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)
|
||||
|
||||
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):
|
||||
def create_bottom_buttons(self, buttonlist, image_name):
|
||||
# Create the buttons at the bottom
|
||||
bottom_buttons = gtk.HBox(False, 6)
|
||||
created = False
|
||||
packed = False
|
||||
self.button_ids = {}
|
||||
|
||||
# create button "Deploy image"
|
||||
name = "Deploy image"
|
||||
if name in buttonlist:
|
||||
self.deploy_button = HobButton('Deploy image')
|
||||
self.deploy_button.set_size_request(205, 49)
|
||||
self.deploy_button.set_tooltip_text("Deploy image to get your target board")
|
||||
self.deploy_button.set_flags(gtk.CAN_DEFAULT)
|
||||
self.deploy_button.grab_default()
|
||||
self.deploy_button.connect("clicked", self.deploy_button_clicked_cb)
|
||||
bottom_buttons.pack_end(self.deploy_button, expand=False, fill=False)
|
||||
if name in buttonlist and self.test_deployable(image_name):
|
||||
deploy_button = HobButton('Deploy image')
|
||||
deploy_button.set_size_request(205, 49)
|
||||
deploy_button.set_tooltip_text("Burn a live image to a USB drive or flash memory")
|
||||
deploy_button.set_flags(gtk.CAN_DEFAULT)
|
||||
button_id = deploy_button.connect("clicked", self.deploy_button_clicked_cb)
|
||||
self.button_ids[button_id] = deploy_button
|
||||
self.details_bottom_buttons.pack_end(deploy_button, expand=False, fill=False)
|
||||
created = True
|
||||
packed = True
|
||||
|
||||
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:
|
||||
# separator
|
||||
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"
|
||||
self.run_button = HobAltButton("Run image")
|
||||
self.run_button.connect("clicked", self.run_button_clicked_cb)
|
||||
bottom_buttons.pack_end(self.run_button, expand=False, fill=False)
|
||||
# create button "Run image"
|
||||
run_button = HobAltButton("Run image")
|
||||
else:
|
||||
# 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
|
||||
|
||||
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"
|
||||
if name in buttonlist:
|
||||
if created == True:
|
||||
# separator
|
||||
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"
|
||||
save_button = HobAltButton("Save as template")
|
||||
save_button.connect("clicked", self.save_button_clicked_cb)
|
||||
bottom_buttons.pack_end(save_button, expand=False, fill=False)
|
||||
save_button.set_tooltip_text("Save the image configuration for reuse")
|
||||
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
|
||||
|
||||
name = "Build new image"
|
||||
if name in buttonlist:
|
||||
# create button "Build new image"
|
||||
build_new_button = HobAltButton("Build new image")
|
||||
build_new_button.connect("clicked", self.build_new_button_clicked_cb)
|
||||
bottom_buttons.pack_start(build_new_button, expand=False, fill=False)
|
||||
|
||||
return bottom_buttons
|
||||
build_new_button.set_tooltip_text("Create a new image from scratch")
|
||||
button_id = build_new_button.connect("clicked", self.build_new_button_clicked_cb)
|
||||
self.button_ids[button_id] = build_new_button
|
||||
self.details_bottom_buttons.pack_start(build_new_button, expand=False, fill=False)
|
||||
|
||||
def _get_selected_image(self):
|
||||
image_name = ""
|
||||
@@ -358,7 +432,7 @@ class ImageDetailsPage (HobPage):
|
||||
self.builder.runqemu_image(image_name)
|
||||
|
||||
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):
|
||||
self.builder.show_configuration()
|
||||
@@ -366,5 +440,20 @@ class ImageDetailsPage (HobPage):
|
||||
def edit_packages_button_clicked_cb(self, button):
|
||||
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):
|
||||
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',
|
||||
'filter' : { PackageListModel.COL_INC : [True] },
|
||||
'columns' : [{
|
||||
'col_name' : 'Package Name',
|
||||
'col_name' : 'Package name',
|
||||
'col_id' : PackageListModel.COL_NAME,
|
||||
'col_style': 'text',
|
||||
'col_min' : 100,
|
||||
'col_max' : 300
|
||||
'col_max' : 300,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Brought in by',
|
||||
'col_id' : PackageListModel.COL_BINB,
|
||||
'col_style': 'text',
|
||||
'col_style': 'binb',
|
||||
'col_min' : 100,
|
||||
'col_max' : 350
|
||||
'col_max' : 350,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Size',
|
||||
'col_id' : PackageListModel.COL_SIZE,
|
||||
'col_style': 'text',
|
||||
'col_min' : 100,
|
||||
'col_max' : 300
|
||||
'col_max' : 300,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Included',
|
||||
'col_id' : PackageListModel.COL_INC,
|
||||
'col_style': 'check toggle',
|
||||
'col_min' : 50,
|
||||
'col_max' : 50
|
||||
'col_min' : 100,
|
||||
'col_max' : 100
|
||||
}]
|
||||
}, {
|
||||
'name' : 'All packages',
|
||||
'filter' : {},
|
||||
'columns' : [{
|
||||
'col_name' : 'Package Name',
|
||||
'col_name' : 'Package name',
|
||||
'col_id' : PackageListModel.COL_NAME,
|
||||
'col_style': 'text',
|
||||
'col_min' : 100,
|
||||
'col_max' : 400
|
||||
'col_max' : 400,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Size',
|
||||
'col_id' : PackageListModel.COL_SIZE,
|
||||
'col_style': 'text',
|
||||
'col_min' : 100,
|
||||
'col_max' : 500
|
||||
'col_max' : 500,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Included',
|
||||
'col_id' : PackageListModel.COL_INC,
|
||||
'col_style': 'check toggle',
|
||||
'col_min' : 50,
|
||||
'col_max' : 50
|
||||
'col_min' : 100,
|
||||
'col_max' : 100
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -90,6 +95,7 @@ class PackageSelectionPage (HobPage):
|
||||
super(PackageSelectionPage, self).__init__(builder, "Packages")
|
||||
|
||||
# set invisiable members
|
||||
self.recipe_model = self.builder.recipe_model
|
||||
self.package_model = self.builder.package_model
|
||||
|
||||
# create visual elements
|
||||
@@ -110,10 +116,10 @@ class PackageSelectionPage (HobPage):
|
||||
tab = HobViewTable(columns)
|
||||
filter = page['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":
|
||||
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'])
|
||||
self.ins.append_page(tab, label)
|
||||
self.tables.append(tab)
|
||||
@@ -131,7 +137,7 @@ class PackageSelectionPage (HobPage):
|
||||
|
||||
self.build_image_button = HobButton('Build image')
|
||||
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.grab_default()
|
||||
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)
|
||||
button_box.pack_start(self.back_button, expand=False, fill=False)
|
||||
|
||||
def tree_row_activated_cb(self, table, tree_model, path):
|
||||
binb = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_BINB)
|
||||
if binb:
|
||||
self.builder.show_binb_dialog(binb)
|
||||
def button_click_cb(self, widget, event):
|
||||
path, col = widget.table_tree.get_cursor()
|
||||
tree_model = widget.table_tree.get_model()
|
||||
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):
|
||||
self.builder.build_image()
|
||||
@@ -160,44 +169,81 @@ class PackageSelectionPage (HobPage):
|
||||
self._expand_all()
|
||||
|
||||
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_size = float(self.package_model.get_packages_size())
|
||||
selected_packages_size_str = self._size_to_string(selected_packages_size)
|
||||
selected_packages_size = self.package_model.get_packages_size()
|
||||
selected_packages_size_str = HobPage._size_to_string(selected_packages_size)
|
||||
|
||||
image_overhead_factor = self.builder.configuration.image_overhead_factor
|
||||
image_rootfs_size = self.builder.configuration.image_rootfs_size
|
||||
image_extra_size = self.builder.configuration.image_extra_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 * 1024 # image_extra_size is KB
|
||||
base_size = image_overhead_factor * selected_packages_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" %
|
||||
(selected_packages_num, selected_packages_size_str, image_total_size_str))
|
||||
self.ins.show_indicator_icon("Included", selected_packages_num)
|
||||
|
||||
"""
|
||||
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):
|
||||
def toggle_item_idle_cb(self, path, view_tree, cell, pagename):
|
||||
if not self.package_model.path_included(path):
|
||||
self.package_model.include_item(item_path=path, binb="User Selected")
|
||||
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()
|
||||
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)
|
||||
|
||||
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
|
||||
self.builder.window_sensitive(False)
|
||||
view_model = view_tree.get_model()
|
||||
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
|
||||
"""
|
||||
def __init__(self, markup):
|
||||
def __init__(self, markup, parent_win=None):
|
||||
gtk.Window.__init__(self, gtk.WINDOW_POPUP)
|
||||
|
||||
# Inherit the system theme for a tooltip
|
||||
@@ -76,6 +76,10 @@ class PersistentTooltip(gtk.Window):
|
||||
# Ensure a reasonable minimum size
|
||||
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
|
||||
hbox = gtk.HBox(False, 0)
|
||||
hbox.show()
|
||||
@@ -87,7 +91,7 @@ class PersistentTooltip(gtk.Window):
|
||||
self.button = gtk.Button()
|
||||
self.button.set_image(img)
|
||||
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.show()
|
||||
vbox = gtk.VBox(False, 0)
|
||||
|
||||
@@ -29,10 +29,12 @@ class HobProgressBar (gtk.ProgressBar):
|
||||
def set_rcstyle(self, status):
|
||||
rcstyle = gtk.RcStyle()
|
||||
rcstyle.fg[2] = gtk.gdk.Color(HobColors.BLACK)
|
||||
if status:
|
||||
rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING)
|
||||
else:
|
||||
if status == "stop":
|
||||
rcstyle.bg[3] = gtk.gdk.Color(HobColors.WARNING)
|
||||
elif status == "fail":
|
||||
rcstyle.bg[3] = gtk.gdk.Color(HobColors.ERROR)
|
||||
else:
|
||||
rcstyle.bg[3] = gtk.gdk.Color(HobColors.RUNNING)
|
||||
self.modify_style(rcstyle)
|
||||
|
||||
def set_title(self, text=None):
|
||||
|
||||
@@ -34,76 +34,93 @@ class RecipeSelectionPage (HobPage):
|
||||
pages = [
|
||||
{
|
||||
'name' : 'Included',
|
||||
'tooltip' : 'The recipes currently included for your image',
|
||||
'filter' : { RecipeListModel.COL_INC : [True],
|
||||
RecipeListModel.COL_TYPE : ['recipe', 'task'] },
|
||||
'columns' : [{
|
||||
'col_name' : 'Recipe Name',
|
||||
'col_name' : 'Recipe name',
|
||||
'col_id' : RecipeListModel.COL_NAME,
|
||||
'col_style': 'text',
|
||||
'col_min' : 100,
|
||||
'col_max' : 400
|
||||
'col_max' : 400,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Brought in by',
|
||||
'col_id' : RecipeListModel.COL_BINB,
|
||||
'col_style': 'text',
|
||||
'col_style': 'binb',
|
||||
'col_min' : 100,
|
||||
'col_max' : 500
|
||||
}, {
|
||||
'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_max' : 500,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Group',
|
||||
'col_id' : RecipeListModel.COL_GROUP,
|
||||
'col_style': 'text',
|
||||
'col_min' : 100,
|
||||
'col_max' : 400
|
||||
'col_max' : 300,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Included',
|
||||
'col_id' : RecipeListModel.COL_INC,
|
||||
'col_style': 'check toggle',
|
||||
'col_min' : 50,
|
||||
'col_max' : 50
|
||||
'col_min' : 100,
|
||||
'col_max' : 100
|
||||
}]
|
||||
}, {
|
||||
'name' : 'Tasks',
|
||||
'filter' : { RecipeListModel.COL_TYPE : ['task'] },
|
||||
'name' : 'All recipes',
|
||||
'tooltip' : 'All recipes available in the Yocto Project',
|
||||
'filter' : { RecipeListModel.COL_TYPE : ['recipe'] },
|
||||
'columns' : [{
|
||||
'col_name' : 'Task Name',
|
||||
'col_name' : 'Recipe name',
|
||||
'col_id' : RecipeListModel.COL_NAME,
|
||||
'col_style': 'text',
|
||||
'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_id' : RecipeListModel.COL_DESC,
|
||||
'col_style': 'text',
|
||||
'col_min' : 100,
|
||||
'col_max' : 400
|
||||
'col_max' : 400,
|
||||
'expand' : 'True'
|
||||
}, {
|
||||
'col_name' : 'Included',
|
||||
'col_id' : RecipeListModel.COL_INC,
|
||||
'col_style': 'check toggle',
|
||||
'col_min' : 50,
|
||||
'col_max' : 50
|
||||
'col_min' : 100,
|
||||
'col_max' : 100
|
||||
}]
|
||||
}
|
||||
]
|
||||
@@ -132,17 +149,22 @@ class RecipeSelectionPage (HobPage):
|
||||
tab = HobViewTable(columns)
|
||||
filter = page['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":
|
||||
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.set_selectable(False)
|
||||
label.set_tooltip_text(page['tooltip'])
|
||||
self.ins.append_page(tab, label)
|
||||
self.tables.append(tab)
|
||||
|
||||
self.ins.set_entry("Search recipes:")
|
||||
# set the search entry for each table
|
||||
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)
|
||||
|
||||
# add all into the window
|
||||
@@ -153,7 +175,7 @@ class RecipeSelectionPage (HobPage):
|
||||
|
||||
self.build_packages_button = HobButton('Build packages')
|
||||
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.grab_default()
|
||||
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)
|
||||
button_box.pack_start(self.back_button, expand=False, fill=False)
|
||||
|
||||
def tree_row_activated_cb(self, table, tree_model, path):
|
||||
binb = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BINB)
|
||||
if binb:
|
||||
self.builder.show_binb_dialog(binb)
|
||||
def button_click_cb(self, widget, event):
|
||||
path, col = widget.table_tree.get_cursor()
|
||||
tree_model = widget.table_tree.get_model()
|
||||
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):
|
||||
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.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):
|
||||
self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)
|
||||
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()
|
||||
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)
|
||||
|
||||
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
|
||||
self.builder.window_sensitive(False)
|
||||
view_model = view_tree.get_model()
|
||||
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,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
'no-provider' : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
}
|
||||
pids_to_task = {}
|
||||
tasks_to_iter = {}
|
||||
@@ -320,6 +323,20 @@ class RunningBuild (gobject.GObject):
|
||||
message["title"] = ""
|
||||
message["task"] = event.taskstring
|
||||
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
|
||||
|
||||
@@ -425,7 +442,7 @@ class BuildFailureTreeView(gtk.TreeView):
|
||||
self.get_selection().set_mode(gtk.SELECTION_SINGLE)
|
||||
|
||||
# The icon that indicates whether we're building or failed.
|
||||
renderer = gtk.CellRendererPixbuf ()
|
||||
renderer = HobCellRendererPixbuf ()
|
||||
col = gtk.TreeViewColumn ("Status", renderer)
|
||||
col.add_attribute (renderer, "icon-name", RunningBuildModel.COL_ICON)
|
||||
self.append_column (col)
|
||||
|
||||
@@ -136,11 +136,27 @@ class TemplateMgr(gobject.GObject):
|
||||
self.local_conf = 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):
|
||||
self.template_hob = HobTemplateFile("%s/%s%s%s" % (path, "template-", filename, ".hob"))
|
||||
self.bblayers_conf = ConfigFile("%s/%s%s%s" % (path, "bblayers-", filename, ".conf"))
|
||||
self.local_conf = ConfigFile("%s/%s%s%s" % (path, "local-", filename, ".conf"))
|
||||
self.image_bb = RecipeFile("%s/%s%s%s" % (path, "hob-image-", filename, ".bb"))
|
||||
self.template_hob = HobTemplateFile(TemplateMgr.convert_to_template_pathfilename(filename, path))
|
||||
self.bblayers_conf = ConfigFile(TemplateMgr.convert_to_bblayers_pathfilename(filename, path))
|
||||
self.local_conf = ConfigFile(TemplateMgr.convert_to_local_pathfilename(filename, path))
|
||||
self.image_bb = RecipeFile(TemplateMgr.convert_to_image_pathfilename(filename, path))
|
||||
|
||||
def setVar(self, var, val):
|
||||
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.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
import gobject
|
||||
import gtk
|
||||
import sys
|
||||
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__))))
|
||||
try:
|
||||
import bb
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# 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
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
@@ -70,7 +70,41 @@ def pluralise(singular, plural, qty):
|
||||
else:
|
||||
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
|
||||
includelogs = server.runCommand(["getVariable", "BBINCLUDELOGS"])
|
||||
@@ -106,32 +140,29 @@ def main(server, eventHandler):
|
||||
print("XMLRPC Fault getting commandline:\n %s" % x)
|
||||
return 1
|
||||
|
||||
|
||||
parseprogress = None
|
||||
cacheprogress = None
|
||||
shutdown = 0
|
||||
main.shutdown = 0
|
||||
interrupted = False
|
||||
return_value = 0
|
||||
errors = 0
|
||||
warnings = 0
|
||||
taskfailures = []
|
||||
|
||||
termfilter = tf(main, helper, console, format)
|
||||
|
||||
while True:
|
||||
try:
|
||||
termfilter.updateFooter()
|
||||
event = eventHandler.waitEvent(0.25)
|
||||
if event is None:
|
||||
if shutdown > 1:
|
||||
if main.shutdown > 1:
|
||||
break
|
||||
continue
|
||||
helper.eventHandler(event)
|
||||
if isinstance(event, bb.runqueue.runQueueExitWait):
|
||||
if not shutdown:
|
||||
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 not main.shutdown:
|
||||
main.shutdown = 1
|
||||
|
||||
if isinstance(event, logging.LogRecord):
|
||||
if event.levelno >= format.ERROR:
|
||||
@@ -151,6 +182,7 @@ def main(server, eventHandler):
|
||||
return_value = 1
|
||||
logfile = event.logfile
|
||||
if logfile and os.path.exists(logfile):
|
||||
termfilter.clearFooter()
|
||||
print("ERROR: Logfile of failure stored in: %s" % logfile)
|
||||
if includelogs and not event.errprinted:
|
||||
print("Log data follows:")
|
||||
@@ -206,14 +238,14 @@ def main(server, eventHandler):
|
||||
return_value = event.exitcode
|
||||
errors = errors + 1
|
||||
logger.error("Command execution failed: %s", event.error)
|
||||
shutdown = 2
|
||||
main.shutdown = 2
|
||||
continue
|
||||
if isinstance(event, bb.command.CommandExit):
|
||||
if not return_value:
|
||||
return_value = event.exitcode
|
||||
continue
|
||||
if isinstance(event, (bb.command.CommandCompleted, bb.cooker.CookerExit)):
|
||||
shutdown = 2
|
||||
main.shutdown = 2
|
||||
continue
|
||||
if isinstance(event, bb.event.MultipleProviders):
|
||||
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)
|
||||
|
||||
except EnvironmentError as ioerror:
|
||||
termfilter.clearFooter()
|
||||
# ignore interrupted io
|
||||
if ioerror.args[0] == 4:
|
||||
pass
|
||||
except KeyboardInterrupt:
|
||||
if shutdown == 1:
|
||||
termfilter.clearFooter()
|
||||
if main.shutdown == 1:
|
||||
print("\nSecond Keyboard Interrupt, stopping...\n")
|
||||
server.runCommand(["stateStop"])
|
||||
if shutdown == 0:
|
||||
if main.shutdown == 0:
|
||||
interrupted = True
|
||||
print("\nKeyboard Interrupt, closing down...\n")
|
||||
server.runCommand(["stateShutdown"])
|
||||
shutdown = shutdown + 1
|
||||
main.shutdown = main.shutdown + 1
|
||||
pass
|
||||
|
||||
summary = ""
|
||||
@@ -315,4 +349,6 @@ def main(server, eventHandler):
|
||||
if return_value == 0:
|
||||
return_value = 1
|
||||
|
||||
termfilter.finish()
|
||||
|
||||
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):
|
||||
self.needUpdate = False
|
||||
self.running_tasks = {}
|
||||
# Running PIDs preserves the order tasks were executed in
|
||||
self.running_pids = []
|
||||
self.failed_tasks = []
|
||||
self.tasknumber_current = 0
|
||||
self.tasknumber_total = 0
|
||||
@@ -30,16 +32,20 @@ class BBUIHelper:
|
||||
def eventHandler(self, event):
|
||||
if isinstance(event, bb.build.TaskStarted):
|
||||
self.running_tasks[event.pid] = { 'title' : "%s %s" % (event._package, event._task) }
|
||||
self.running_pids.append(event.pid)
|
||||
self.needUpdate = True
|
||||
if isinstance(event, bb.build.TaskSucceeded):
|
||||
del self.running_tasks[event.pid]
|
||||
self.running_pids.remove(event.pid)
|
||||
self.needUpdate = True
|
||||
if isinstance(event, bb.build.TaskFailedSilent):
|
||||
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
|
||||
self.needUpdate = True
|
||||
if isinstance(event, bb.build.TaskFailed):
|
||||
del self.running_tasks[event.pid]
|
||||
self.running_pids.remove(event.pid)
|
||||
self.failed_tasks.append( { 'title' : "%s %s" % (event._package, event._task)})
|
||||
self.needUpdate = True
|
||||
if isinstance(event, bb.runqueue.runQueueTaskStarted):
|
||||
|
||||
@@ -31,9 +31,6 @@ from contextlib import contextmanager
|
||||
|
||||
logger = logging.getLogger("BitBake.Util")
|
||||
|
||||
# Version comparison
|
||||
separators = ".-"
|
||||
|
||||
# Context used in better_exec, eval
|
||||
_context = {
|
||||
"os": os,
|
||||
@@ -48,15 +45,18 @@ def explode_version(s):
|
||||
while (s != ''):
|
||||
if s[0] in string.digits:
|
||||
m = numeric_regexp.match(s)
|
||||
r.append(int(m.group(1)))
|
||||
r.append((0, int(m.group(1))))
|
||||
s = m.group(2)
|
||||
continue
|
||||
if s[0] in string.letters:
|
||||
m = alpha_regexp.match(s)
|
||||
r.append(m.group(1))
|
||||
r.append((1, m.group(1)))
|
||||
s = m.group(2)
|
||||
continue
|
||||
r.append(s[0])
|
||||
if s[0] == '~':
|
||||
r.append((-1, s[0]))
|
||||
else:
|
||||
r.append((2, s[0]))
|
||||
s = s[1:]
|
||||
return r
|
||||
|
||||
@@ -77,33 +77,25 @@ def split_version(s):
|
||||
def vercmp_part(a, b):
|
||||
va = explode_version(a)
|
||||
vb = explode_version(b)
|
||||
sa = False
|
||||
sb = False
|
||||
while True:
|
||||
if va == []:
|
||||
ca = None
|
||||
(oa, ca) = (0, None)
|
||||
else:
|
||||
ca = va.pop(0)
|
||||
(oa, ca) = va.pop(0)
|
||||
if vb == []:
|
||||
cb = None
|
||||
(ob, cb) = (0, None)
|
||||
else:
|
||||
cb = vb.pop(0)
|
||||
if ca == None and cb == None:
|
||||
(ob, cb) = vb.pop(0)
|
||||
if (oa, ca) == (0, None) and (ob, cb) == (0, None):
|
||||
return 0
|
||||
|
||||
if isinstance(ca, basestring):
|
||||
sa = ca in separators
|
||||
if isinstance(cb, basestring):
|
||||
sb = cb in separators
|
||||
if sa and not sb:
|
||||
if oa < ob:
|
||||
return -1
|
||||
if not sa and sb:
|
||||
elif oa > ob:
|
||||
return 1
|
||||
|
||||
if ca > cb:
|
||||
return 1
|
||||
if ca < cb:
|
||||
elif ca < cb:
|
||||
return -1
|
||||
elif ca > cb:
|
||||
return 1
|
||||
|
||||
def vercmp(ta, tb):
|
||||
(ea, va, ra) = ta
|
||||
|
||||
@@ -19,46 +19,13 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This chapter (or document if you are reading the BSP Developer's Guide) defines
|
||||
a structure for these components
|
||||
so that BSPs follow a commonly understood layout.
|
||||
Providing a common form allows end-users to understand and become familiar
|
||||
with the layout.
|
||||
A common form also encourages standardization
|
||||
of software support of hardware.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
The information here does not provide an example of how to create a BSP.
|
||||
For examples on how to create a BSP, see the
|
||||
"<ulink url='&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.
|
||||
This chapter (or document if you are reading the BSP Developer's Guide)
|
||||
talks about BSP Layers, defines a structure for components
|
||||
so that BSPs follow a commonly understood layout, discusses how to customize
|
||||
a recipe for a BSP, addresses BSP licensing, and provides information that
|
||||
shows you how to create and manage a
|
||||
<link linkend='bsp-layers'>BSP Layer</link> using two Yocto Project
|
||||
<link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
|
||||
</para>
|
||||
|
||||
<section id='bsp-layers'>
|
||||
@@ -99,13 +66,19 @@
|
||||
top of the BSP's root layer in order to be functional.
|
||||
For these cases, you also need to add those layers to the
|
||||
<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
|
||||
layers and, preferably, any
|
||||
build instructions that might be contained elsewhere
|
||||
in the <filename>README</filename> file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Some layers function as a layer to hold other BSP layers.
|
||||
An example of this type of layers is the <filename>meta-intel</filename> layer.
|
||||
The <filename>meta-intel</filename> layer contains over 10 individual BSP layers.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For more detailed information on layers, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
|
||||
@@ -119,6 +92,35 @@
|
||||
<section id="bsp-filelayout">
|
||||
<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>
|
||||
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
|
||||
@@ -128,10 +130,12 @@
|
||||
meta-<bsp_name>/
|
||||
meta-<bsp_name>/<bsp_license_file>
|
||||
meta-<bsp_name>/README
|
||||
meta-<bsp_name>/README.sources
|
||||
meta-<bsp_name>/binary/<bootable_images>
|
||||
meta-<bsp_name>/conf/layer.conf
|
||||
meta-<bsp_name>/conf/machine/*.conf
|
||||
meta-<bsp_name>/recipes-bsp/*
|
||||
meta-<bsp_name>/recipes-core/*
|
||||
meta-<bsp_name>/recipes-graphics/*
|
||||
meta-<bsp_name>/recipes-kernel/linux/linux-yocto_<kernel_rev>.bbappend
|
||||
</literallayout>
|
||||
@@ -144,7 +148,7 @@
|
||||
meta-crownbay/COPYING.MIT
|
||||
meta-crownbay/README
|
||||
meta-crownbay/README.sources
|
||||
meta-crownbay/binary
|
||||
meta-crownbay/binary/
|
||||
meta-crownbay/conf/
|
||||
meta-crownbay/conf/layer.conf
|
||||
meta-crownbay/conf/machine/
|
||||
@@ -158,8 +162,8 @@
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/
|
||||
meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
|
||||
meta-crownbay/recipes-core
|
||||
meta-crownbay/recipes-core/tasks
|
||||
meta-crownbay/recipes-core/
|
||||
meta-crownbay/recipes-core/tasks/
|
||||
meta-crownbay/recipes-core/tasks/task-core-tools-profile.bbappend
|
||||
meta-crownbay/recipes-graphics/
|
||||
meta-crownbay/recipes-graphics/xorg-xserver/
|
||||
@@ -215,7 +219,7 @@
|
||||
|
||||
<para>
|
||||
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
|
||||
building the image.
|
||||
</para>
|
||||
@@ -640,6 +644,42 @@
|
||||
</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'>
|
||||
<title>BSP Licensing Considerations</title>
|
||||
|
||||
@@ -754,4 +794,452 @@
|
||||
You must eventually rebuild the image if you want to remove this restriction.
|
||||
</note>
|
||||
</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 subsquently 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 maintainence 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 requireing 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 BSPin 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>
|
||||
|
||||
@@ -445,6 +445,204 @@
|
||||
</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-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'>
|
||||
<title>Adding a Package</title>
|
||||
|
||||
@@ -590,25 +788,52 @@
|
||||
SECTION = "base"
|
||||
DEPENDS = "zlib lzo e2fsprogs util-linux"
|
||||
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
|
||||
LICENSE = "GPLv2"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
|
||||
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
|
||||
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/"
|
||||
|
||||
EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' \
|
||||
'BUILDDIR=${S}'"
|
||||
PR = "r1"
|
||||
|
||||
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' \
|
||||
'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
|
||||
|
||||
do_install () {
|
||||
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
|
||||
INCLUDEDIR=${includedir}
|
||||
install -d ${D}${includedir}/mtd/
|
||||
for f in ${S}/include/mtd/*.h; do
|
||||
install -m 0644 $f ${D}${includedir}/mtd/
|
||||
done
|
||||
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
|
||||
INCLUDEDIR=${includedir}
|
||||
install -d ${D}${includedir}/mtd/
|
||||
for f in ${S}/include/mtd/*.h; do
|
||||
install -m 0644 $f ${D}${includedir}/mtd/
|
||||
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>
|
||||
</para>
|
||||
</section>
|
||||
@@ -774,228 +999,6 @@
|
||||
</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">
|
||||
<title>Porting the Yocto Project to a New Machine</title>
|
||||
|
||||
@@ -1587,7 +1590,7 @@ so that there are some definite steps on how to do this. I need more detail her
|
||||
require conf/multilib.conf
|
||||
MULTILIBS = "multilib:lib32"
|
||||
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
|
||||
MULTILIB_IMAGE_INSTALL = "lib32-connman"
|
||||
IMAGE_INSTALL = "lib32-connman"
|
||||
</literallayout>
|
||||
This example enables an
|
||||
additional library named <filename>lib32</filename> alongside the
|
||||
@@ -2013,6 +2016,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.
|
||||
</para>
|
||||
</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>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
<qandaentry>
|
||||
<question>
|
||||
<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?
|
||||
</para>
|
||||
</question>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!ENTITY DISTRO "1.1">
|
||||
<!ENTITY DISTRO_NAME "edison">
|
||||
<!ENTITY DISTRO "1.2">
|
||||
<!ENTITY DISTRO_NAME "denzil">
|
||||
<!ENTITY YOCTO_DOC_VERSION "latest">
|
||||
<!ENTITY POKYVERSION "6.0">
|
||||
<!ENTITY POKYVERSION "7.0">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2012">
|
||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<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
|
||||
Yocto Project build system to decrease the time needed to build images
|
||||
significantly.
|
||||
@@ -170,6 +170,7 @@
|
||||
<listitem><para>Ubuntu</para></listitem>
|
||||
<listitem><para>Fedora</para></listitem>
|
||||
<listitem><para>openSUSE</para></listitem>
|
||||
<listitem><para>CentOS</para></listitem>
|
||||
</itemizedlist>
|
||||
For a list of the distributions under validation and their status, see the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution
|
||||
@@ -208,7 +209,7 @@
|
||||
Packages and package installation vary depending on your development system.
|
||||
In general, you need to have root access and then install the required packages.
|
||||
The next few sections show you how to get set up with the right packages for
|
||||
Ubuntu, Fedora, and openSUSE.
|
||||
Ubuntu, Fedora, openSUSE, and CentOS.
|
||||
</para>
|
||||
|
||||
<section id='ubuntu'>
|
||||
@@ -253,6 +254,9 @@
|
||||
the commands as root user.
|
||||
See the <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'>Configuring Sudo</ulink>
|
||||
wiki page for details.
|
||||
For information on other dependencies you will need to install, see the Fedora section on the
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
|
||||
wiki page.
|
||||
</para></note>
|
||||
</section>
|
||||
|
||||
@@ -270,6 +274,36 @@
|
||||
diffstat texinfo mercurial freeglut-devel libSDL-devel
|
||||
</literallayout>
|
||||
</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 linuxdoc-tools 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 id='releases'>
|
||||
@@ -293,9 +327,7 @@
|
||||
Doing so allows you to contribute back to the project.
|
||||
For information on how to get set up using this method, see the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto
|
||||
Project Release</ulink>" item in
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;'>The Yocto Project
|
||||
Development Manual</ulink>.
|
||||
Project Release</ulink>" item in The Yocto Project Development Manual.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
@@ -350,9 +382,9 @@
|
||||
By default, the Yocto Project searches for source code using a pre-determined order
|
||||
through a set of locations.
|
||||
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
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#faq'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
</para></note>
|
||||
|
||||
@@ -360,14 +392,14 @@
|
||||
<literallayout class='monospaced'>
|
||||
$ wget &YOCTO_POKY_DL_URL;
|
||||
$ tar xjf &YOCTO_POKY;.tar.bz2
|
||||
$ source &OE_INIT_PATH; edison-6.0-build
|
||||
$ source &OE_INIT_PATH; &YOCTO_POKY;-build
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<tip><para>
|
||||
To help conserve disk space during builds, you can add the following statement
|
||||
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
|
||||
once the package is built.
|
||||
<literallayout class='monospaced'>
|
||||
@@ -383,13 +415,13 @@
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Yocto Project website</ulink>
|
||||
Downloads page to retrieve the tarball.</para></listitem>
|
||||
<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>
|
||||
<listitem><para>The third command runs the Yocto Project environment setup script.
|
||||
Running this script defines Yocto Project build environment settings needed to
|
||||
complete the build.
|
||||
The script also creates the Yocto Project
|
||||
build directory, which is <filename>edison-6.0-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
|
||||
to the build directory.
|
||||
Later, when the build completes, the build directory contains all the files
|
||||
@@ -429,9 +461,8 @@
|
||||
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.
|
||||
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;'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>"
|
||||
in The Yocto Project Reference Manual.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -440,15 +471,15 @@
|
||||
For information on the <filename>-k</filename> option use 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;'>The Yocto Project Reference Manual</ulink>.
|
||||
The Yocto Project Reference Manual.
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake -k core-image-sato
|
||||
</literallayout>
|
||||
<note><para>
|
||||
BitBake requires Python 2.6 or 2.7. For more information on this requirement,
|
||||
see the FAQ appendix in
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;'>
|
||||
The Yocto Project Reference Manual</ulink>.
|
||||
see the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink> in The Yocto Project Reference
|
||||
Manual.
|
||||
</para></note>
|
||||
The final command runs the image:
|
||||
<literallayout class='monospaced'>
|
||||
@@ -549,9 +580,8 @@
|
||||
<para>
|
||||
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-the-toolchain-from-within-the-build-tree'>Using BitBake and the Yocto Project Build Tree</ulink>" sections in
|
||||
<ulink url='&YOCTO_DOCS_ADT_URL;'>The Yocto Project
|
||||
Application Development Toolkit (ADT) User's Guide</ulink>.
|
||||
"<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)
|
||||
User's Guide.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -582,8 +612,7 @@
|
||||
<para>
|
||||
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;'>The
|
||||
Yocto Project Development Manual</ulink>.
|
||||
The Yocto Project Development Manual.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -710,7 +739,7 @@
|
||||
<listitem><para><emphasis>Tarball:</emphasis>
|
||||
Use if you want the latest stable release:
|
||||
<literallayout class='monospaced'>
|
||||
$ wget &YOCTO_RELEASE_DL_URL;.&YOCTO_POKY_TARBALL;
|
||||
$ wget &YOCTO_RELEASE_DL_URL;/&YOCTO_POKY_TARBALL;
|
||||
$ tar xvjf &YOCTO_POKY_TARBALL;
|
||||
</literallayout></para></listitem>
|
||||
<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
|
||||
# set the kernel provider to override a machine config.
|
||||
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
|
||||
#POKY_DEFAULT_EXTRA_RDEPENDS += "task-core-boot"
|
||||
@@ -63,6 +63,17 @@ ASSUME_PROVIDED += "pkgconfig$"
|
||||
# Reconfigure eglibc for a smaller installation
|
||||
# Comment out any of the lines below to disable them in the build
|
||||
DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
|
||||
|
||||
# Building meta-toolchain currently imposes some additional requirements:
|
||||
# If you do not plan to build meta-toolchain, you can save ~461KB by
|
||||
# commenting out the DISTRO_FEATURES_LIBC_TOOLCHAIN assignment
|
||||
# gettext needs wchar, m4 needs spawn and locale, elfutils needs ftraverse
|
||||
DISTRO_FEATURES_LIBC_TOOLCHAIN = "libc-posix-clang-wchar \
|
||||
libc-spawn libc-locale-code \
|
||||
libc-ftraverse libc-libm-big \
|
||||
libc-posix-regexp-glibc \
|
||||
"
|
||||
|
||||
# Required for "who"
|
||||
DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
|
||||
DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
|
||||
@@ -72,6 +83,7 @@ DISTRO_FEATURES_LIBC = "${DISTRO_FEATURES_LIBC_TINY} \
|
||||
${DISTRO_FEATURES_LIBC_MINIMAL} \
|
||||
${DISTRO_FEATURES_LIBC_REGEX} \
|
||||
${DISTRO_FEATURES_LIBC_NET} \
|
||||
${DISTRO_FEATURES_LIBC_TOOLCHAIN} \
|
||||
"
|
||||
|
||||
# Comment out any of the lines below to disable them in the build
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Yocto (Built by Poky 6.0)"
|
||||
DISTRO_VERSION = "1.1+snapshot-${DATE}"
|
||||
DISTRO_NAME = "Yocto (Built by Poky 7.0)"
|
||||
DISTRO_VERSION = "1.2"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
|
||||
SDK_VERSION := "${DISTRO_VERSION}"
|
||||
|
||||
MAINTAINER = "Poky <poky@yoctoproject.org>"
|
||||
|
||||
@@ -65,5 +65,28 @@ CONNECTIVITY_CHECK_URIS ?= "git://git.yoctoproject.org/yocto-firewall-test;proto
|
||||
https://eula-downloads.yoctoproject.org/index.php \
|
||||
http://bugzilla.yoctoproject.org/report.cgi"
|
||||
|
||||
SANITY_TESTED_DISTROS ?= " \
|
||||
Yocto (Built by Poky 7.0) 1.2 \n \
|
||||
Ubuntu 10.04.4 LTS \n \
|
||||
Ubuntu 11.10 \n \
|
||||
Ubuntu 12.04 \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 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
|
||||
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
|
||||
|
||||
MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 x86 wifi \
|
||||
acpi alsa"
|
||||
MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 x86 wifi acpi alsa"
|
||||
|
||||
KERNEL_IMAGETYPE = "bzImage"
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#@NAME: Beagleboard machine
|
||||
#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board
|
||||
|
||||
PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg-lite"
|
||||
XSERVER = "xserver-xorg-lite \
|
||||
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg-lite"
|
||||
XSERVER ?= "xserver-xorg-lite \
|
||||
xf86-input-evdev \
|
||||
xf86-input-mouse \
|
||||
xf86-video-omapfb \
|
||||
@@ -37,4 +37,4 @@ UBOOT_MACHINE = "omap3_beagle_config"
|
||||
UBOOT_ENTRYPOINT = "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"
|
||||
|
||||
MACHINE_FEATURES = "kernel26 keyboard pci ext2 ext3 serial"
|
||||
MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
|
||||
|
||||
PREFERRED_VERSION_linux-yocto ?= "3.0%"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
|
||||
require conf/machine/include/tune-mips32.inc
|
||||
|
||||
MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost ext2 ext3 \
|
||||
serial"
|
||||
MACHINE_FEATURES = "screen keyboard pci usbhost ext2 ext3 serial"
|
||||
|
||||
KERNEL_IMAGETYPE = "vmlinux"
|
||||
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
|
||||
|
||||
@@ -4,10 +4,10 @@ KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb"
|
||||
KMACHINE_beagleboard = "yocto/standard/beagleboard"
|
||||
|
||||
|
||||
SRCREV_machine_atom-pc ?= "b42d0d016af36d0bbbb619c424200d4b5bc9ba28"
|
||||
SRCREV_machine_routerstationpro ?= "f1bc894b09bd9b048df99e53fd6559c5d84e4871"
|
||||
SRCREV_machine_mpc8315e-rdb ?= "7ba6d6853b6e7cf00a742baeba1503c80fc05314"
|
||||
SRCREV_machine_beagleboard ?= "fccd4e4041454f16f1e7a25569ec530eaa1bf89e"
|
||||
SRCREV_machine_atom-pc ?= "afdda882f902dd28693cd8701a7d497958290f09"
|
||||
SRCREV_machine_routerstationpro ?= "982522e3901fad56bb908565b22c498025ab536c"
|
||||
SRCREV_machine_mpc8315e-rdb ?= "83f422f718cf15633cb4c2d309aa041c3c354f65"
|
||||
SRCREV_machine_beagleboard ?= "8fd5a8eb4067c7032389e82d54f0e54e1e27f78c"
|
||||
|
||||
COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
|
||||
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
|
||||
# all content in ${S} to a diff file.
|
||||
|
||||
EXCLUDE_FROM ?= ".pc autom4te.cache"
|
||||
ARCHIVE_EXCLUDE_FROM ?= ".pc autom4te.cache"
|
||||
ARCHIVE_TYPE ?= "TAR SRPM"
|
||||
DISTRO ?= "poky"
|
||||
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):
|
||||
'''create a directory "script-logs" including .bb and .inc file in ${WORKDIR}'''
|
||||
import re
|
||||
@@ -32,14 +15,18 @@ def get_bb_inc(d):
|
||||
|
||||
bbinc = []
|
||||
pat=re.compile('require\s*([^\s]*\.*)(.*)')
|
||||
file_dir = d.getVar('FILE', True)
|
||||
bbdir = os.path.dirname(file_dir)
|
||||
work_dir = d.getVar('WORKDIR', True)
|
||||
os.chdir(work_dir)
|
||||
bb.mkdirhier("script-logs")
|
||||
os.chdir(bbdir)
|
||||
bbfile = os.path.basename(file_dir)
|
||||
bbinc.append(bbfile)
|
||||
bbfile = d.getVar('FILE', True)
|
||||
bbdir = os.path.dirname(bbfile)
|
||||
script_logs = os.path.join(work_dir,'script-logs')
|
||||
bb_inc = os.path.join(script_logs,'bb_inc')
|
||||
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):
|
||||
f = open(file,'r')
|
||||
@@ -49,21 +36,26 @@ def get_bb_inc(d):
|
||||
else:
|
||||
try:
|
||||
incfile = pat.match(line).group(1)
|
||||
incfile = parse_var(d,incfile)
|
||||
bbinc.append(incfile)
|
||||
get_inc(incfile)
|
||||
except (IOError,AttributeError):
|
||||
incfile = bb.data.expand(os.path.basename(incfile),d)
|
||||
abs_incfile = find_file(bbdir,incfile)
|
||||
if abs_incfile:
|
||||
bbinc.append(abs_incfile)
|
||||
get_inc(abs_incfile)
|
||||
except AttributeError:
|
||||
pass
|
||||
get_inc(bbfile)
|
||||
os.chdir(work_dir)
|
||||
for root, dirs, files in os.walk(bbdir):
|
||||
for file in bbinc:
|
||||
if file in files:
|
||||
shutil.copy(root + '/' + file,'script-logs')
|
||||
oe.path.copytree('temp', 'script-logs')
|
||||
return work_dir + '/script-logs'
|
||||
bbinc = list(set(bbinc))
|
||||
for bbincfile in bbinc:
|
||||
shutil.copy(bbincfile,bb_inc)
|
||||
|
||||
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}'''
|
||||
import shutil
|
||||
|
||||
@@ -71,11 +63,11 @@ def get_all_patches(d):
|
||||
pf = d.getVar('PF', True)
|
||||
work_dir = d.getVar('WORKDIR', 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)
|
||||
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)
|
||||
locals = (fetch.localpath(url) for url in fetch.urls)
|
||||
for local in locals:
|
||||
@@ -90,7 +82,8 @@ def get_all_patches(d):
|
||||
shutil.copy(patch,dest)
|
||||
except IOError:
|
||||
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
|
||||
|
||||
def get_applying_patches(d):
|
||||
@@ -124,92 +117,86 @@ def not_tarball(d):
|
||||
else:
|
||||
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'''
|
||||
if middle_name in 'patched' 'configured':
|
||||
if stage_name in 'patched' 'configured':
|
||||
return
|
||||
pf = d.getVar('PF', True)
|
||||
dl_dir = d.getVar('DL_DIR',True)
|
||||
try:
|
||||
source = os.path.basename(d.getVar('SRC_URI', 1).split()[0])
|
||||
os.chdir(dl_dir)
|
||||
source = os.path.join(dl_dir,os.path.basename(d.getVar('SRC_URI', True).split()[0]))
|
||||
if os.path.exists(source) and not os.path.isdir(source):
|
||||
return source
|
||||
except (IndexError, OSError):
|
||||
pass
|
||||
|
||||
def archive_sources_from_directory(d,middle_name):
|
||||
'''archive sources codes tree to tarball when tarball of $P doesn't exist in $DL_DIR'''
|
||||
return ''
|
||||
|
||||
def do_tarball(workdir,srcdir,tarname):
|
||||
'''tar "srcdir" under "workdir" to "tarname"'''
|
||||
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
|
||||
|
||||
s = d.getVar('S',True)
|
||||
workdir=d.getVar('WORKDIR', True)
|
||||
work_dir=d.getVar('WORKDIR', 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:
|
||||
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)
|
||||
if os.path.exists(s) and work_dir in s:
|
||||
try:
|
||||
for file in os.listdir(s):
|
||||
if file is not 'temp' and file is not sourcedir:
|
||||
shutil.copy(file,sourcedir)
|
||||
except (IOError,OSError):
|
||||
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)
|
||||
source_dir = os.path.join(work_dir,[ i for i in s.replace(work_dir,'').split('/') if i][0])
|
||||
except IndexError:
|
||||
if not cmp(s,work_dir):
|
||||
return ''
|
||||
else:
|
||||
return
|
||||
return tarname
|
||||
return ''
|
||||
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'''
|
||||
import shutil
|
||||
work_dir = d.getVar('WORKDIR',True)
|
||||
file = get_source_from_downloads(d,middle_name)
|
||||
file = get_source_from_downloads(d,stage_name)
|
||||
if file:
|
||||
shutil.copy(file,work_dir)
|
||||
file = os.path.basename(file)
|
||||
else:
|
||||
file = archive_sources_from_directory(d,middle_name)
|
||||
file = archive_sources_from_directory(d,stage_name)
|
||||
return file
|
||||
|
||||
|
||||
def archive_patches(d,patchdir,series):
|
||||
'''archive patches to tarball and also include series files if 'series' is True'''
|
||||
import tarfile
|
||||
import shutil
|
||||
|
||||
s = d.getVar('S',True)
|
||||
work_dir = d.getVar('WORKDIR', True)
|
||||
os.chdir(work_dir)
|
||||
patch_dir = os.path.basename(patchdir)
|
||||
tarname = patch_dir + ".tar.gz"
|
||||
if series == 'all' and os.path.exists(s + '/patches/series'):
|
||||
shutil.copy(s + '/patches/series',patch_dir)
|
||||
tar = tarfile.open(tarname, "w:gz")
|
||||
tar.add(patch_dir)
|
||||
tar.close()
|
||||
shutil.rmtree(patch_dir, ignore_errors=True)
|
||||
if series == 'all' and os.path.exists(os.path.join(s,'patches/series')):
|
||||
shutil.copy(os.path.join(s,'patches/series'),patchdir)
|
||||
tarname = do_tarball(work_dir,patch_dir,tarname)
|
||||
shutil.rmtree(patchdir, ignore_errors=True)
|
||||
return tarname
|
||||
|
||||
def select_archive_patches(d,option):
|
||||
'''select to archive all patches including non-applying and series or applying patches '''
|
||||
if option == "all":
|
||||
patchdir = get_all_patches(d)
|
||||
patchdir = get_series(d)
|
||||
elif option == "applying":
|
||||
patchdir = get_applying_patches(d)
|
||||
try:
|
||||
@@ -221,17 +208,15 @@ def select_archive_patches(d,option):
|
||||
|
||||
def archive_logs(d,logdir,bbinc=False):
|
||||
'''archive logs in temp to tarball and .bb and .inc files if bbinc is True '''
|
||||
import tarfile
|
||||
import shutil
|
||||
|
||||
log_dir = os.path.basename(logdir)
|
||||
pf = d.getVar('PF',True)
|
||||
work_dir = d.getVar('WORKDIR',True)
|
||||
log_dir = os.path.basename(logdir)
|
||||
tarname = pf + '-' + log_dir + ".tar.gz"
|
||||
tar = tarfile.open(tarname, "w:gz")
|
||||
tar.add(log_dir)
|
||||
tar.close()
|
||||
tarname = do_tarball(work_dir,log_dir,tarname)
|
||||
if bbinc:
|
||||
shutil.rmtree(log_dir, ignore_errors=True)
|
||||
shutil.rmtree(logdir, ignore_errors=True)
|
||||
return tarname
|
||||
|
||||
def get_licenses(d):
|
||||
@@ -258,16 +243,17 @@ def move_tarball_deploy(d,tarball_list):
|
||||
target_sys = d.getVar('TARGET_SYS', True)
|
||||
pf = d.getVar('PF', True)
|
||||
licenses = get_licenses(d)
|
||||
work_dir = d.getVar('WORKDIR',True)
|
||||
tar_sources = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
||||
if not os.path.exists(tar_sources):
|
||||
bb.mkdirhier(tar_sources)
|
||||
for source in tarball_list:
|
||||
if source:
|
||||
if os.path.exists(tar_sources + '/' + source):
|
||||
os.remove(tar_sources + '/' + source)
|
||||
shutil.move(source,tar_sources)
|
||||
if os.path.exists(os.path.join(tar_sources, source)):
|
||||
os.remove(os.path.join(tar_sources,source))
|
||||
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')'''
|
||||
try:
|
||||
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):
|
||||
'''store tarbablls name to file "tar-package"'''
|
||||
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.close()
|
||||
except IOError:
|
||||
@@ -286,25 +272,27 @@ def store_package(d,package_name):
|
||||
|
||||
def get_package(d):
|
||||
'''get tarballs name from "tar-package"'''
|
||||
work_dir = (d.getVar('WORKDIR', True))
|
||||
tarpackage = os.path.join(work_dir,'tar-package')
|
||||
try:
|
||||
os.chdir(d.getVar('WORKDIR', True))
|
||||
f = open('tar-package','r')
|
||||
f = open(tarpackage,'r')
|
||||
line = list(set(f.readline().replace('\n','').split()))
|
||||
f.close()
|
||||
return line
|
||||
except IOError:
|
||||
pass
|
||||
f.close()
|
||||
return line
|
||||
|
||||
|
||||
def archive_sources_patches(d,middle_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 '''
|
||||
def archive_sources_patches(d,stage_name):
|
||||
'''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
|
||||
verify_var(d)
|
||||
|
||||
check_archiving_type(d)
|
||||
if not_tarball(d):
|
||||
return
|
||||
|
||||
source_tar_name = archive_sources(d,middle_name)
|
||||
if middle_name == "prepatch":
|
||||
source_tar_name = archive_sources(d,stage_name)
|
||||
if stage_name == "prepatch":
|
||||
if d.getVar('PATCHES_ARCHIVE_WITH_SERIES',True).upper() == 'TRUE':
|
||||
patch_tar_name = select_archive_patches(d,"all")
|
||||
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' ")
|
||||
else:
|
||||
patch_tar_name = ''
|
||||
|
||||
|
||||
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() not in 'SRPM':
|
||||
move_tarball_deploy(d,[source_tar_name,patch_tar_name])
|
||||
else:
|
||||
tarpackage = d.getVar('WORKDIR', True) + '/tar-package'
|
||||
tarpackage = os.path.join(d.getVar('WORKDIR', True),'tar-package')
|
||||
if os.path.exists(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:
|
||||
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".'''
|
||||
|
||||
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)
|
||||
if source_archive_log_with_scripts == 'logs_with_scripts':
|
||||
logdir = get_bb_inc(d)
|
||||
tarlog = archive_logs(d,logdir,True)
|
||||
elif source_archive_log_with_scripts == 'logs':
|
||||
if os.path.exists('temp'):
|
||||
tarlog = archive_logs(d,'temp',False)
|
||||
if os.path.exists(temp_dir):
|
||||
tarlog = archive_logs(d,temp_dir,False)
|
||||
else:
|
||||
return
|
||||
|
||||
@@ -374,14 +362,14 @@ def create_diff_gz(d):
|
||||
import shutil
|
||||
|
||||
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)
|
||||
licenses = get_licenses(d)
|
||||
target_sys = d.getVar('TARGET_SYS', True)
|
||||
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))
|
||||
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:
|
||||
f.write(i)
|
||||
f.write("\n")
|
||||
@@ -394,7 +382,10 @@ def create_diff_gz(d):
|
||||
bb.mkdirhier(dest)
|
||||
for i in os.listdir(os.getcwd()):
|
||||
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")
|
||||
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(){
|
||||
if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
|
||||
work_dir = d.getVar('WORKDIR', True)
|
||||
os.chdir(work_dir)
|
||||
try:
|
||||
for file in os.listdir(os.getcwd()):
|
||||
if file in get_package(d):
|
||||
os.remove(file)
|
||||
os.remove('tar-package')
|
||||
os.remove(os.path.join(work_dir,'tar-package'))
|
||||
except (TypeError,OSError):
|
||||
pass
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ def autotools_dep_prepend(d):
|
||||
if not pn in ['libtool', 'libtool-native'] and not pn.endswith("libtool-cross"):
|
||||
deps += 'libtool-native '
|
||||
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 d.getVar('INHIBIT_DEFAULT_DEPS', True):
|
||||
deps += 'libtool-cross '
|
||||
|
||||
@@ -305,9 +305,32 @@ python () {
|
||||
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
|
||||
if pkgconfigflags:
|
||||
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):
|
||||
if not appends:
|
||||
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)
|
||||
d.appendVar(varname, " " + " ".join(appends))
|
||||
|
||||
@@ -324,11 +347,14 @@ python () {
|
||||
elif len(items) == 4:
|
||||
enable, disable, depend, rdepend = items
|
||||
if flag in pkgconfig:
|
||||
extradeps.append(depend)
|
||||
extrardeps.append(rdepend)
|
||||
extraconf.append(enable)
|
||||
else:
|
||||
extraconf.append(disable)
|
||||
if depend:
|
||||
extradeps.append(depend)
|
||||
if rdepend:
|
||||
extrardeps.append(rdepend)
|
||||
if enable:
|
||||
extraconf.append(enable)
|
||||
elif disable:
|
||||
extraconf.append(disable)
|
||||
appendVar('DEPENDS', extradeps)
|
||||
appendVar('RDEPENDS_${PN}', extrardeps)
|
||||
appendVar('EXTRA_OECONF', extraconf)
|
||||
|
||||
@@ -40,9 +40,6 @@ AUTO_SYSLINUXCFG = "1"
|
||||
SYSLINUX_ROOT ?= "root=/dev/sda2"
|
||||
SYSLINUX_TIMEOUT ?= "10"
|
||||
|
||||
SYSLINUXCFG = "${HDDDIR}/syslinux.cfg"
|
||||
SYSLINUXMENU = "${HDDDIR}/menu"
|
||||
|
||||
inherit syslinux
|
||||
|
||||
build_boot_dd() {
|
||||
|
||||
@@ -300,16 +300,16 @@ buildhistory_get_image_installed() {
|
||||
echo $pkgsize $pkg >> ${BUILDHISTORY_DIR_IMAGE}/installed-package-sizes.tmp
|
||||
fi
|
||||
|
||||
deps=`list_package_depends $pkg | sort | uniq`
|
||||
deps=`list_package_depends $pkg`
|
||||
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
|
||||
|
||||
recs=`list_package_recommends $pkg | sort | uniq`
|
||||
recs=`list_package_recommends $pkg`
|
||||
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 | sort | uniq >> ${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
|
||||
@@ -401,10 +401,15 @@ buildhistory_commit() {
|
||||
if [ "$repostatus" != "" ] ; then
|
||||
git add ${BUILDHISTORY_DIR}/*
|
||||
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
|
||||
git push -q ${BUILDHISTORY_PUSH_REPO}
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@ def copyleft_should_include(d):
|
||||
exclude = oe.data.typed_value('COPYLEFT_LICENSE_EXCLUDE', d)
|
||||
|
||||
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:
|
||||
bb.fatal('%s: %s' % (d.getVar('PF', True), exc))
|
||||
else:
|
||||
if is_included:
|
||||
return True, None
|
||||
return True, 'recipe has included licenses: %s' % ', '.join(reason)
|
||||
else:
|
||||
return False, 'recipe has excluded licenses: %s' % ', '.join(excluded)
|
||||
return False, 'recipe has excluded licenses: %s' % ', '.join(reason)
|
||||
|
||||
python do_prepare_copyleft_sources () {
|
||||
"""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))
|
||||
return
|
||||
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)
|
||||
src_uri = d.getVar('SRC_URI', True).split()
|
||||
|
||||
@@ -48,7 +48,9 @@ DPKG_ARCH = "${SDK_ARCH}"
|
||||
CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
|
||||
CFLAGS = "${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"
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
inherit cross
|
||||
|
||||
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_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ python do_checkpkg() {
|
||||
such as:
|
||||
gnome-common-2.20.0.tar.gz (most common format)
|
||||
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
|
||||
blktool_4.orig.tar.gz
|
||||
libid3tag-0.15.1b.tar.gz
|
||||
|
||||
@@ -57,7 +57,7 @@ python populate_packages_append () {
|
||||
prerm += d.getVar('gconf_prerm', True)
|
||||
d.setVar('pkg_prerm_%s' % pkg, prerm)
|
||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||
rdepends += " gconf"
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'gconf'
|
||||
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
||||
|
||||
}
|
||||
|
||||
@@ -328,6 +328,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
|
||||
target_os = d.getVar('TARGET_OS', True)
|
||||
target_arch = d.getVar('TARGET_ARCH', True)
|
||||
provides = d.getVar('PROVIDES', d, True)
|
||||
bpn = d.getVar('BPN', True)
|
||||
|
||||
# FIXME: Cross package confuse this check, so just skip them
|
||||
for s in ['cross', 'nativesdk', 'cross-canadian']:
|
||||
|
||||
@@ -20,7 +20,9 @@ def find_sccs(d):
|
||||
sources_list=[]
|
||||
for s in sources:
|
||||
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)
|
||||
|
||||
return sources_list
|
||||
@@ -73,72 +75,9 @@ do_patch() {
|
||||
fi
|
||||
|
||||
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
|
||||
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
|
||||
# list that is passed to the kernel build scripts.
|
||||
if [ -n "${KERNEL_FEATURES}" ]; then
|
||||
@@ -146,9 +85,10 @@ do_patch() {
|
||||
addon_features="$addon_features --feature $feat"
|
||||
done
|
||||
fi
|
||||
|
||||
# updates or generates the target description
|
||||
updateme --branch ${kbranch} -DKDESC=${KMACHINE}:${LINUX_KERNEL_TYPE} \
|
||||
${addon_features} ${ARCH} ${KMACHINE} ${patch_dirs}
|
||||
${addon_features} ${ARCH} ${KMACHINE} ${sccs} ${patches}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR. Could not update ${kbranch}"
|
||||
exit 1
|
||||
|
||||
@@ -35,6 +35,14 @@ python __anonymous () {
|
||||
d.setVar("DEPENDS", depends)
|
||||
d.setVar("GLIBC_INTERNAL_USE_BINARY_LOCALE", "compile")
|
||||
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}"
|
||||
@@ -249,7 +257,7 @@ python package_do_split_gconvs () {
|
||||
else:
|
||||
libc_name = name
|
||||
d.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('%s-binary-localedata-%s' \
|
||||
% (bpn, libc_name)))
|
||||
% (d.getVar('MLPREFIX') + bpn, libc_name)))
|
||||
|
||||
commands = {}
|
||||
|
||||
@@ -271,6 +279,7 @@ python package_do_split_gconvs () {
|
||||
"mips": " --uint32-align=4 --big-endian ", \
|
||||
"mipsel": " --uint32-align=4 --little-endian ", \
|
||||
"i586": " --uint32-align=4 --little-endian ", \
|
||||
"i686": " --uint32-align=4 --little-endian ", \
|
||||
"x86_64": " --uint32-align=4 --little-endian " }
|
||||
|
||||
if target_arch in locale_arch_options:
|
||||
|
||||
@@ -79,6 +79,10 @@ license_create_manifest() {
|
||||
# Get list of installed packages
|
||||
list_installed_packages | grep -v "locale" |sort > ${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
|
||||
for pkg in ${INSTALLED_PKGS}; do
|
||||
# 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:
|
||||
# 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)
|
||||
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 not ret:
|
||||
bb.warn("%s for %s could not be copied for some reason. It may not exist. WARN for now." % (spdx_generic, pn))
|
||||
else:
|
||||
# And here is where we warn people that their licenses are lousy
|
||||
|
||||
@@ -20,6 +20,9 @@ python multilib_virtclass_handler () {
|
||||
val=e.data.getVar(name, True)
|
||||
if val:
|
||||
e.data.setVar(name + "_MULTILIB_ORIGINAL", val)
|
||||
|
||||
# Expand this since this won't work correctly once we set a multilib into place
|
||||
e.data.setVar("ALL_MULTILIB_PACKAGE_ARCHS", e.data.getVar("ALL_MULTILIB_PACKAGE_ARCHS", True))
|
||||
|
||||
override = ":virtclass-multilib-" + variant
|
||||
|
||||
|
||||
@@ -13,13 +13,7 @@ LIBCOVERRIDE = ""
|
||||
# Update PACKAGE_ARCH and PACKAGE_ARCHS
|
||||
#
|
||||
PACKAGE_ARCH = "${SDK_ARCH}-nativesdk"
|
||||
python () {
|
||||
archs = d.getVar('PACKAGE_ARCHS', True).split()
|
||||
sdkarchs = []
|
||||
for arch in archs:
|
||||
sdkarchs.append(arch + '-nativesdk')
|
||||
d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs))
|
||||
}
|
||||
PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}"
|
||||
|
||||
STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"
|
||||
STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}"
|
||||
|
||||
@@ -1263,6 +1263,7 @@ python package_do_shlibs() {
|
||||
lf = bb.utils.lockfile(d.expand("${PACKAGELOCK}"))
|
||||
|
||||
def linux_so(root, path, file):
|
||||
needs_ldconfig = False
|
||||
cmd = d.getVar('OBJDUMP', True) + " -p " + pipes.quote(os.path.join(root, file)) + " 2>/dev/null"
|
||||
cmd = "PATH=\"%s\" %s" % (d.getVar('PATH', True), cmd)
|
||||
fd = os.popen(cmd)
|
||||
@@ -1283,6 +1284,7 @@ python package_do_shlibs() {
|
||||
needs_ldconfig = True
|
||||
if snap_symlinks and (file != this_soname):
|
||||
renames.append((os.path.join(root, file), os.path.join(root, this_soname)))
|
||||
return needs_ldconfig
|
||||
|
||||
def darwin_so(root, path, file):
|
||||
fullpath = os.path.join(root, file)
|
||||
@@ -1382,7 +1384,8 @@ python package_do_shlibs() {
|
||||
if targetos == "darwin" or targetos == "darwin8":
|
||||
darwin_so(root, dirs, file)
|
||||
elif os.access(path, os.X_OK) or lib_re.match(file):
|
||||
linux_so(root, dirs, file)
|
||||
ldconfig = linux_so(root, dirs, file)
|
||||
needs_ldconfig = needs_ldconfig or ldconfig
|
||||
for (old, new) in renames:
|
||||
bb.note("Renaming %s to %s" % (old, new))
|
||||
os.rename(old, new)
|
||||
|
||||
@@ -83,7 +83,7 @@ package_update_index_deb () {
|
||||
continue;
|
||||
fi
|
||||
cd ${DEPLOY_DIR_DEB}/$arch
|
||||
dpkg-scanpackages . | bzip2 > Packages.bz2
|
||||
dpkg-scanpackages . | gzip > Packages.gz
|
||||
echo "Label: $arch" > Release
|
||||
done
|
||||
}
|
||||
@@ -421,6 +421,7 @@ python do_package_write_deb () {
|
||||
bb.build.exec_func("do_package_deb", d)
|
||||
}
|
||||
do_package_write_deb[dirs] = "${PKGWRITEDIRDEB}"
|
||||
do_package_write_deb[umask] = "022"
|
||||
addtask package_write_deb before do_package_write after do_package
|
||||
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ package_tryout_install_multilib_ipk() {
|
||||
local pkgname_prefix="${item}-"
|
||||
local pkgname_len=${#pkgname_prefix}
|
||||
for pkg in ${INSTALL_PACKAGES_MULTILIB_IPK}; do
|
||||
local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var - 1); print pkgname; }' )
|
||||
local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var); print pkgname; }' )
|
||||
if [ ${pkgname} = ${pkgname_prefix} ]; then
|
||||
selected_pkg="${selected_pkg} ${pkg}"
|
||||
fi
|
||||
@@ -97,7 +97,7 @@ split_multilib_packages() {
|
||||
for item in ${MULTILIB_VARIANTS}; do
|
||||
local pkgname_prefix="${item}-"
|
||||
local pkgname_len=${#pkgname_prefix}
|
||||
local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var - 1); print pkgname; }' )
|
||||
local pkgname=$(echo $pkg | awk -v var=$pkgname_len '{ pkgname=substr($1, 1, var); print pkgname; }' )
|
||||
if [ ${pkgname} = ${pkgname_prefix} ]; then
|
||||
is_multilib=1
|
||||
break
|
||||
@@ -214,7 +214,7 @@ package_update_index_ipk () {
|
||||
for pkgdir in $packagedirs; do
|
||||
if [ -e $pkgdir/ ]; then
|
||||
touch $pkgdir/Packages
|
||||
flock $pkgdir/Packages.flock -c "opkg-make-index -r $pkgdir/Packages -p $pkgdir/Packages -l $pkgdir/Packages.filelist -m $pkgdir/"
|
||||
flock $pkgdir/Packages.flock -c "opkg-make-index -r $pkgdir/Packages -p $pkgdir/Packages -m $pkgdir/"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -453,6 +453,7 @@ python do_package_write_ipk () {
|
||||
bb.build.exec_func("do_package_ipk", d)
|
||||
}
|
||||
do_package_write_ipk[dirs] = "${PKGWRITEDIRIPK}"
|
||||
do_package_write_ipk[umask] = "022"
|
||||
addtask package_write_ipk before do_package_write after do_package
|
||||
|
||||
PACKAGEINDEXES += "package_update_index_ipk;"
|
||||
|
||||
@@ -158,6 +158,7 @@ rpm_common_comand () {
|
||||
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
|
||||
-D "_var ${localstatedir}" \
|
||||
-D "_dbpath ${rpmlibdir}" \
|
||||
-D "_tmppath /install/tmp" \
|
||||
--noparentdirs --nolinktos \
|
||||
-D "__dbi_txn create nofsync private" \
|
||||
-D "_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper" $@
|
||||
@@ -166,22 +167,23 @@ rpm_common_comand () {
|
||||
# install or remove the pkg
|
||||
rpm_update_pkg () {
|
||||
|
||||
manifest=$1
|
||||
btmanifest=$manifest.bt
|
||||
local target_rootfs="${INSTALL_ROOTFS_RPM}"
|
||||
|
||||
# Save the rpm's build time for incremental image generation, and the file
|
||||
# would be moved to ${T}
|
||||
rm -f ${target_rootfs}/install/total_solution_bt.manifest
|
||||
for i in `cat ${target_rootfs}/install/total_solution.manifest`; do
|
||||
rm -f $btmanifest
|
||||
for i in `cat $manifest`; do
|
||||
# Use "rpm" rather than "${RPM}" here, since we don't need the
|
||||
# '--dbpath' option
|
||||
echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> \
|
||||
${target_rootfs}/install/total_solution_bt.manifest
|
||||
echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> $btmanifest
|
||||
done
|
||||
|
||||
# Only install the different pkgs if incremental image generation is set
|
||||
if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest -a \
|
||||
"${IMAGE_PKGTYPE}" = "rpm" ]; then
|
||||
cur_list="${target_rootfs}/install/total_solution_bt.manifest"
|
||||
cur_list="$btmanifest"
|
||||
pre_list="${T}/total_solution_bt.manifest"
|
||||
sort -u $cur_list -o $cur_list
|
||||
sort -u $pre_list -o $pre_list
|
||||
@@ -203,8 +205,7 @@ rpm_update_pkg () {
|
||||
-Uvh ${target_rootfs}/install/incremental.manifest
|
||||
else
|
||||
# Attempt to install
|
||||
rpm_common_comand --replacepkgs \
|
||||
-Uhv ${target_rootfs}/install/total_solution.manifest
|
||||
rpm_common_comand --replacepkgs -Uhv $manifest
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -440,14 +441,7 @@ package_install_internal_rpm () {
|
||||
|
||||
fi
|
||||
|
||||
# If base-passwd or shadow are in the list of packages to install,
|
||||
# ensure they are installed first to support later packages that
|
||||
# may create custom users/groups (fixes Yocto bug #2127)
|
||||
infile=${target_rootfs}/install/install_solution.manifest
|
||||
outfile=${target_rootfs}/install/total_solution.manifest
|
||||
cat $infile | grep /base-passwd-[0-9] > $outfile || true
|
||||
cat $infile | grep /shadow-[0-9] >> $outfile || true
|
||||
cat $infile | grep -v /shadow-[0-9] | grep -v /base-passwd-[0-9] >> $outfile || true
|
||||
cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest
|
||||
cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest
|
||||
|
||||
# Construct install scriptlet wrapper
|
||||
@@ -474,8 +468,45 @@ EOF
|
||||
|
||||
chmod 0755 ${WORKDIR}/scriptlet_wrapper
|
||||
|
||||
rpm_update_pkg
|
||||
# RPM is special. It can't handle dependencies and preinstall scripts correctly. Its
|
||||
# probably a feature. The only way to convince rpm to actually run the preinstall scripts
|
||||
# for base-passwd and shadow first before installing packages that depend on these packages
|
||||
# is to do two image installs, installing one set of packages, then the other.
|
||||
if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest ]; then
|
||||
echo "Skipping pre install due to exisitng image"
|
||||
else
|
||||
echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest
|
||||
echo "Installing base dependencies first (base-passwd, base-files and shadow) since rpm is special"
|
||||
grep /base-passwd-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
|
||||
grep /base-files-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
|
||||
grep /shadow-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
|
||||
|
||||
# Generate an install solution by doing a --justdb install, then recreate it with
|
||||
# an actual package install!
|
||||
mkdir -p ${target_rootfs}/initial
|
||||
|
||||
${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
|
||||
--predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
|
||||
-D "_dbpath ${target_rootfs}/initial" -D "`cat ${confbase}.macro`" \
|
||||
-D "__dbi_txn create nofsync" \
|
||||
-U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
|
||||
${target_rootfs}/install/initial_install.manifest
|
||||
|
||||
${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --yaml \
|
||||
-D "__dbi_txn create nofsync private" \
|
||||
| grep -i 'Packageorigin' | cut -d : -f 2 > ${target_rootfs}/install/initial_solution.manifest
|
||||
|
||||
rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest
|
||||
|
||||
grep -Fv -f ${target_rootfs}/install/initial_solution.manifest ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution.manifest.new
|
||||
mv ${target_rootfs}/install/total_solution.manifest.new ${target_rootfs}/install/total_solution.manifest
|
||||
|
||||
rm -rf ${target_rootfs}/initial
|
||||
fi
|
||||
|
||||
echo "Installing main solution manifest (${target_rootfs}/install/total_solution.manifest)"
|
||||
|
||||
rpm_update_pkg ${target_rootfs}/install/total_solution.manifest
|
||||
}
|
||||
|
||||
python write_specfile () {
|
||||
@@ -1103,6 +1134,7 @@ python do_package_write_rpm () {
|
||||
}
|
||||
|
||||
do_package_write_rpm[dirs] = "${PKGWRITEDIRRPM}"
|
||||
do_package_write_rpm[umask] = "022"
|
||||
addtask package_write_rpm before do_package_write after do_package
|
||||
|
||||
PACKAGEINDEXES += "package_update_index_rpm; createrepo ${DEPLOY_DIR_RPM};"
|
||||
|
||||
@@ -20,14 +20,25 @@ python packageinfo_handler () {
|
||||
pkgrename = sdata['PKG_%s' % pkgname]
|
||||
pkgv = sdata['PKGV'].replace('-', '+')
|
||||
pkgr = sdata['PKGR']
|
||||
# We found there are some renaming issue with certain architecture.
|
||||
# For example, armv7a-vfp-neon, it will use armv7a in the rpm file. This is the workaround for it.
|
||||
arch_tmp = arch.split('-')[0]
|
||||
if os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgname + '-' + pkgv + '-' + pkgr + '.' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgname + '-' + pkgv + '-' + pkgr + '.' + arch_tmp + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '-' + pkgv + '-' + pkgr + '.' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '-' + pkgv + '-' + pkgr + '.' + arch_tmp + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgname + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging):
|
||||
pkgname + '_' + pkgv + '-' + pkgr + '_' + arch_tmp + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch + '.' + packaging) or \
|
||||
os.path.exists(deploy_dir + '/' + arch + '/' + \
|
||||
pkgrename + '_' + pkgv + '-' + pkgr + '_' + arch_tmp + '.' + packaging):
|
||||
pkginfolist.append(sdata)
|
||||
bb.event.fire(bb.event.PackageInfo(pkginfolist), e.data)
|
||||
}
|
||||
|
||||
@@ -2,5 +2,6 @@ DEPENDS_prepend = "pkgconfig-native "
|
||||
|
||||
PKGCONFIGRDEP = "pkgconfig"
|
||||
PKGCONFIGRDEP_virtclass-native = ""
|
||||
PKGCONFIGRDEP_virtclass-nativesdk = "pkgconfig-nativesdk"
|
||||
|
||||
RDEPENDS_${PN}-dev += "${PKGCONFIGRDEP}"
|
||||
|
||||
@@ -127,10 +127,12 @@ list_installed_packages() {
|
||||
}
|
||||
|
||||
get_package_filename() {
|
||||
set +x
|
||||
info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true`
|
||||
name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'`
|
||||
name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
|
||||
name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'`
|
||||
set -x
|
||||
|
||||
fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true`
|
||||
if [ "$fullname" = "" ] ; then
|
||||
|
||||
@@ -120,10 +120,11 @@ def check_supported_distro(e):
|
||||
if os.path.exists("/etc/redhat-release"):
|
||||
f = open("/etc/redhat-release", "r")
|
||||
try:
|
||||
distro = f.readline()
|
||||
distro = f.readline().strip()
|
||||
finally:
|
||||
f.close()
|
||||
elif os.path.exists("/etc/SuSE-release"):
|
||||
import re
|
||||
f = open("/etc/SuSE-release", "r")
|
||||
try:
|
||||
distro = f.readline()
|
||||
@@ -378,7 +379,7 @@ def check_sanity(e):
|
||||
if last_sstate_dir != sstate_dir:
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
|
||||
|
||||
if os.path.exists("conf"):
|
||||
if os.path.exists("conf") and not messages:
|
||||
f = file(sanityverfile, 'w')
|
||||
f.write("SANITY_VERSION %s\n" % sanity_version)
|
||||
f.write("TMPDIR %s\n" % tmpdir)
|
||||
|
||||
@@ -69,15 +69,16 @@ done
|
||||
}
|
||||
|
||||
update_alternatives_batch_doinstall() {
|
||||
if [ "${PN}" = "${BPN}" ] ; then
|
||||
for link in ${ALTERNATIVE_LINKS}
|
||||
do
|
||||
mv ${D}${link} ${D}${link}.${PN}
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
def update_alternatives_after_parse(d):
|
||||
if bb.data.inherits_class('native', d) or bb.data.inherits_class('nativesdk', d):
|
||||
return
|
||||
|
||||
if d.getVar('ALTERNATIVE_LINKS') != None:
|
||||
doinstall = d.getVar('do_install', 0)
|
||||
doinstall += d.getVar('update_alternatives_batch_doinstall', 0)
|
||||
|
||||
@@ -201,7 +201,8 @@ fakeroot python populate_packages_prepend () {
|
||||
|
||||
# RDEPENDS setup
|
||||
rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
|
||||
rdepends += " base-passwd shadow"
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'base-passwd'
|
||||
rdepends += ' ' + d.getVar('MLPREFIX') + 'shadow'
|
||||
d.setVar("RDEPENDS_%s" % pkg, rdepends)
|
||||
|
||||
# Add the user/group preinstall scripts and RDEPENDS requirements
|
||||
|
||||
@@ -96,7 +96,6 @@ TUNE_CCARGS ??= ""
|
||||
TUNE_LDARGS ??= ""
|
||||
TUNE_ASARGS ??= ""
|
||||
TUNE_FEATURES ??= "${TUNE_FEATURES_tune-${DEFAULTTUNE}}"
|
||||
TUNE_PKGARCH ??= "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
|
||||
LIBCEXTENSION ??= ""
|
||||
ABIEXTENSION ??= ""
|
||||
|
||||
@@ -649,6 +648,7 @@ CPU_FEATURES_arm ?= "vfp"
|
||||
# Include the rest of the config files.
|
||||
##################################################################
|
||||
|
||||
require conf/abi_version.conf
|
||||
include conf/site.conf
|
||||
include conf/auto.conf
|
||||
include conf/local.conf
|
||||
@@ -660,7 +660,6 @@ include conf/distro/${DISTRO}.conf
|
||||
include conf/distro/defaultsetup.conf
|
||||
include conf/documentation.conf
|
||||
require conf/sanity.conf
|
||||
require conf/abi_version.conf
|
||||
|
||||
##################################################################
|
||||
# Weak variables (usually to retain backwards compatibility)
|
||||
@@ -738,7 +737,7 @@ BB_CONSOLELOG ?= "${TMPDIR}/cooker.log.${DATETIME}"
|
||||
|
||||
# Setup our default hash policy
|
||||
BB_SIGNATURE_HANDLER ?= "OEBasic"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE"
|
||||
BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY"
|
||||
|
||||
MLPREFIX ??= ""
|
||||
|
||||
@@ -10,12 +10,14 @@ LIMIT_BUILT_LOCALES ?= "POSIX en_US en_GB"
|
||||
ENABLE_BINARY_LOCALE_GENERATION ?= "1"
|
||||
LOCALE_UTF8_ONLY ?= "0"
|
||||
|
||||
DISTRO_FEATURES_LIBC ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
|
||||
DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
|
||||
libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
|
||||
libc-getlogin libc-idn libc-inet-anl libc-libm libc-libm-big libc-locales libc-locale-code \
|
||||
libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
|
||||
libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
|
||||
libc-posix-wchar-io"
|
||||
DISTRO_FEATURES_LIBC ?= "${DISTRO_FEATURES_LIBC_DEFAULT}"
|
||||
DISTRO_FEATURES_LIBC_virtclass-nativesdk = "${DISTRO_FEATURES_LIBC_DEFAULT}"
|
||||
DISTRO_FEATURES ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g x11 ${DISTRO_FEATURES_LIBC}"
|
||||
|
||||
IMAGE_FEATURES ?= ""
|
||||
|
||||
@@ -248,6 +248,14 @@ RECIPE_MANUAL_CHECK_DATE_pn-gpgme = "Jul 28, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-gpgme = "Jul 28, 2011"
|
||||
RECIPE_MAINTAINER_pn-gpgme = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
|
||||
RECIPE_STATUS_pn-ocf-linux = "green"
|
||||
RECIPE_LATEST_VERSION_pn-ocf-linux = "20120127"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-ocf-linux = "6 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-ocf-linux = "Jan 27, 2012"
|
||||
RECIPE_LAST_UPDATE_pn-ocf-linux = "Nov 30, 2011"
|
||||
RECIPE_MAINTAINER_pn-ocf-linux = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-ocf-linux = ""
|
||||
|
||||
RECIPE_STATUS_pn-expat = "green"
|
||||
RECIPE_DEPENDENCY_CHECK_pn-expat = "not done"
|
||||
RECIPE_LATEST_VERSION_pn-expat = "2.0.1"
|
||||
@@ -1124,6 +1132,9 @@ RECIPE_LAST_UPDATE_pn-shadow = "Jun 4, 2011"
|
||||
RECIPE_MAINTAINER_pn-shadow = "Scott Garman <scott.a.garman@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-shadow-sysroot = "Ubuntu=shadow Fedora=shadow"
|
||||
|
||||
RECIPE_MAINTAINER_pn-shadow-securetty = "Scott Garman <scott.a.garman@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-shadow-securetty = "Ubuntu=shadow Fedora=shadow"
|
||||
|
||||
RECIPE_STATUS_pn-coreutils = "green"
|
||||
RECIPE_LAST_UPDATE_pn-coreutils = "Jul 2, 2011"
|
||||
RECIPE_MAINTAINER_pn-coreutils = "Shane Wang <shane.wang@intel.com>"
|
||||
@@ -1460,6 +1471,7 @@ RECIPE_PATCH_pn-portmap+no-tcpd-support = "override default build method"
|
||||
RECIPE_INTEL_SECTION_pn-portmap = "base utils"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-portmap = "n/a"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-portmap = "May 01, 2007"
|
||||
DISTRO_PN_ALIAS_pn-portmap = "OpenSuSE=portmap"
|
||||
RECIPE_COMMENTS_pn-portmap = "most part is under 4-clause BSD, Sun RPC code is under another license, however debian portmap package licenses RPC code under 3-clause BSD. This needs further investigation"
|
||||
|
||||
RECIPE_STATUS_pn-grub = "green"
|
||||
@@ -1518,15 +1530,16 @@ RECIPE_COMMENTS_pn-bash = ""
|
||||
|
||||
RECIPE_STATUS_pn-syslinux = "yellow"
|
||||
# need mangling on LDFLAGS
|
||||
RECIPE_LAST_UPDATE_pn-syslinux = "Nov 16, 2010"
|
||||
RECIPE_LAST_UPDATE_pn-syslinux = "Apr 4, 2012"
|
||||
RECIPE_MAINTAINER_pn-syslinux = "Darren Hart <dvhart@linux.intel.com>"
|
||||
RECIPE_DEPENDENCY_CHECK_pn-syslinux = "not done"
|
||||
RECIPE_LATEST_VERSION_pn-syslinux = "3.86"
|
||||
RECIPE_LATEST_VERSION_pn-syslinux = "4.03"
|
||||
RECIPE_PATCH_pn-syslinux+cross-build = "use poky toolchain instead of host"
|
||||
RECIPE_INTEL_SECTION_pn-syslinux = "base utils"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-syslinux = "2 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-syslinux = "Apr 01, 2010"
|
||||
RECIPE_COMMENTS_pn-syslinux = ""
|
||||
RECIPE_NO_UPDATE_REASON_pn-syslinux="Waiting for 4.06 for 3.3 kernel headers support"
|
||||
|
||||
RECIPE_STATUS_pn-sysvinit = "green"
|
||||
RECIPE_LAST_UPDATE_pn-sysvinit = "Jun 18, 2010"
|
||||
@@ -1725,6 +1738,7 @@ RECIPE_DEPENDENCY_CHECK_pn-avahi-ui = "not done"
|
||||
RECIPE_INTEL_SECTION_pn-avahi-ui = "base utils"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-avahi-ui = "3 month"
|
||||
RECIPE_COMMENTS_pn-avahi-ui = ""
|
||||
DISTRO_PN_ALIAS_pn-avahi-ui = "Ubuntu=avahi-discover Debian=avahi-discover"
|
||||
|
||||
RECIPE_STATUS_pn-js = "yellow"
|
||||
# may not work for platforms other than 32bit x86
|
||||
@@ -2005,6 +2019,14 @@ RECIPE_LATEST_VERSION_pn-u-boot-mkimage = "2010.03"
|
||||
RECIPE_LAST_UPDATE_pn-u-boot-mkimage = "Dec 15, 2009"
|
||||
RECIPE_MAINTAINER_pn-u-boot-mkimage = "Saul Wold <sgw@linux.intel.com>"
|
||||
|
||||
RECIPE_STATUS_pn-u-boot-fw-utils = "green"
|
||||
RECIPE_LATEST_VERSION_pn-u-boot-fw-utils = "2011.12"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-u-boot-fw-utils = "3 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-u-boot-fw-utils = "Dec 23, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-u-boot-fw-utils = "Feb 10, 2012"
|
||||
RECIPE_MAINTAINER_pn-u-boot-fw-utils = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-u-boot-fw-utils = "Ubuntu=u-boot-tools Debian=u-boot-tools"
|
||||
|
||||
RECIPE_STATUS_pn-zaurusd = "green"
|
||||
RECIPE_LATEST_VERSION_pn-zaurusd = "0.0+svnr426"
|
||||
DISTRO_PN_ALIAS_pn-zaurusd = "OpenedHand"
|
||||
@@ -2056,6 +2078,7 @@ RECIPE_LATEST_VERSION_pn-stat = "3.3"
|
||||
RECIPE_LAST_UPDATE_pn-stat = "Dec 30, 2011"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-stat = "Dec 30, 2011"
|
||||
RECIPE_MAINTAINER_pn-stat = "Shane Wang <shane.wang@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-stat = "Debian=coreutils Fedora=coreutils"
|
||||
|
||||
RECIPE_STATUS_pn-hdparm = "red"
|
||||
RECIPE_LATEST_VERSION_pn-hdparm = "9.39"
|
||||
@@ -2790,6 +2813,9 @@ RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-alsa-lib="12 months"
|
||||
RECIPE_LAST_UPDATE_pn-alsa-lib = "Mar 14, 2012"
|
||||
RECIPE_MAINTAINER_pn-alsa-lib = "Dongxiao Xu <dongxiao.xu@intel.com>"
|
||||
|
||||
RECIPE_MAINTAINER_pn-alsa-state = "Dongxiao Xu <dongxiao.xu@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-alsa-state = "OE-Core"
|
||||
|
||||
RECIPE_STATUS_pn-tremor="green"
|
||||
RECIPE_LATEST_VERSION_pn-tremor="20120122"
|
||||
RECIPE_NO_OF_PATCHES_pn-tremor="0"
|
||||
@@ -3042,6 +3068,17 @@ RECIPE_COMMENTS_pn-lttng-viewer = ""
|
||||
RECIPE_LAST_UPDATE_pn-lttng-viewer = "Apr 20, 2011"
|
||||
RECIPE_MAINTAINER_pn-lttng-viewer = "Dexuan Cui <dexuan.cui@intel.com>"
|
||||
|
||||
RECIPE_STATUS_pn-lttng-tools = "green"
|
||||
RECIPE_LATEST_VERSION_pn-lttng-tools = "unknown"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-lttng-tools = "unknown"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-lttng-tools = "unknown"
|
||||
RECIPE_LAST_UPDATE_pn-lttng-tools = "Jan 17, 2012"
|
||||
RECIPE_MAINTAINER_pn-lttng-tools = "Dexuan Cui <dexuan.cui@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-lttng-tools = ""
|
||||
|
||||
RECIPE_MAINTAINER_pn-systemtap-uprobes = "Tom Zanussi <tom.zanussi@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-systemtap-uprobes = "Ubuntu=systemtap Debian=systemtap"
|
||||
|
||||
RECIPE_STATUS_pn-blktrace = "red"
|
||||
RECIPE_LATEST_VERSION_pn-blktrace = "1.0.1"
|
||||
RECIPE_NO_OF_PATCHES_pn-blktrace = "1"
|
||||
@@ -3686,6 +3723,25 @@ RECIPE_LAST_UPDATE_pn-qt4-x11-free = "Dec 15, 2011"
|
||||
RECIPE_MAINTAINER_pn-qt4-x11-free = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt4-x11-free = "Ubuntu=qt-x11-free Debian=qt-x11-free"
|
||||
|
||||
RECIPE_MAINTAINER_pn-qt4-graphics-system = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt4-graphics-system = "OE-Core"
|
||||
|
||||
RECIPE_STATUS_pn-qt-mobility-embedded = "green"
|
||||
RECIPE_LATEST_VERSION_pn-qt-mobility-embedded = "1.2.0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-qt-mobility-embedded = "1 week"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-qt-mobility-embedded = "May 10, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-qt-mobility-embedded = "Apr 04, 2012"
|
||||
RECIPE_MAINTAINER_pn-qt-mobility-embedded = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt-mobility-embedded = "Ubuntu=qtmobility-dev Debian=qtmobility-dev"
|
||||
|
||||
RECIPE_STATUS_pn-qt-mobility-x11 = "green"
|
||||
RECIPE_LATEST_VERSION_pn-qt-mobility-x11 = "1.2.0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-qt-mobility-x11 = "1 week"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-qt-mobility-x11 = "May 10, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-qt-mobility-x11 = "Apr 04, 2012"
|
||||
RECIPE_MAINTAINER_pn-qt-mobility-x11 = "Paul Eggleton <paul.eggleton@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-qt-mobility-x11 = "Ubuntu=qtmobility-dev Debian=qtmobility-dev"
|
||||
|
||||
RECIPE_STATUS_pn-quicky = "green"
|
||||
# no update needed
|
||||
RECIPE_LATEST_VERSION_pn-quicky = "0.4"
|
||||
@@ -3815,7 +3871,7 @@ RECIPE_STATUS_pn-xf86-input-evdev="green"
|
||||
DISTRO_PN_ALIAS_pn-xf86-input-evdev = "Ubuntu=xserver-xorg-input-evdev Mandriva=x11-driver-input-evdev Debian=xserver-xorg-input-evdev Fedora=xorg-x11-drv-evdev Meego=xorg-x11-drv-evdev"
|
||||
RECIPE_LATEST_VERSION_pn-xf86-input-evdev="2.6.0"
|
||||
RECIPE_NO_OF_PATCHES_pn-xf86-input-evdev="0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-input-evdev="1 monthes"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-input-evdev="1 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-input-evdev="Aug 23, 2010"
|
||||
RECIPE_INTEL_SECTION_pn-xf86-input-evdev="graphic core"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-input-evdev = "Jan 18, 2011"
|
||||
@@ -3826,7 +3882,7 @@ RECIPE_STATUS_pn-xf86-video-vmware="green"
|
||||
DISTRO_PN_ALIAS_pn-xf86-video-vmware = "Debian=xserver-xorg-video-vmware Fedora=xorg-x11-drv-vmware Mandriva=x11-driver-video-vmware Ubuntu=xserver-xorg-video-vmware"
|
||||
RECIPE_LATEST_VERSION_pn-xf86-video-vmware="11.0.3"
|
||||
RECIPE_NO_OF_PATCHES_pn-xf86-video-vmware="0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vmware="2 monthes"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vmware="2 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-video-vmware="Nov 09, 2010"
|
||||
RECIPE_INTEL_SECTION_pn-xf86-video-vmware="graphic core"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-video-vmware = "Nov 12, 2010"
|
||||
@@ -3836,13 +3892,21 @@ RECIPE_STATUS_pn-xf86-video-vesa = "green"
|
||||
# no update needed
|
||||
RECIPE_LATEST_VERSION_pn-xf86-video-vesa = "2.3.0"
|
||||
RECIPE_NO_OF_PATCHES_pn-xf86-video-vesa = "0"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vesa = "6 monthes"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-vesa = "6 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-video-vesa = "Jan 04, 2010"
|
||||
RECIPE_INTEL_SECTION_pn-xf86-video-vesa = "graphic core"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-video-vesa = "May 17, 2010"
|
||||
RECIPE_MAINTAINER_pn-xf86-video-vesa = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-xf86-video-vesa = "Debian=xserver-xorg-video-vesa Fedora=xorg-x11-drv-vesa Mandriva=x11-driver-video-vesa Ubuntu=xserver-xorg-video-vesa"
|
||||
|
||||
RECIPE_STATUS_pn-xf86-video-fbdev = "green"
|
||||
RECIPE_LATEST_VERSION_pn-xf86-video-fbdev = "0.4.2"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-xf86-video-fbdev = "unknown"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-xf86-video-fbdev = "unknown"
|
||||
RECIPE_LAST_UPDATE_pn-xf86-video-fbdev = "Jan 06, 2012"
|
||||
RECIPE_MAINTAINER_pn-xf86-video-fbdev = "Saul Wold <sgw@linux.intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-xf86-video-fbdev = "Ubuntu=xserver-xorg-video-fbdev Debian=xserver-xorg-video-fbdev"
|
||||
|
||||
RECIPE_STATUS_pn-cairo="green"
|
||||
# no update needed
|
||||
RECIPE_LATEST_VERSION_pn-cairo="1.9.10"
|
||||
@@ -4631,6 +4695,7 @@ RECIPE_LATEST_RELEASE_DATE_pn-libxxf86misc = "Nov 21, 2010"
|
||||
RECIPE_COMMENTS_pn-libxxf86misc = ""
|
||||
RECIPE_LAST_UPDATE_pn-libxxf86misc = "Jan 5, 2011"
|
||||
RECIPE_MAINTAINER_pn-libxxf86misc = "Dexuan Cui <dexuan.cui@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-libxxf86misc = "Mandriva=libxxf86misc Fedora=libXxf86misc"
|
||||
|
||||
RECIPE_STATUS_pn-libxxf86vm = "green"
|
||||
RECIPE_DEPENDENCY_CHECK_pn-libxxf86vm = "not done"
|
||||
@@ -4854,6 +4919,7 @@ RECIPE_LATEST_VERSION_pn-directfb = "1.5.3"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-direcfb = "Aug 9, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-directfb = "Nov 7, 2011"
|
||||
RECIPE_MAINTAINER_pn-directfb = "Xiaofeng Yan <xiaofeng.yan@windriver.com>"
|
||||
DISTRO_PN_ALIAS_pn-directfb-examples = "Debian=directfb Fedora=directfb"
|
||||
|
||||
RECIPE_STATUS_pn-libarchive = "green"
|
||||
RECIPE_LATEST_VERSION_pn-libarchive = "2.8.5"
|
||||
@@ -5420,6 +5486,14 @@ RECIPE_LAST_UPDATE_pn-webkit-gtk = "Jul 11, 2011"
|
||||
RECIPE_MAINTAINER_pn-webkit-gtk = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-webkit-gtk = "Fedora=webkitgtk Ubuntu=libwebkit"
|
||||
|
||||
RECIPE_STATUS_pn-libjson = "green"
|
||||
RECIPE_LATEST_VERSION_pn-libjson = "0.9"
|
||||
RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-libjson = "7 months"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-libjson = "Jul 31, 2009"
|
||||
RECIPE_LAST_UPDATE_pn-libjson = "Nov 29, 2011"
|
||||
RECIPE_MAINTAINER_pn-libjson = "Nitin A Kamble <nitin.a.kamble@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-libjson = "Ubuntu=libjson0-dev Debian=libjson0-dev"
|
||||
|
||||
RECIPE_STATUS_pn-eds-dbus = "green"
|
||||
DISTRO_PN_ALIAS_pn-eds-dbus = "Debian=evolution-data-server Fedora=evolution-data-server Mandriva=evolution-data-server OpenSuSE=evolution-data-server Ubuntu=evolution-data-server"
|
||||
RECIPE_DEPENDENCY_CHECK_pn-eds-dbus = "not done"
|
||||
@@ -5491,6 +5565,7 @@ RECIPE_LATEST_RELEASE_DATE_pn-libfakekey = "Jul 01, 2006"
|
||||
RECIPE_COMMENTS_pn-libfakekey = ""
|
||||
RECIPE_LAST_UPDATE_pn-libfakekey = "Apr 15, 2008"
|
||||
RECIPE_MAINTAINER_pn-libfakekey = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-libfakekey="Meego1.0=libfakekey Debian=libfakekey"
|
||||
|
||||
RECIPE_STATUS_pn-libglade = "green"
|
||||
DISTRO_PN_ALIAS_pn-libglade = "Meego=libglade2 Fedora=libglade2 OpenSuSE=libglade2 Ubuntu=libglade2 Mandriva=libglade2.0 Debian=libglade2"
|
||||
@@ -5792,6 +5867,7 @@ RECIPE_LAST_UPDATE_pn-mutter = "Jan 13, 2010"
|
||||
RECIPE_MAINTAINER_pn-mutter = "Zhai Edwin <edwin.zhai@intel.com>"
|
||||
|
||||
DISTRO_PN_ALIAS_pn-poky-feed-config-opkg = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-builder = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-base = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-basic = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-core-image-core = "OE-Core"
|
||||
@@ -5816,6 +5892,7 @@ DISTRO_PN_ALIAS_pn-task-core = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-apps-x11-pimlico = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-basic = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-gtk-directfb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-lsb = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-nfs = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-qt = "OE-Core"
|
||||
@@ -5826,9 +5903,14 @@ DISTRO_PN_ALIAS_pn-task-core-ssh-openssh = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-standalone-gmae-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-standalone-sdk-target = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools-debug = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools-profile = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-tools-testapps = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-x11-sato = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-core-x11-mini = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-qt4e = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-qte-toolchain-host-natives = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-task-self-hosted = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-live-boot = "OE-Core"
|
||||
DISTRO_PN_ALIAS_pn-initramfs-live-install = "OE-Core"
|
||||
@@ -5864,6 +5946,7 @@ DISTRO_PN_ALIAS_pn-matchbox-wm = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-oh-puzzles = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-owl-video = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-sato-icon-theme = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-sato-screenshot = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-screenshot = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-web-webkit = "OpenedHand"
|
||||
DISTRO_PN_ALIAS_pn-xcursor-transparent-theme = "OpenedHand"
|
||||
@@ -6048,17 +6131,19 @@ RECIPE_COMMENTS_pn-man-pages = "Kernel.org is down"
|
||||
RECIPE_LATEST_VERSION_pn-sysprof = "6b5b8432711ef5c747f8375073cd9af88922d3c6"
|
||||
RECIPE_LATEST_VERSION_pn-table = "d42a44938699ee30a998fc42bc149aebf69389db"
|
||||
|
||||
RECIPE_LATEST_VERSION_pn-gst-plugin-bluetooh = "4.96"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-gst-plugin-bluetooh = "Jul 31, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-gst-plugin-bluetooh = "Aug 12, 2010"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-gst-plugin-bluetooh = "Dec 15, 2011"
|
||||
RECIPE_LATEST_VERSION_pn-gst-plugin-bluetooth = "4.96"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-gst-plugin-bluetooth = "Jul 31, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-gst-plugin-bluetooth = "Aug 12, 2010"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-gst-plugin-bluetooth = "Dec 15, 2011"
|
||||
RECIPE_COMMENTS_pn-gst-plugin-bluetooth = "Kernel.org is down"
|
||||
DISTRO_PN_ALIAS_pn-gst-plugin-bluetooth = "Ubuntu=libgstreamer-plugins-base Fedora=gstreamer-plugins-base"
|
||||
|
||||
RECIPE_STATUS_pn-qmmp = "green"
|
||||
RECIPE_LATEST_VERSION_pn-qmmp = "0.5.2"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-qmmp = "Sep 02, 2011"
|
||||
RECIPE_LAST_UPDATE_pn-qmmp = "Nov 7, 2011"
|
||||
RECIPE_MAINTAINER_pn-qmmp = "Xiaofeng Yan <xiaofeng.yan@windriver.com>"
|
||||
DISTRO_PN_ALIAS_pn-qmmp = "Fedora=qmmp"
|
||||
|
||||
RECIPE_LATEST_VERSION_pn-texinfo = "4.13a"
|
||||
RECIPE_LATEST_RELEASE_DATE_pn-texinfo = "Sep 22, 2008"
|
||||
@@ -6358,6 +6443,10 @@ RECIPE_NO_OF_PATCHES_pn-ltp = "0"
|
||||
RECIPE_LAST_UPDATE_pn-ltp = "Dec 22, 2011"
|
||||
RECIPE_MANUAL_CHECK_DATE_pn-ltp = "Mar 13, 2012"
|
||||
RECIPE_MAINTAINER_pn-ltp = "Jiajun Xu <jiajun.xu@intel.com>"
|
||||
DISTRO_PN_ALIAS_pn-ltp = "Ubuntu=ltp"
|
||||
|
||||
DISTRO_PN_ALIAS_pn-rgb = "Fedora=xorg-X11-server-utils Debian=x11-xserver-utils"
|
||||
DISTRO_PN_ALIAS_pn-libksba = "Fedora=libksba Debian=libksba8"
|
||||
|
||||
DISTRO_PN_ALIAS_pn-qt4-native = "Fedora=qt4 Debian=qt4-dev-tools"
|
||||
DISTRO_PN_ALIAS_pn-update-alternatives-dpkg = "Opensuse=update-alternatives Mandriva=update-alternatives"
|
||||
|
||||
@@ -23,10 +23,19 @@ LIBC_DEPENDENCIES = "libsegfault \
|
||||
eglibc-dev \
|
||||
eglibc-utils \
|
||||
eglibc-thread-db \
|
||||
eglibc-localedata-i18n \
|
||||
eglibc-gconv-ibm850 \
|
||||
eglibc-gconv-cp1252 \
|
||||
eglibc-gconv-iso8859-1 \
|
||||
eglibc-gconv-iso8859-15 \
|
||||
locale-base-en-us \
|
||||
locale-base-en-gb "
|
||||
${@get_libc_locales_dependencies(d)}"
|
||||
|
||||
LIBC_LOCALE_DEPENDENCIES = "\
|
||||
eglibc-localedata-i18n \
|
||||
eglibc-gconv-ibm850 \
|
||||
eglibc-gconv-cp1252 \
|
||||
eglibc-gconv-iso8859-1 \
|
||||
eglibc-gconv-iso8859-15 \
|
||||
locale-base-en-us \
|
||||
locale-base-en-gb"
|
||||
|
||||
def get_libc_locales_dependencies(d):
|
||||
if 'libc-locales' in (d.getVar('DISTRO_FEATURES', True) or '').split() :
|
||||
return d.getVar('LIBC_LOCALE_DEPENDENCIES', True) or ''
|
||||
else:
|
||||
return ''
|
||||
|
||||
@@ -44,9 +44,9 @@ PREFERRED_VERSION_linux-libc-headers ?= "${LINUXLIBCVERSION}"
|
||||
PREFERRED_VERSION_linux-libc-headers-nativesdk ?= "${LINUXLIBCVERSION}"
|
||||
PREFERRED_VERSION_eglibc ?= "${EGLIBCVERSION}"
|
||||
PREFERRED_VERSION_eglibc-locale ?= "${EGLIBCVERSION}"
|
||||
PREFERRED_VERSION_eglibc-nativesdk ?= "${EGLIBCVERSION}"
|
||||
PREFERRED_VERSION_eglibc-nativesdk ?= "2.15"
|
||||
PREFERRED_VERSION_eglibc-initial ?= "${EGLIBCVERSION}"
|
||||
PREFERRED_VERSION_eglibc-initial-nativesdk ?= "${EGLIBCVERSION}"
|
||||
PREFERRED_VERSION_eglibc-initial-nativesdk ?= "2.15"
|
||||
PREFERRED_VERSION_cross-localedef-native ?= "${EGLIBCVERSION}"
|
||||
PREFERRED_VERSION_uclibc ?= "${UCLIBCVERSION}"
|
||||
PREFERRED_VERSION_uclibc-initial ?= "${UCLIBCVERSION}"
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
SDK_ARCH = "i586"
|
||||
SDK_CC_ARCH = "-march=i586"
|
||||
|
||||
SDK_GLIBC_ADDONS = "nptl"
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
SDK_ARCH = "i686"
|
||||
SDK_CC_ARCH = "-march=i686"
|
||||
|
||||
SDK_GLIBC_ADDONS = "nptl"
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
SDK_ARCH = "x86_64"
|
||||
SDK_ARCH = "x86_64"
|
||||
|
||||
SDK_GLIBC_ADDONS = "nptl"
|
||||
|
||||
77
meta/conf/machine/include/README
Normal file
77
meta/conf/machine/include/README
Normal file
@@ -0,0 +1,77 @@
|
||||
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
|
||||
- Initial Revision
|
||||
|
||||
The individual CPU, and ABI tunings are contained in this directory. A
|
||||
number of local and global variables are used to control the way the
|
||||
tunings are setup and how they work together to specify an optimized
|
||||
configuration.
|
||||
|
||||
The following is brief summary of the generic components that are used
|
||||
in these tunings.
|
||||
|
||||
AVAILTUNES - This is a list of all of the tuning definitions currently
|
||||
available in the system. Not all tunes in this list may be compatible
|
||||
with the machine configuration, or each other in a multilib
|
||||
configuration. Each tuning file can add to this list using "+=", but
|
||||
should never replace the list using "=".
|
||||
|
||||
DEFAULTTUNE - This specifies the tune to use for a particular build.
|
||||
Each tune should specify a reasonable default, which can be overriden by
|
||||
a machine or multilib configuration. The specified tune must be listed
|
||||
in the AVAILTUNES.
|
||||
|
||||
TUNEVALID[feature] - The <feature> is defined with a human readable
|
||||
explanation for what it does. All architectural, cpu, abi, etc tuning
|
||||
features must be defined using TUNEVALID.
|
||||
|
||||
TUNE_FEATURES - This is automatically defined as TUNE_FEATURES_tune-<tune>.
|
||||
See TUNE_FEATURES_tune-<tune> for more information.
|
||||
|
||||
TUNE_FEATURES_tune-<tune> - Specify the features used to describe a
|
||||
specific tune. This is a list of features that a tune support, each
|
||||
feature must be in the TUNEVALID list. Note: the tune and a given
|
||||
feature name may be the same, but they have different purposes. Only
|
||||
features may be used to change behavior, while tunes are used to
|
||||
describe an overall set of features.
|
||||
|
||||
ABIEXTENSION - An ABI extension may be specified by a specific feature
|
||||
or other tuning setting, such as TARGET_FPU. Any ABI extensions either
|
||||
need to be defined in the architectures base arch file, i.e.
|
||||
ABIEXTENSION = "eabi" in the arm case, or appended to in specific tune
|
||||
files with a ".=". Spaces are not allowed in this variable.
|
||||
|
||||
TUNE_CCARGS - Setup the cflags based on the TUNE_FEATURES settings.
|
||||
These should be additive when defined using "+=". All items in this
|
||||
list should be dynamic! i.e.
|
||||
${@bb.utils.contains("TUNE_FEATURES", "feature", "cflag", "!cflag", d)}
|
||||
|
||||
TUNE_ARCH - The GNU canonical arch for a specific architecture. i.e.
|
||||
arm, armeb, mips, mips64, etc. This value is by bitbake to setup
|
||||
configure. TUNE_ARCH definitions are specific to a given architecture.
|
||||
They may be a single static definitions, or may be dynamically adjusted.
|
||||
See each architectures README for details for that CPU family.
|
||||
|
||||
TUNE_PKGARCH - The package architecture used by the packaging systems to
|
||||
define the architecture, abi and tuning of a particular package.
|
||||
Similarly to TUNE_ARCH, the definition of TUNE_PKGARCH is specific to
|
||||
each architecture. See each architectures README for details for that
|
||||
CPU family.
|
||||
|
||||
PACKAGE_EXTRA_ARCHS - Lists all runtime compatible package
|
||||
architectures. By default this is equal to
|
||||
PACKAGE_EXTRA_ARCHS_tune-<tune>. If an architecture deviates from the
|
||||
default it will be listed in the architecture README.
|
||||
|
||||
PACKAGE_EXTRA_ARCHS_tune-<tune> - List all of the package architectures
|
||||
that are compatible with this specific tune. The package arch of this
|
||||
tune must be in the list.
|
||||
|
||||
TARGET_FPU - The FPU setting for a given tune, hard (generate floating
|
||||
point instructions), soft (generate internal gcc calls), "other"
|
||||
architecture specific floating point. This is synchronized with the
|
||||
compiler and other toolchain items. This should be dynamically
|
||||
configured in the same way that TUNE_CCARGS is.
|
||||
|
||||
BASE_LIB_tune-<tune> - The "/lib" location for a specific ABI. This is
|
||||
used in a multilib configuration to place the libraries in the correct,
|
||||
non-conflicting locations.
|
||||
40
meta/conf/machine/include/arm/README
Normal file
40
meta/conf/machine/include/arm/README
Normal file
@@ -0,0 +1,40 @@
|
||||
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
|
||||
- Initial Revision
|
||||
|
||||
The ARM architecture definitions are split among a number of files.
|
||||
The primary definitions for the variables are handled by the core
|
||||
arch-arm.inc file.
|
||||
|
||||
TUNE_ARCH is set to either "arm" or "armeb" depending on the value
|
||||
of the existence of the "bigendian" feature in a given tune.
|
||||
|
||||
A small set of ARM specific variables have been defined to allow
|
||||
TUNE_PKGARCH to be automatically defined. Optimized tunings must NOT
|
||||
change the definiton of TUNE_PKGARCH. TUNE_PKGACH_tune-<tune> will be
|
||||
ignored. The format of the package arch is enforced by the TUNE_PKGARCH
|
||||
default. The format must be of the form:
|
||||
<armversion>[t][e][hf][b][-vfp][-neon]
|
||||
|
||||
TUNE_PKGARCH is defined as:
|
||||
${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}
|
||||
|
||||
ARMPKGARCH - This is the core package arch component specified by each
|
||||
tuning. This is the primary identifier of a tuning. Usual values are:
|
||||
arm, armv4, armv5, armv6, armv7a, etc.
|
||||
|
||||
ARMPKGSFX_THUMB - This is the thumb specific suffix. Curently it is
|
||||
defined in feature-arm-thumb.inc.
|
||||
|
||||
ARMPKGSFX_DSP - This is the DSP specific suffix. Currently this is set
|
||||
to 'e' when on armv5 and the dsp feature is enabled.
|
||||
|
||||
ARMPKGSFX_EABI - This is the eabi specific suffix. There are currently
|
||||
two defined ABIs specificed, standard EABI and Hard Float (VFP) EABI.
|
||||
When the callconvention-hard is enabled, "hf" is specified, otherwise it
|
||||
is blank.
|
||||
|
||||
ARMPKGSFX_ENDIAN - This is the endian specific suffix. It is defined in
|
||||
the core arch-arm.inc file.
|
||||
|
||||
ARMPKGSFX_FPU - This is the FPU specific suffix. The suffix indicates
|
||||
specific FPU optimizations. 'vfp' and 'neon' are both defined.
|
||||
@@ -9,7 +9,7 @@ ARMPKGSFX_EABI ??= ""
|
||||
ARMPKGSFX_THUMB ??= ""
|
||||
|
||||
TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}"
|
||||
TUNE_PKGARCH = "${@d.getVar('ARMPKGARCH', True)}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
|
||||
TUNE_PKGARCH = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
|
||||
|
||||
ABIEXTENSION = "eabi"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ require conf/machine/include/arm/arch-armv4.inc
|
||||
require conf/machine/include/arm/feature-arm-vfp.inc
|
||||
|
||||
# Little Endian
|
||||
AVAILTUNES += "armv5 armv5t armv5e armv5te"
|
||||
AVAILTUNES += "armv5 armv5t"
|
||||
TUNE_FEATURES_tune-armv5 ?= "armv5"
|
||||
TUNE_FEATURES_tune-armv5t ?= "armv5 thumb"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv5 = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv5"
|
||||
|
||||
@@ -16,19 +16,19 @@ TUNE_FEATURES_tune-armv7a ?= "armv7a vfp"
|
||||
TUNE_FEATURES_tune-armv7at ?= "armv7a vfp thumb"
|
||||
TUNE_FEATURES_tune-armv7a-neon ?= "armv7a vfp neon"
|
||||
TUNE_FEATURES_tune-armv7at-neon ?= "armv7a vfp neon thumb"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7a = "${PACKAGE_EXTRA_ARCHS_tune-armv7} armv7a armv7a-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7a = "${PACKAGE_EXTRA_ARCHS_tune-armv6} armv7a armv7a-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7a-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-vfp-neon"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7at = "${PACKAGE_EXTRA_ARCHS_tune-armv7t} armv7a armv7a-vfp armv7at2-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7at = "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7a armv7a-vfp armv7at2-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7at-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfp-neon armv7at2-vfp-neon"
|
||||
|
||||
# VFP Tunes
|
||||
AVAILTUNES += "armv7hf armv7thf armv7hf-neon armv7thf-neon"
|
||||
AVAILTUNES += "armv7ahf armv7athf armv7ahf-neon armv7athf-neon"
|
||||
TUNE_FEATURES_tune-armv7ahf ?= "${TUNE_FEATURES_tune-armv7a} callconvention-hard"
|
||||
TUNE_FEATURES_tune-armv7athf ?= "${TUNE_FEATURES_tune-armv7at} callconvention-hard"
|
||||
TUNE_FEATURES_tune-armv7ahf-neon ?= "${TUNE_FEATURES_tune-armv7a-neon} callconvention-hard"
|
||||
TUNE_FEATURES_tune-armv7athf-neon ?= "${TUNE_FEATURES_tune_armv7at-neon} callconvention-hard"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ahf = "${PACKAGE_EXTRA_ARCHS_tune-armv7hf} armv7ahf-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7athf = "${PACKAGE_EXTRA_ARCHS_tune-armv7thf} armv7ahf-vfp armv7at2hf-vfp"
|
||||
TUNE_FEATURES_tune-armv7athf-neon ?= "${TUNE_FEATURES_tune-armv7at-neon} callconvention-hard"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ahf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} armv7ahf-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7athf = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} armv7ahf-vfp armv7at2hf-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-vfp-neon"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-vfp-neon armv7at2hf-vfp-neon"
|
||||
|
||||
@@ -38,8 +38,8 @@ TUNE_FEATURES_tune-armv7ab ?= "${TUNE_FEATURES_tune-armv7a} bigendian"
|
||||
TUNE_FEATURES_tune-armv7atb ?= "${TUNE_FEATURES_tune-armv7at} bigendian"
|
||||
TUNE_FEATURES_tune-armv7ab-neon ?= "${TUNE_FEATURES_tune-armv7a-neon} bigendian"
|
||||
TUNE_FEATURES_tune-armv7atb-neon ?= "${TUNE_FEATURES_tune-armv7at-neon} bigendian"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ab = "${PACKAGE_EXTRA_ARCHS_tune-armv7} armv7ab-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7atb = "${PACKAGE_EXTRA_ARCHS_tune-armv7t} armv7ab-vfp armv7at2b-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ab = "${PACKAGE_EXTRA_ARCHS_tune-armv6} armv7ab-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7atb = "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7ab-vfp armv7at2b-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7ab-vfp-neon"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7ab-vfp-neon armv7at2b-vfp-neon"
|
||||
|
||||
@@ -48,9 +48,9 @@ AVAILTUNES += "armv7ahfb armv7athfb armv7ahfb-neon armv7athfb-neon"
|
||||
TUNE_FEATURES_tune-armv7ahfb ?= "${TUNE_FEATURES_tune-armv7ab} callconvention-hard"
|
||||
TUNE_FEATURES_tune-armv7athfb ?= "${TUNE_FEATURES_tune-armv7atb} callconvention-hard"
|
||||
TUNE_FEATURES_tune-armv7ahfb-neon ?= "${TUNE_FEATURES_tune-armv7ab-neon} callconvention-hard"
|
||||
TUNE_FEATURES_tune-armv7athfb-neon ?= "${TUNE_FEATURES_tune_armv7atb-neon} callconvention-hard"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ahfb = "${PACKAGE_EXTRA_ARCHS_tune-armv7hfb} armv7ahfb-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7athfb = "${PACKAGE_EXTRA_ARCHS_tune-armv7thfb} armv7ahfb-vfp armv7at2hfb-vfp"
|
||||
TUNE_FEATURES_tune-armv7athfb-neon ?= "${TUNE_FEATURES_tune-armv7atb-neon} callconvention-hard"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ahfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6hfb} armv7ahfb-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7athfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6thfb} armv7ahfb-vfp armv7at2hfb-vfp"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-vfp-neon"
|
||||
PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-vfp-neon armv7at2hfb-vfp-neon"
|
||||
|
||||
|
||||
24
meta/conf/machine/include/ia32/README
Normal file
24
meta/conf/machine/include/ia32/README
Normal file
@@ -0,0 +1,24 @@
|
||||
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
|
||||
- Initial version
|
||||
|
||||
Most of the items for the IA architecture are defined in the single
|
||||
arch-ia32 file.
|
||||
|
||||
Three ABIs are define, m32, mx32 and m64.
|
||||
|
||||
The following is the list of ia32 specific variables:
|
||||
|
||||
X86ARCH32 - This is the 32-bit architecture GNU canonical arch, TUNE_ARCH.
|
||||
|
||||
X86ARCH64 - This is the 64-bit architecture GNU canonical arch, TUNE_ARCH.
|
||||
|
||||
The TUNE_PKGARCH is defined as follows:
|
||||
|
||||
TUNE_PKGARCH = ${TUNE_PKGARCH_tune-${DEFAULTTUNE}}
|
||||
|
||||
The package architecture for 32-bit targets is historical and generally
|
||||
set to to match the core compatible processor type, i.e. i386.
|
||||
|
||||
For 64-bit architectures, the architecture is expected to end in '_64'.
|
||||
|
||||
If the x32 ABI is used, then the _64 is further extended with a '_x32'.
|
||||
@@ -7,6 +7,8 @@ TARGET_FPU ?= ""
|
||||
X86ARCH32 ?= "i586"
|
||||
X86ARCH64 ?= "x86_64"
|
||||
|
||||
TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
|
||||
|
||||
# ELF32 ABI
|
||||
TUNEVALID[m32] = "IA32 ELF32 standard ABI"
|
||||
TUNECONFLICTS[m32] = "m64 mx32"
|
||||
@@ -29,21 +31,21 @@ TUNECONFLICT[m64] = "m32 mx32"
|
||||
TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}"
|
||||
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m64", "-m64", "", d)}"
|
||||
|
||||
TUNE_PKGARCH ?= "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86", "x86_64", d)}"
|
||||
|
||||
# Default Tune configurations
|
||||
AVAILTUNES += "x86"
|
||||
TUNE_FEATURES_tune-x86 ?= "m32"
|
||||
BASE_LIB_tune-x86 ?= "lib"
|
||||
PACKAGE_EXTRA_ARCHS_tune-x86 = "x86"
|
||||
TUNE_FEATURES_tune-x86 = "m32"
|
||||
BASE_LIB_tune-x86 = "lib"
|
||||
TUNE_PKGARCH_tune-x86 = "x86"
|
||||
PACKAGE_EXTRA_ARCHS_tune-x86 = "${TUNE_PKGARCH_tune-x86}"
|
||||
|
||||
AVAILTUNES += "x86-64"
|
||||
TUNE_FEATURES_tune-x86-64 ?= "m64"
|
||||
BASE_LIB_tune-x86-64 ?= "lib64"
|
||||
PACKAGE_EXTRA_ARCHS_tune-x86-64 = "x86_64"
|
||||
TUNE_FEATURES_tune-x86-64 = "m64"
|
||||
BASE_LIB_tune-x86-64 = "lib64"
|
||||
TUNE_PKGARCH_tune-x86-64 = "x86_64"
|
||||
PACKAGE_EXTRA_ARCHS_tune-x86-64 = "${TUNE_PKGARCH_tune-x86-64}"
|
||||
|
||||
AVAILTUNES += "x86-64-x32"
|
||||
TUNE_FEATURES_tune-x86-64-x32 ?= "mx32"
|
||||
BASE_LIB_tune-x86-64-x32 ?= "libx32"
|
||||
PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "x86_64_x32"
|
||||
TUNE_PKGARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "_x32", "", d)}"
|
||||
TUNE_FEATURES_tune-x86-64-x32 = "mx32"
|
||||
BASE_LIB_tune-x86-64-x32 = "libx32"
|
||||
TUNE_PKGARCH_tune-x86-64-x32 = "x86_64_x32"
|
||||
PACKAGE_EXTRA_ARCHS_tune-x86-64-x32 = "${TUNE_PKGARCH_tune-x86-64-x32}"
|
||||
|
||||
36
meta/conf/machine/include/mips/README
Normal file
36
meta/conf/machine/include/mips/README
Normal file
@@ -0,0 +1,36 @@
|
||||
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
|
||||
- Initial Version
|
||||
|
||||
MIPS currently defines 12 ABIs. Combinations of:
|
||||
*) Big/Little Endian
|
||||
*) Hardware/Software Floating Point
|
||||
*) o32, n32, n64 ABI
|
||||
|
||||
TUNE_ARCH, the GNU canonical arch, is defined as:
|
||||
|
||||
mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}
|
||||
|
||||
The package arch is defined in such a way to generated a standard naming
|
||||
scheme. The scheme is: <mips variant>[-nf][-n32]
|
||||
|
||||
TUNE_PKGARCH is defined as:
|
||||
|
||||
${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}
|
||||
|
||||
The following is a list of MIPS specific variables:
|
||||
|
||||
MIPSPKGSFX_BYTE - This is defined as either blank and "64" for MIPS64 CPUs.
|
||||
|
||||
MIPSPKGSFX_ENDIAN - For bigendian hardware this is blank, otherwise it's
|
||||
defined as "el".
|
||||
|
||||
MIPSPKGSFX_VARIANT_tune-<tune> - In the default tunings it is set to the
|
||||
same value as TUNE_ARCH. In custom, optimized tunings, the value should
|
||||
be modified to more precisely describe the tuning.
|
||||
|
||||
MIPSPKGSFX_FPU - The value is set to "" or "-nf", where "-nf" indicates
|
||||
that the tune is using a non-floating point ABI.
|
||||
|
||||
MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous
|
||||
values are not enough to distringuish the package. "-n32" is added when
|
||||
building for N32 ABI.
|
||||
@@ -36,32 +36,66 @@ MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf",
|
||||
MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}"
|
||||
|
||||
TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
|
||||
TUNE_PKGARCH ?= "${TUNE_ARCH}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
|
||||
TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
|
||||
|
||||
# Base tunes
|
||||
AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf"
|
||||
TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard"
|
||||
BASE_LIB_tune-mips = "lib"
|
||||
MIPSPKGSFX_VARIANT_tune-mips = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips = "mips"
|
||||
|
||||
TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard"
|
||||
BASE_LIB_tune-mips64-n32 = "lib32"
|
||||
MIPSPKGSFX_VARIANT_tune-mips64-n32 = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64-n32 = "mips64-n32"
|
||||
|
||||
TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard"
|
||||
BASE_LIB_tune-mips64 = "lib64"
|
||||
MIPSPKGSFX_VARIANT_tune-mips64 = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64 = "mips64"
|
||||
|
||||
TUNE_FEATURES_tune-mipsel = "o32 fpu-hard"
|
||||
BASE_LIB_tune-mipsel = "lib"
|
||||
MIPSPKGSFX_VARIANT_tune-mipsel = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mipsel = "mipsel"
|
||||
|
||||
TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard"
|
||||
BASE_LIB_tune-mips64el-n32 = "lib32"
|
||||
MIPSPKGSFX_VARIANT_tune-mips64el-n32 = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64el-n32 = "mips64el-n32"
|
||||
|
||||
TUNE_FEATURES_tune-mips64el = "n64 fpu-hard"
|
||||
BASE_LIB_tune-mips64el = "lib64"
|
||||
MIPSPKGSFX_VARIANT_tune-mips64el = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64el = "mips64el"
|
||||
|
||||
TUNE_FEATURES_tune-mips-nf = "o32 bigendian"
|
||||
BASE_LIB_tune-mips-nf = "lib"
|
||||
MIPSPKGSFX_VARIANT_tune-mips-nf = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips-nf = "mips-nf"
|
||||
|
||||
TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian"
|
||||
BASE_LIB_tune-mips64-nf-n32 = "lib32"
|
||||
MIPSPKGSFX_VARIANT_tune-mips64-nf-n32 = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64-nf-n32 = "mips64-nf-n32"
|
||||
|
||||
TUNE_FEATURES_tune-mips64-nf = "n64 bigendian"
|
||||
BASE_LIB_tune-mips64-nf = "lib64"
|
||||
MIPSPKGSFX_VARIANT_tune-mips64-nf = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64-nf = "mips64-nf"
|
||||
|
||||
TUNE_FEATURES_tune-mipsel-nf = "o32"
|
||||
BASE_LIB_tune-mipsel-nf = "lib"
|
||||
MIPSPKGSFX_VARIANT_tune-mipsel-nf = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mipsel-nf = "mipsel-nf"
|
||||
|
||||
TUNE_FEATURES_tune-mips64el-nf-n32 = "n32"
|
||||
BASE_LIB_tune-mips64el-nf-n32 = "lib32"
|
||||
MIPSPKGSFX_VARIANT_tune-mips64el-nf-n32 = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-n32 = "mips64el-nf-n32"
|
||||
|
||||
TUNE_FEATURES_tune-mips64el-nf = "n64"
|
||||
BASE_LIB_tune-mips64el-nf = "lib64"
|
||||
|
||||
MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}"
|
||||
PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf"
|
||||
|
||||
17
meta/conf/machine/include/powerpc/README
Normal file
17
meta/conf/machine/include/powerpc/README
Normal file
@@ -0,0 +1,17 @@
|
||||
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
|
||||
- Initial revision
|
||||
|
||||
There are 4 primary PowerPC ABIs.
|
||||
# *) Hard/Soft Floating Point
|
||||
# *) 32-bit/64-bit
|
||||
|
||||
TUNE_ARCH is defined as either "powerpc" or "powerpc64" based on the m32
|
||||
or m64 feature.
|
||||
|
||||
May of the PowerPC package archictures are based on legacy Linux names.
|
||||
However, a general naming scheme should be similar to: ppc[64][<family>][-nf].
|
||||
(Note: the default package architectures are "powerpc" and "powerpc64".)
|
||||
|
||||
TUNE_PKGARCH is defined as TUNE_PKGARCH_tune-${DEFAULTTUNE}. All
|
||||
PowerPC tunings are required to define TUNE_PKGARCH_tune-<tune>.
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
|
||||
DEFAULTTUNE ?= "powerpc"
|
||||
|
||||
TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
|
||||
ABIEXTENSION ?= ""
|
||||
|
||||
TUNEVALID[m32] = "Power ELF32 standard ABI"
|
||||
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "m32", "-m32", "", d)}"
|
||||
TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "powerpc", "", d)}"
|
||||
@@ -16,16 +19,14 @@ TUNEVALID[fpu-soft] = "Use software FPU."
|
||||
TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "-msoft-float", "", d)}"
|
||||
TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}"
|
||||
|
||||
ABIEXTENSION = "${@['','spe'][d.getVar('TARGET_FPU', True) in ['ppc-efd', 'ppc-efs']]}"
|
||||
|
||||
PPCPKGSFX_FPU = "${@['', '-nf'][d.getVar('TARGET_FPU', True) in ['fpu-soft']]}"
|
||||
TUNE_PKGARCH_append = "${PPCPKGSFX_FPU}"
|
||||
|
||||
# Basic tune definitions
|
||||
AVAILTUNES += "powerpc powerpc-nf"
|
||||
TUNE_FEATURES_tune-powerpc-nf ?= "m32 fpu-soft"
|
||||
TUNE_FEATURES_tune-powerpc-nf = "m32 fpu-soft"
|
||||
BASE_LIB_tune-powerpc-nf = "lib"
|
||||
TUNE_PKGARCH_tune-powerpc-nf = "powerpc-nf"
|
||||
PACKAGE_EXTRA_ARCHS_tune-powerpc-nf = "powerpc-nf"
|
||||
TUNE_FEATURES_tune-powerpc ?= "m32 fpu-hard"
|
||||
|
||||
TUNE_FEATURES_tune-powerpc = "m32 fpu-hard"
|
||||
BASE_LIB_tune-powerpc = "lib"
|
||||
TUNE_PKGARCH_tune-powerpc = "powerpc"
|
||||
PACKAGE_EXTRA_ARCHS_tune-powerpc = "powerpc"
|
||||
|
||||
@@ -10,4 +10,5 @@ TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "m64" ], "powerpc64", "",
|
||||
AVAILTUNES += "powerpc64"
|
||||
TUNE_FEATURES_tune-powerpc64 ?= "m64 fpu-hard"
|
||||
BASE_LIB_tune-powerpc64 = "lib64"
|
||||
TUNE_PKGARCH_tune-powerpc64 = "powerpc64"
|
||||
PACKAGE_EXTRA_ARCHS_tune-powerpc64 = "powerpc64"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
PCMCIA_MANAGER = "pcmciautils"
|
||||
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-kdrive"
|
||||
PREFERRED_PROVIDER_virtual/libgl ?= "mesa-xlib"
|
||||
|
||||
MACHINE_FEATURES = "apm alsa pcmcia bluetooth irda usbgadget screen"
|
||||
|
||||
IMAGE_FSTYPES ?= "tar.bz2 ext3"
|
||||
IMAGE_FSTYPES += "tar.bz2 ext3"
|
||||
|
||||
ROOT_FLASH_SIZE = "280"
|
||||
|
||||
|
||||
11
meta/conf/machine/include/sh/README
Normal file
11
meta/conf/machine/include/sh/README
Normal file
@@ -0,0 +1,11 @@
|
||||
2012/03/30 - Mark Hatle <mark.hatle@windriver.com>
|
||||
- Initial Revision
|
||||
|
||||
Both big endian and little endian are defined for SH.
|
||||
|
||||
Experimental -- SH tunings have not been validated.
|
||||
|
||||
The TUNE_ARCH is defined as ${TUNE_ARCH_tune-${DEFAULTTUNE}}.
|
||||
|
||||
The TUNE_PKGARCH is defind as ${TUNE_PKGARCH_tune-${DEFAULTTUNE}}.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user