mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 16:39:40 +01:00
Compare commits
298 Commits
1.2_M4.rc3
...
denzil-7.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73cdebf60d | ||
|
|
6b06a4fa1b | ||
|
|
2dcbb48df9 | ||
|
|
fb2335fa2b | ||
|
|
e972d78009 | ||
|
|
91d6344765 | ||
|
|
a707b3269c | ||
|
|
0d3748ca5d | ||
|
|
5f2b526109 | ||
|
|
6bb0fdda40 | ||
|
|
5ad28e97e6 | ||
|
|
495ea21c8b | ||
|
|
94e3e894d0 | ||
|
|
8389decfe6 | ||
|
|
7412611252 | ||
|
|
026d502b2a | ||
|
|
e81f7c6152 | ||
|
|
119e1b7dc9 | ||
|
|
5b3a0eac61 | ||
|
|
4c4924ad1b | ||
|
|
9e6d1101b4 | ||
|
|
2bddf70a84 | ||
|
|
6698060d8e | ||
|
|
bd3cd64da3 | ||
|
|
c88f25ddb4 | ||
|
|
ef215694de | ||
|
|
71a6fb605a | ||
|
|
bfc8589048 | ||
|
|
6514e193ac | ||
|
|
44fb9daa81 | ||
|
|
309b2c090e | ||
|
|
67c7bc5e6c | ||
|
|
e06e502bbb | ||
|
|
89c0e81273 | ||
|
|
78a5471a29 | ||
|
|
b30a243f3f | ||
|
|
20657c1fa0 | ||
|
|
3029a08744 | ||
|
|
d376a4e8f1 | ||
|
|
0d0846e06f | ||
|
|
59ac33c77f | ||
|
|
3cb36a5ed9 | ||
|
|
75e32007ef | ||
|
|
d52e74cee9 | ||
|
|
f1630d3cd4 | ||
|
|
b7f1a8f870 | ||
|
|
015f117d85 | ||
|
|
b8338046ba | ||
|
|
7552ccd06c | ||
|
|
e24d5cc2cd | ||
|
|
1f2fc974df | ||
|
|
a473ba170d | ||
|
|
a5fe09c6aa | ||
|
|
2072256b05 | ||
|
|
b623203ac9 | ||
|
|
c7e4a6ae2c | ||
|
|
1628159028 | ||
|
|
b477f676e3 | ||
|
|
9d2534ab24 | ||
|
|
df815f20c8 | ||
|
|
b64eefe2bb | ||
|
|
4abd299bf0 | ||
|
|
30c3c8420e | ||
|
|
a74fb01b6b | ||
|
|
c003c04590 | ||
|
|
35cc0b023f | ||
|
|
c2826b50ce | ||
|
|
75225bcc84 | ||
|
|
d3204ddc12 | ||
|
|
7c7ac8548d | ||
|
|
bbf95cae4c | ||
|
|
3df821277d | ||
|
|
4f4685469a | ||
|
|
d1bc1191d6 | ||
|
|
5c507a2fd7 | ||
|
|
bf4740cf66 | ||
|
|
24ffb5c0b1 | ||
|
|
a92fed4fe5 | ||
|
|
a518e1e3b1 | ||
|
|
fc9716930a | ||
|
|
f99ced96cf | ||
|
|
d0f0d1b41d | ||
|
|
77203b75f5 | ||
|
|
a0f1aca7a0 | ||
|
|
b3de1f1140 | ||
|
|
6e93ac2581 | ||
|
|
c1bfbf7168 | ||
|
|
5a7d852a94 | ||
|
|
3bf8069100 | ||
|
|
cbd192a6c5 | ||
|
|
6d22ae627b | ||
|
|
49a58c65b6 | ||
|
|
06cde35657 | ||
|
|
196a62b50c | ||
|
|
8ddaa3ede8 | ||
|
|
52ccf5a9eb | ||
|
|
b2c9b25f97 | ||
|
|
5a1fb95a8d | ||
|
|
22b9983cc7 | ||
|
|
7f5e6a1959 | ||
|
|
01025ad2c4 | ||
|
|
71580376c9 | ||
|
|
0774a11505 | ||
|
|
4d2d5abd8b | ||
|
|
884034b256 | ||
|
|
ee98021efe | ||
|
|
f52747d7a2 | ||
|
|
1bf998fe41 | ||
|
|
1b3c00a34f | ||
|
|
b3f870297e | ||
|
|
93deb57c91 | ||
|
|
2883b754a1 | ||
|
|
86325bbc5d | ||
|
|
746d718f53 | ||
|
|
c498338197 | ||
|
|
ba554bd865 | ||
|
|
0dda5d88a5 | ||
|
|
06f44161f1 | ||
|
|
4b4a018466 | ||
|
|
caf6532b51 | ||
|
|
a81cb954bb | ||
|
|
0089bb9ad0 | ||
|
|
ce8d4157db | ||
|
|
66b18cb5cd | ||
|
|
bbf33914ea | ||
|
|
e1e12bfd0c | ||
|
|
bc7f18c61d | ||
|
|
89e2958475 | ||
|
|
943c6917e6 | ||
|
|
2b6e86beae | ||
|
|
42a9a50771 | ||
|
|
74c34c9d3c | ||
|
|
e9b8cf485c | ||
|
|
2863d953bd | ||
|
|
716bdd4bf5 | ||
|
|
dfecd3e3d7 | ||
|
|
142de43be2 | ||
|
|
752c707df3 | ||
|
|
d20a24310e | ||
|
|
8e04664ffd | ||
|
|
3ab5d73f0c | ||
|
|
33f048240d | ||
|
|
0bf04aa4ad | ||
|
|
612555e6fe | ||
|
|
35196ff703 | ||
|
|
0a48c697d7 | ||
|
|
7e56770a60 | ||
|
|
9a548f0ee4 | ||
|
|
946c650a47 | ||
|
|
f99c947c32 | ||
|
|
9ffbd2ef22 | ||
|
|
66625417b4 | ||
|
|
e95ce40abd | ||
|
|
4a83ebbee0 | ||
|
|
90705b36ad | ||
|
|
be5a5c7e7b | ||
|
|
64471e9340 | ||
|
|
4becd60e65 | ||
|
|
9fcfda78b9 | ||
|
|
8558c3e1f4 | ||
|
|
0bfb42dbb6 | ||
|
|
37b069ea5d | ||
|
|
6d7260e8f6 | ||
|
|
236bda9ed6 | ||
|
|
375835092c | ||
|
|
2c3d4f5bee | ||
|
|
45114a9df0 | ||
|
|
08290c6003 | ||
|
|
729e7f774c | ||
|
|
d233c90823 | ||
|
|
b76513948b | ||
|
|
d220e071ab | ||
|
|
f4eed2b8b8 | ||
|
|
d73e41f437 | ||
|
|
5b78c7d559 | ||
|
|
abddce33ac | ||
|
|
a8c668c43a | ||
|
|
9656762e80 | ||
|
|
8e53c8c937 | ||
|
|
375e9502d1 | ||
|
|
a23041090e | ||
|
|
0f8c8c844b | ||
|
|
bb2929692a | ||
|
|
fcd707ed4b | ||
|
|
20ff9db921 | ||
|
|
720fe9e371 | ||
|
|
8e0751a97a | ||
|
|
b9553be4d1 | ||
|
|
80e7bb85a0 | ||
|
|
ad229f81f4 | ||
|
|
1e190eef71 | ||
|
|
8cc3b24242 | ||
|
|
6004dc8906 | ||
|
|
04d6aa1069 | ||
|
|
993c467510 | ||
|
|
139a91d742 | ||
|
|
c50d8b753d | ||
|
|
c27655793b | ||
|
|
a6820f43f5 | ||
|
|
cf05f09f9f | ||
|
|
c936fca6e1 | ||
|
|
a2280512b8 | ||
|
|
51f9cb0840 | ||
|
|
5612bf3339 | ||
|
|
a5afc58319 | ||
|
|
b6cbf1e48c | ||
|
|
59348455a7 | ||
|
|
ca14115a12 | ||
|
|
b99e2f2f33 | ||
|
|
8046fd416f | ||
|
|
d2fca3db85 | ||
|
|
15b16060c7 | ||
|
|
5326847ef8 | ||
|
|
e966ae128a | ||
|
|
6d7aae9e97 | ||
|
|
d5a9ff4b27 | ||
|
|
e8ab6ab64b | ||
|
|
e737d01095 | ||
|
|
d1eba59ffd | ||
|
|
f139832667 | ||
|
|
d431ef2a30 | ||
|
|
388bae1ac8 | ||
|
|
23f4288082 | ||
|
|
469d73a733 | ||
|
|
ccc2b23191 | ||
|
|
2ddf7d3e83 | ||
|
|
f580ac6b30 | ||
|
|
239e8b9853 | ||
|
|
dcaea1447c | ||
|
|
f562e2a393 | ||
|
|
5c006a460f | ||
|
|
2e01a44f3b | ||
|
|
e3e6d2a744 | ||
|
|
74211e0372 | ||
|
|
a5210e47b0 | ||
|
|
d979ee01b5 | ||
|
|
9ff001cba1 | ||
|
|
62c908c88b | ||
|
|
58544debd5 | ||
|
|
4831503957 | ||
|
|
c393309707 | ||
|
|
d91b3f7639 | ||
|
|
0258ba5e14 | ||
|
|
774afe86e8 | ||
|
|
6f527e23e0 | ||
|
|
0a4a7578b8 | ||
|
|
6ea6facd66 | ||
|
|
dc2192cabc | ||
|
|
e024d40cd5 | ||
|
|
276b86509b | ||
|
|
fdb2027e6d | ||
|
|
83cc0a118f | ||
|
|
ac998632f7 | ||
|
|
45da109439 | ||
|
|
71b8383a6b | ||
|
|
fae4509e07 | ||
|
|
3d23afdc7a | ||
|
|
53d629496f | ||
|
|
7503db6713 | ||
|
|
ffc9073db1 | ||
|
|
3e3f774b8d | ||
|
|
ee71422b98 | ||
|
|
25b48c68df | ||
|
|
bc5d68e30b | ||
|
|
60a7403f6c | ||
|
|
04b16f1038 | ||
|
|
5d41ccd2ca | ||
|
|
132b12b26e | ||
|
|
0d7b909817 | ||
|
|
cc69136bf3 | ||
|
|
396da97103 | ||
|
|
60cf19a36d | ||
|
|
996308a4ea | ||
|
|
54c6e07ffe | ||
|
|
f09a5e176f | ||
|
|
22aac28f28 | ||
|
|
7b22df2e4b | ||
|
|
7cf26b2d3d | ||
|
|
b4acabea99 | ||
|
|
898bee7a4e | ||
|
|
100e3c9b75 | ||
|
|
554cac7d13 | ||
|
|
fb918fb4db | ||
|
|
811f7d8ebf | ||
|
|
4997801bad | ||
|
|
9c1dcdceb2 | ||
|
|
302f2cc8ce | ||
|
|
6703173449 | ||
|
|
d74c5aa2c9 | ||
|
|
c37faea947 | ||
|
|
b2ae65f7d1 | ||
|
|
d6031bad2a | ||
|
|
853c5613ac | ||
|
|
17c4134ebd | ||
|
|
a9be1accab | ||
|
|
58d2ff3955 | ||
|
|
7e5d41ab22 | ||
|
|
376bf4a390 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
*.pyc
|
||||
*.pyo
|
||||
/*.patch
|
||||
build*/conf/local.conf
|
||||
build*/conf/bblayers.conf
|
||||
build*/downloads
|
||||
|
||||
@@ -40,7 +40,7 @@ from bb import cooker
|
||||
from bb import ui
|
||||
from bb import server
|
||||
|
||||
__version__ = "1.15.1"
|
||||
__version__ = "1.15.2"
|
||||
logger = logging.getLogger("BitBake")
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
__version__ = "1.15.1"
|
||||
__version__ = "1.15.2"
|
||||
|
||||
import sys
|
||||
if sys.version_info < (2, 6, 0):
|
||||
|
||||
@@ -179,6 +179,13 @@ class CommandsSync:
|
||||
"""
|
||||
return bb.utils.cpu_count()
|
||||
|
||||
def setConfFilter(self, command, params):
|
||||
"""
|
||||
Set the configuration file parsing filter
|
||||
"""
|
||||
filterfunc = params[0]
|
||||
bb.parse.parse_py.ConfHandler.confFilters.append(filterfunc)
|
||||
|
||||
class CommandsAsync:
|
||||
"""
|
||||
A class of asynchronous commands
|
||||
|
||||
@@ -1175,7 +1175,7 @@ class BBCooker:
|
||||
return
|
||||
|
||||
if self.state in (state.shutdown, state.stop):
|
||||
self.parser.shutdown(clean=False)
|
||||
self.parser.shutdown(clean=False, force = True)
|
||||
sys.exit(1)
|
||||
|
||||
if self.state != state.parsing:
|
||||
@@ -1608,10 +1608,13 @@ class CookerParser(object):
|
||||
self.parser_quit.put(None)
|
||||
|
||||
self.jobs.cancel_join_thread()
|
||||
sys.exit(1)
|
||||
|
||||
for process in self.processes:
|
||||
process.join()
|
||||
if force:
|
||||
process.join(.1)
|
||||
process.terminate()
|
||||
else:
|
||||
process.join()
|
||||
self.feeder.join()
|
||||
|
||||
sync = threading.Thread(target=self.bb_cache.sync)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -517,3 +517,21 @@ class PackageInfo(Event):
|
||||
def __init__(self, pkginfolist):
|
||||
Event.__init__(self)
|
||||
self._pkginfolist = pkginfolist
|
||||
|
||||
class SanityCheck(Event):
|
||||
"""
|
||||
Event to issue sanity check
|
||||
"""
|
||||
|
||||
class SanityCheckPassed(Event):
|
||||
"""
|
||||
Event to indicate sanity check is passed
|
||||
"""
|
||||
|
||||
class SanityCheckFailed(Event):
|
||||
"""
|
||||
Event to indicate sanity check has failed
|
||||
"""
|
||||
def __init__(self, msg):
|
||||
Event.__init__(self)
|
||||
self._msg = msg
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -81,16 +81,16 @@ class BuildConfigurationTreeView(gtk.TreeView):
|
||||
# renew the tree model after get the configuration messages
|
||||
self.set_model(listmodel)
|
||||
|
||||
def show(self, src_config_info):
|
||||
def show(self, src_config_info, src_params):
|
||||
vars = []
|
||||
vars.append(self.set_vars("BB version:", src_config_info.bb_version))
|
||||
vars.append(self.set_vars("Target arch:", src_config_info.target_arch))
|
||||
vars.append(self.set_vars("Target OS:", src_config_info.target_os))
|
||||
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_config_info.distro_version))
|
||||
vars.append(self.set_vars("Distro version:", src_params.distro_version))
|
||||
vars.append(self.set_vars("SDK machine:", src_config_info.curr_sdk_machine))
|
||||
vars.append(self.set_vars("Tune feature:", src_config_info.tune_pkgarch))
|
||||
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:
|
||||
@@ -238,6 +238,7 @@ 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):
|
||||
@@ -248,5 +249,5 @@ class BuildDetailsPage (HobPage):
|
||||
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):
|
||||
self.config_tv.show(configurations)
|
||||
def show_configurations(self, configurations, params):
|
||||
self.config_tv.show(configurations, params)
|
||||
|
||||
@@ -32,7 +32,7 @@ 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
|
||||
@@ -42,9 +42,42 @@ 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"]
|
||||
@@ -59,17 +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"]
|
||||
# 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.user_selected_packages = []
|
||||
self.default_task = params["default_task"]
|
||||
|
||||
# proxy settings
|
||||
self.all_proxy = params["all_proxy"]
|
||||
@@ -81,31 +108,6 @@ class Configuration:
|
||||
self.cvs_proxy_host = params["cvs_proxy_host"]
|
||||
self.cvs_proxy_port = params["cvs_proxy_port"]
|
||||
|
||||
def update(self, params):
|
||||
self.curr_distro = params["distro"]
|
||||
self.dldir = params["dldir"]
|
||||
self.sstatedir = params["sstatedir"]
|
||||
self.sstatemirror = params["sstatemirror"]
|
||||
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"]
|
||||
self.image_extra_size = params["image_extra_size"]
|
||||
self.image_overhead_factor = params['image_overhead_factor']
|
||||
self.incompat_license = params["incompat_license"]
|
||||
self.curr_sdk_machine = params["sdk_machine"]
|
||||
self.conf_version = params["conf_version"]
|
||||
self.lconf_version = params["lconf_version"]
|
||||
self.image_fstypes = params["image_fstypes"]
|
||||
self.tune_arch = params["tune_arch"]
|
||||
self.bb_version = params["bb_version"]
|
||||
self.target_arch = params["target_arch"]
|
||||
self.target_os = params["target_os"]
|
||||
self.distro_version = params["distro_version"]
|
||||
self.tune_pkgarch = params["tune_pkgarch"]
|
||||
# bblayers.conf
|
||||
self.layers = params["layer"].split()
|
||||
|
||||
def load(self, template):
|
||||
self.curr_mach = template.getVar("MACHINE")
|
||||
self.curr_package_format = " ".join(template.getVar("PACKAGE_CLASSES").split("package_")).strip()
|
||||
@@ -153,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)
|
||||
@@ -174,11 +177,11 @@ class Configuration:
|
||||
template.setVar("EXTRA_SETTING", self.extra_setting)
|
||||
template.setVar("TOOLCHAIN_BUILD", self.toolchain_build)
|
||||
template.setVar("IMAGE_FSTYPES", self.image_fstypes)
|
||||
# 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.user_selected_packages)
|
||||
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)
|
||||
@@ -192,23 +195,71 @@ 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.enable_proxy = False
|
||||
# for build log to show
|
||||
self.bb_version = params["bb_version"]
|
||||
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):
|
||||
|
||||
@@ -261,6 +312,10 @@ class Builder(gtk.Window):
|
||||
|
||||
self.template = None
|
||||
|
||||
# configuration and parameters
|
||||
self.configuration = Configuration()
|
||||
self.parameters = Parameters()
|
||||
|
||||
# build step
|
||||
self.current_step = None
|
||||
self.previous_step = None
|
||||
@@ -274,6 +329,9 @@ class Builder(gtk.Window):
|
||||
# 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()
|
||||
|
||||
@@ -291,10 +349,16 @@ 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.connect("sanity-failed", self.handler_sanity_failed_cb)
|
||||
self.handler.connect("recipe-populated", self.handler_recipe_populated_cb)
|
||||
self.handler.connect("package-populated", self.handler_package_populated_cb)
|
||||
|
||||
self.handler.set_config_filter(hob_conf_filter)
|
||||
|
||||
self.initiate_new_build_async()
|
||||
|
||||
@@ -334,14 +398,18 @@ class Builder(gtk.Window):
|
||||
|
||||
def initiate_new_build_async(self):
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
self.handler.init_cooker()
|
||||
self.handler.set_extra_inherit("image_types")
|
||||
self.handler.parse_config()
|
||||
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.parse_generate_configuration()
|
||||
self.handler.generate_configuration()
|
||||
|
||||
def sanity_check(self):
|
||||
self.handler.trigger_sanity_check()
|
||||
|
||||
def populate_recipe_package_info_async(self):
|
||||
self.switch_page(self.RCPPKGINFO_POPULATING)
|
||||
@@ -355,7 +423,7 @@ class Builder(gtk.Window):
|
||||
_, all_recipes = self.recipe_model.get_selected_recipes()
|
||||
self.set_user_config()
|
||||
self.handler.reset_build()
|
||||
self.handler.generate_packages(all_recipes)
|
||||
self.handler.generate_packages(all_recipes, self.configuration.default_task)
|
||||
|
||||
def fast_generate_image_async(self):
|
||||
self.switch_page(self.FAST_IMAGE_GENERATING)
|
||||
@@ -363,21 +431,27 @@ class Builder(gtk.Window):
|
||||
_, all_recipes = self.recipe_model.get_selected_recipes()
|
||||
self.set_user_config()
|
||||
self.handler.reset_build()
|
||||
self.handler.generate_packages(all_recipes)
|
||||
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()
|
||||
packages = self.package_model.get_selected_packages()
|
||||
toolchain_packages = []
|
||||
if self.configuration.toolchain_build:
|
||||
toolchain_packages = self.package_model.get_selected_packages_toolchain()
|
||||
self.handler.reset_build()
|
||||
self.handler.generate_image(packages,
|
||||
self.hob_image,
|
||||
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,
|
||||
toolchain_packages)
|
||||
packages,
|
||||
toolchain_packages,
|
||||
self.configuration.default_task)
|
||||
|
||||
def get_parameters_sync(self):
|
||||
return self.handler.get_parameters()
|
||||
@@ -388,27 +462,33 @@ class Builder(gtk.Window):
|
||||
def cancel_build_sync(self, force=False):
|
||||
self.handler.cancel_build(force)
|
||||
|
||||
def generate_configuration_async(self):
|
||||
self.handler.generate_configuration()
|
||||
|
||||
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.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 = "."
|
||||
@@ -417,12 +497,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)
|
||||
@@ -507,6 +597,17 @@ class Builder(gtk.Window):
|
||||
left = self.package_model.set_selected_packages(selected_packages)
|
||||
self.configuration.selected_packages += left
|
||||
|
||||
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):
|
||||
if which == "distro":
|
||||
@@ -521,21 +622,15 @@ class Builder(gtk.Window):
|
||||
self.parameters.all_package_formats = formats
|
||||
|
||||
def handler_command_succeeded_cb(self, handler, initcmd):
|
||||
if initcmd == self.handler.PARSE_CONFIG:
|
||||
# settings
|
||||
params = self.get_parameters_sync()
|
||||
self.configuration = Configuration(params)
|
||||
self.parameters = Parameters(params)
|
||||
self.generate_configuration_async()
|
||||
elif initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||
params = self.get_parameters_sync()
|
||||
self.configuration.update(params)
|
||||
if initcmd == self.handler.GENERATE_CONFIGURATION:
|
||||
self.update_configuration_parameters(self.get_parameters_sync())
|
||||
self.sanity_check()
|
||||
elif initcmd == self.handler.SANITY_CHECK:
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
elif initcmd in [self.handler.GENERATE_RECIPES,
|
||||
self.handler.GENERATE_PACKAGES,
|
||||
self.handler.GENERATE_IMAGE]:
|
||||
params = self.get_parameters_sync()
|
||||
self.configuration.update(params)
|
||||
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:
|
||||
@@ -546,24 +641,25 @@ class Builder(gtk.Window):
|
||||
self.rcppkglist_populated()
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
self.generate_image_async()
|
||||
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)
|
||||
|
||||
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:
|
||||
msg = msg.replace("your local.conf", "Settings")
|
||||
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()
|
||||
self.configuration.curr_mach = ""
|
||||
self.image_configuration_page.switch_machine_combo()
|
||||
self.switch_page(self.MACHINE_SELECTION)
|
||||
self.show_error_dialog(msg)
|
||||
self.reset()
|
||||
|
||||
def handler_sanity_failed_cb(self, handler, msg):
|
||||
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)
|
||||
@@ -584,6 +680,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):
|
||||
@@ -597,10 +694,6 @@ 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)
|
||||
@@ -612,6 +705,12 @@ class Builder(gtk.Window):
|
||||
def packagelist_changed_cb(self, package_model):
|
||||
self.package_details_page.refresh_selection()
|
||||
|
||||
def handler_recipe_populated_cb(self, handler):
|
||||
self.image_configuration_page.update_progress_bar("Populated recipes", 0.99)
|
||||
|
||||
def handler_package_populated_cb(self, handler):
|
||||
self.image_configuration_page.update_progress_bar("Populated packages", 1.0)
|
||||
|
||||
def handler_parsing_started_cb(self, handler, message):
|
||||
if self.current_step != self.RCPPKGINFO_POPULATING:
|
||||
return
|
||||
@@ -631,7 +730,7 @@ class Builder(gtk.Window):
|
||||
|
||||
fraction = message["current"] * 1.0/message["total"]
|
||||
if message["eventname"] == "TreeDataPreparationProgress":
|
||||
fraction = 0.6 + 0.4 * fraction
|
||||
fraction = 0.6 + 0.38 * fraction
|
||||
else:
|
||||
fraction = 0.6 * fraction
|
||||
self.image_configuration_page.update_progress_bar(message["title"], fraction)
|
||||
@@ -641,7 +740,7 @@ class Builder(gtk.Window):
|
||||
return
|
||||
|
||||
if message["eventname"] == "TreeDataPreparationCompleted":
|
||||
fraction = 1.0
|
||||
fraction = 0.98
|
||||
else:
|
||||
fraction = 0.6
|
||||
self.image_configuration_page.update_progress_bar(message["title"], fraction)
|
||||
@@ -657,7 +756,7 @@ 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.show_configurations(self.configuration)
|
||||
self.build_details_page.show_configurations(self.configuration, self.parameters)
|
||||
|
||||
def build_succeeded(self):
|
||||
if self.current_step == self.FAST_IMAGE_GENERATING:
|
||||
@@ -665,17 +764,27 @@ 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
|
||||
|
||||
if 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)
|
||||
|
||||
def build_failed(self):
|
||||
if self.stopping:
|
||||
status = "stop"
|
||||
@@ -706,6 +815,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"
|
||||
@@ -738,6 +855,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)
|
||||
@@ -798,7 +917,7 @@ class Builder(gtk.Window):
|
||||
|
||||
def show_binb_dialog(self, binb):
|
||||
markup = "<b>Brought in by:</b>\n%s" % binb
|
||||
ptip = PersistentTooltip(markup)
|
||||
ptip = PersistentTooltip(markup, self)
|
||||
|
||||
ptip.show()
|
||||
|
||||
@@ -817,6 +936,7 @@ class Builder(gtk.Window):
|
||||
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.update_config_async()
|
||||
@@ -903,15 +1023,17 @@ class Builder(gtk.Window):
|
||||
if response == gtk.RESPONSE_YES:
|
||||
self.parameters.enable_proxy = dialog.enable_proxy
|
||||
self.configuration = dialog.configuration
|
||||
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):
|
||||
# DO reparse recipes
|
||||
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):
|
||||
@@ -972,7 +1094,7 @@ class Builder(gtk.Window):
|
||||
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)
|
||||
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() + "; "
|
||||
|
||||
@@ -356,6 +356,15 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
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))
|
||||
if self.enable_proxy:
|
||||
data += ("ALL_PROXY: " + self._get_sorted_value(self.configuration.all_proxy))
|
||||
data += ("HTTP_PROXY: " + self._get_sorted_value(self.configuration.http_proxy))
|
||||
data += ("HTTPS_PROXY: " + self._get_sorted_value(self.configuration.https_proxy))
|
||||
data += ("FTP_PROXY: " + self._get_sorted_value(self.configuration.ftp_proxy))
|
||||
data += ("GIT_PROXY_HOST: " + self._get_sorted_value(self.configuration.git_proxy_host))
|
||||
data += ("GIT_PROXY_PORT: " + self._get_sorted_value(self.configuration.git_proxy_port))
|
||||
data += ("CVS_PROXY_HOST: " + self._get_sorted_value(self.configuration.cvs_proxy_host))
|
||||
data += ("CVS_PROXY_PORT: " + self._get_sorted_value(self.configuration.cvs_proxy_port))
|
||||
for key in self.configuration.extra_setting.keys():
|
||||
data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
|
||||
return hashlib.md5(data).hexdigest()
|
||||
@@ -392,7 +401,10 @@ 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.split():
|
||||
self.image_types_checkbuttons[image_type].set_active(True)
|
||||
@@ -420,15 +432,15 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
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 basic size of your target image.\nThis is the basic size of your target image unless your selected package size exceeds this value or you select \'Image Extra Size\'."
|
||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 1024, tooltip)
|
||||
rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536, tooltip)
|
||||
sub_vbox.pack_start(label, expand=False, fill=False)
|
||||
sub_vbox.pack_start(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.\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 1024MB."
|
||||
extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 1024, tooltip)
|
||||
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)
|
||||
|
||||
@@ -447,7 +459,7 @@ class AdvancedSettingDialog (CrumbsDialog):
|
||||
self.toolchain_checkbox.set_active(self.configuration.toolchain_build)
|
||||
sub_hbox.pack_start(self.toolchain_checkbox, expand=False, fill=False)
|
||||
|
||||
tooltip = "Selects the Host platform for which you want 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)
|
||||
|
||||
@@ -1104,7 +1116,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:
|
||||
|
||||
@@ -42,6 +42,9 @@ class HobHandler(gobject.GObject):
|
||||
"command-failed" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_STRING,)),
|
||||
"sanity-failed" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_STRING,)),
|
||||
"generating-data" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
@@ -57,10 +60,16 @@ class HobHandler(gobject.GObject):
|
||||
"parsing-completed" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
(gobject.TYPE_PYOBJECT,)),
|
||||
"recipe-populated" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
"package-populated" : (gobject.SIGNAL_RUN_LAST,
|
||||
gobject.TYPE_NONE,
|
||||
()),
|
||||
}
|
||||
|
||||
(PARSE_CONFIG, GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO) = range(6)
|
||||
(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)
|
||||
(GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO, SANITY_CHECK) = range(6)
|
||||
(SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_SANITY_CHECK, SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE) = range(11)
|
||||
|
||||
def __init__(self, server, recipe_model, package_model):
|
||||
super(HobHandler, self).__init__()
|
||||
@@ -91,6 +100,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
|
||||
@@ -105,36 +123,39 @@ 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_SANITY_CHECK:
|
||||
self.runCommand(["triggerEvent", "bb.event.SanityCheck()"])
|
||||
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 = [self.hob_image]
|
||||
self.server.runCommand(["setVariable", "LINGUAS_INSTALL", ""])
|
||||
self.server.runCommand(["setVariable", "PACKAGE_INSTALL", " ".join(self.package_queue)])
|
||||
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.server.runCommand(["setVariable", "TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages)])
|
||||
targets.append(self.hob_toolchain)
|
||||
self.server.runCommand(["buildTargets", targets, "build"])
|
||||
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:
|
||||
@@ -146,8 +167,15 @@ class HobHandler(gobject.GObject):
|
||||
|
||||
if isinstance(event, bb.event.PackageInfo):
|
||||
self.package_model.populate(event._pkginfolist)
|
||||
self.emit("package-populated")
|
||||
self.run_next_command()
|
||||
|
||||
elif isinstance(event, bb.event.SanityCheckPassed):
|
||||
self.run_next_command()
|
||||
|
||||
elif isinstance(event, bb.event.SanityCheckFailed):
|
||||
self.emit("sanity-failed", event._msg)
|
||||
|
||||
elif isinstance(event, logging.LogRecord):
|
||||
if event.levelno >= logging.ERROR:
|
||||
self.error_msg += event.msg + '\n'
|
||||
@@ -156,6 +184,7 @@ class HobHandler(gobject.GObject):
|
||||
self.current_phase = "data generation"
|
||||
if event._model:
|
||||
self.recipe_model.populate(event._model)
|
||||
self.emit("recipe-populated")
|
||||
elif isinstance(event, bb.event.ConfigFilesFound):
|
||||
self.current_phase = "configuration lookup"
|
||||
var = event._variable
|
||||
@@ -179,32 +208,13 @@ 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 = ""
|
||||
if self.building:
|
||||
self.building = False
|
||||
elif isinstance(event, (bb.event.ParseStarted,
|
||||
bb.event.CacheLoadStarted,
|
||||
bb.event.TreeDataPreparationStarted,
|
||||
@@ -237,99 +247,98 @@ 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 parse_generate_configuration(self):
|
||||
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):
|
||||
if machine:
|
||||
self.server.runCommand(["setVariable", "MACHINE", 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", image_fstypes])
|
||||
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(self):
|
||||
self.commands_async.append(self.SUB_GENERATE_PKGINFO)
|
||||
self.run_next_command(self.POPULATE_PACKAGEINFO)
|
||||
|
||||
def trigger_sanity_check(self):
|
||||
self.commands_async.append(self.SUB_SANITY_CHECK)
|
||||
self.run_next_command(self.SANITY_CHECK)
|
||||
|
||||
def generate_configuration(self):
|
||||
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)
|
||||
@@ -342,19 +351,21 @@ 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, hob_image, hob_toolchain, toolchain_packages=[]):
|
||||
self.package_queue = tgts
|
||||
self.hob_image = hob_image
|
||||
self.hob_toolchain = hob_toolchain
|
||||
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)
|
||||
@@ -368,16 +379,16 @@ class HobHandler(gobject.GObject):
|
||||
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()
|
||||
@@ -392,19 +403,19 @@ class HobHandler(gobject.GObject):
|
||||
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 ""
|
||||
params["layer"] = self.runCommand(["getVariable", "BBLAYERS"]) or ""
|
||||
if hob_layer not in params["layer"].split():
|
||||
params["layer"] += (" " + 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["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
|
||||
@@ -417,7 +428,7 @@ class HobHandler(gobject.GObject):
|
||||
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:
|
||||
@@ -427,7 +438,7 @@ class HobHandler(gobject.GObject):
|
||||
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):
|
||||
@@ -439,9 +450,9 @@ class HobHandler(gobject.GObject):
|
||||
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:
|
||||
@@ -451,7 +462,7 @@ class HobHandler(gobject.GObject):
|
||||
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:
|
||||
@@ -461,7 +472,7 @@ class HobHandler(gobject.GObject):
|
||||
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:
|
||||
@@ -471,36 +482,37 @@ class HobHandler(gobject.GObject):
|
||||
image_overhead_factor = 1
|
||||
params['image_overhead_factor'] = image_overhead_factor
|
||||
|
||||
params["incompat_license"] = self._remove_redundant(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._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "")
|
||||
params["image_fstypes"] = self._remove_redundant(self.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "")
|
||||
|
||||
params["image_types"] = self._remove_redundant(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._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "")
|
||||
params["runnable_machine_patterns"] = self._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "")
|
||||
params["deployable_image_types"] = self._remove_redundant(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
|
||||
|
||||
@@ -42,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
|
||||
@@ -389,7 +391,7 @@ class PackageListModel(gtk.TreeStore):
|
||||
child_it = self.iter_next(child_it)
|
||||
it = self.iter_next(it)
|
||||
|
||||
return packagelist
|
||||
return list(set(packagelist + self.__toolchain_required_packages__));
|
||||
"""
|
||||
Return the selected package size, unit is B.
|
||||
"""
|
||||
@@ -563,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,
|
||||
@@ -615,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
|
||||
"""
|
||||
|
||||
@@ -165,7 +165,6 @@ class HobViewTable (gtk.VBox):
|
||||
|
||||
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)
|
||||
|
||||
@@ -175,7 +174,8 @@ class HobViewTable (gtk.VBox):
|
||||
if binb:
|
||||
bin = binb.split(', ')
|
||||
cell.set_property('text', bin[0])
|
||||
|
||||
else:
|
||||
cell.set_property('text', "")
|
||||
return True
|
||||
|
||||
def set_model(self, tree_model):
|
||||
@@ -1057,7 +1057,7 @@ class HobCellRendererPixbuf(gtk.CellRendererPixbuf):
|
||||
if self.control.is_active():
|
||||
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)
|
||||
self.control.start_run(200, 0, 0, 1000, 150, tree)
|
||||
else:
|
||||
self.control.remove_running_cell_area(cell_area)
|
||||
self.control.on_draw_pixbuf_cb(pix, window.cairo_create(), x, y, w, h, False)
|
||||
|
||||
@@ -264,9 +264,7 @@ class ImageConfigurationPage (HobPage):
|
||||
|
||||
self.builder.configuration.curr_mach = combo_item
|
||||
if self.machine_combo_changed_by_manual:
|
||||
self.builder.configuration.selected_image = None
|
||||
self.builder.configuration.selected_recipes = []
|
||||
self.builder.configuration.selected_packages = []
|
||||
self.builder.configuration.clear_selection()
|
||||
# reset machine_combo_changed_by_manual
|
||||
self.machine_combo_changed_by_manual = True
|
||||
|
||||
|
||||
@@ -239,3 +239,11 @@ class PackageSelectionPage (HobPage):
|
||||
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()
|
||||
@@ -121,11 +125,17 @@ class PersistentTooltip(gtk.Window):
|
||||
style.fg[gtk.STATE_NORMAL] = gtk.gdk.color_parse(val)
|
||||
self.label.set_style(style)
|
||||
break # we only care for the tooltip_fg_color
|
||||
|
||||
self.label.set_markup(markup)
|
||||
self.label.show()
|
||||
bin.add(self.label)
|
||||
hbox.pack_end(bin, True, True, 6)
|
||||
|
||||
# add the original URL display for user reference
|
||||
if 'a href' in markup:
|
||||
hbox.set_tooltip_text(self.get_markup_url(markup))
|
||||
hbox.show()
|
||||
|
||||
self.connect("key-press-event", self._catch_esc_cb)
|
||||
|
||||
"""
|
||||
@@ -161,3 +171,16 @@ class PersistentTooltip(gtk.Window):
|
||||
def hide(self):
|
||||
self.shown = False
|
||||
gtk.Window.hide(self)
|
||||
|
||||
"""
|
||||
Called to get the hyperlink URL from markup text.
|
||||
"""
|
||||
def get_markup_url(self, markup):
|
||||
url = "http:"
|
||||
if markup and type(markup) == str:
|
||||
s = markup
|
||||
if 'http:' in s:
|
||||
import re
|
||||
url = re.search('(http:[^,\\ "]+)', s).group(0)
|
||||
|
||||
return url
|
||||
|
||||
@@ -99,7 +99,7 @@ class RecipeSelectionPage (HobPage):
|
||||
}]
|
||||
}, {
|
||||
'name' : 'Tasks',
|
||||
'tooltip' : 'All tasks availabel in the Yocto Project',
|
||||
'tooltip' : 'All tasks available in the Yocto Project',
|
||||
'filter' : { RecipeListModel.COL_TYPE : ['task'] },
|
||||
'columns' : [{
|
||||
'col_name' : 'Task name',
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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__:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -82,7 +82,8 @@ ALLPREQ = html pdf tarball
|
||||
#
|
||||
# Note that the tarfile might produce the "Cannot stat: No such file or directory" error
|
||||
# message for .PNG files that are not present when building a particular branch. The
|
||||
# list of files is all-inclusive for all branches.
|
||||
# list of files is all-inclusive for all branches. Note, if you don't provide a BRANCH
|
||||
# option, it defaults to the latest stuff. This would be appropriate for "master" branch.
|
||||
#
|
||||
|
||||
ifeq ($(BRANCH),edison)
|
||||
@@ -94,13 +95,22 @@ TARFILES = style.css dev-manual.html dev-manual.pdf \
|
||||
figures/kernel-overview-3-edison.png \
|
||||
figures/source-repos.png figures/yp-download.png \
|
||||
figures/wip.png
|
||||
else
|
||||
else ifeq ($(BRANCH),denzil)
|
||||
TARFILES = style.css dev-manual.html dev-manual.pdf \
|
||||
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
||||
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
||||
figures/kernel-example-repos.png \
|
||||
figures/kernel-example-repos-denzil.png \
|
||||
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||
figures/kernel-overview-3.png \
|
||||
figures/kernel-overview-3-denzil.png \
|
||||
figures/source-repos.png figures/yp-download.png \
|
||||
figures/wip.png
|
||||
else
|
||||
TARFILES = style.css dev-manual.html dev-manual.pdf \
|
||||
figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
|
||||
figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
|
||||
figures/kernel-example-repos-denzil.png \
|
||||
figures/kernel-overview-1.png figures/kernel-overview-2.png \
|
||||
figures/kernel-overview-3-denzil.png \
|
||||
figures/source-repos.png figures/yp-download.png \
|
||||
figures/wip.png
|
||||
endif
|
||||
@@ -195,7 +205,7 @@ validate:
|
||||
|
||||
publish:
|
||||
scp -r $(MANUALS) $(STYLESHEET) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)
|
||||
cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)/figures
|
||||
cd $(DOC); scp -r $(FIGURES) www.yoctoproject.org:/srv/www/www.yoctoproject.org-docs/$(VER)/$(DOC)
|
||||
|
||||
clean:
|
||||
rm -f $(MANUALS)
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>Point to the Toolchain:</emphasis>
|
||||
If you are using a stand-alone pre-built toolchain, you should be pointing to the
|
||||
<filename>/opt/poky/1.1</filename> directory.
|
||||
<filename>&YOCTO_ADTPATH_DIR;</filename> directory.
|
||||
This is the location for toolchains installed by the ADT Installer or by hand.
|
||||
Sections "<link linkend='configuring-and-running-the-adt-installer-script'>Configuring
|
||||
and Running the ADT Installer Script</link>" and
|
||||
|
||||
@@ -46,8 +46,13 @@
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2</revnumber>
|
||||
<date>TBD 2012</date>
|
||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
||||
<date>April 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2.1</revnumber>
|
||||
<date>July 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
|
||||
@@ -58,8 +58,13 @@
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2</revnumber>
|
||||
<date>TBD 2012</date>
|
||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
||||
<date>April 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2.1</revnumber>
|
||||
<date>July 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<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.
|
||||
An example of this type of layer is the <filename>meta-intel</filename> layer.
|
||||
The <filename>meta-intel</filename> layer contains over 10 individual BSP layers.
|
||||
</para>
|
||||
|
||||
@@ -121,6 +121,15 @@
|
||||
are separate components that happen to be combined in certain end products.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Before looking at the common form for the file structure inside a BSP Layer,
|
||||
you should be aware that some requirements do exist in order for a BSP to
|
||||
be considered compliant with the Yocto Project.
|
||||
For that list of requirements, see the
|
||||
"<link linkend='released-bsp-requirements'>Released BSP Requirements</link>"
|
||||
section.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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
|
||||
@@ -644,6 +653,219 @@
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='requirements-and-recommendations-for-released-bsps'>
|
||||
<title>Requirements and Recommendations for Released BSPs</title>
|
||||
|
||||
<para>
|
||||
Certain requirements exist for a released BSP to be considered
|
||||
compliant with the Yocto Project.
|
||||
Additionally, a single recommendation also exists.
|
||||
This section describes the requirements and recommendation for
|
||||
released BSPs.
|
||||
</para>
|
||||
|
||||
<section id='released-bsp-requirements'>
|
||||
<title>Released BSP Requirements</title>
|
||||
|
||||
<para>
|
||||
Before looking at BSP requirements, you should consider the following:
|
||||
<itemizedlist>
|
||||
<listitem><para>The requirements here assume the BSP layer is a well-formed, "legal"
|
||||
layer that can be added to the Yocto Project.
|
||||
For guidelines on creating a Yocto Project layer that meets these base requirements, see the
|
||||
"<link linkend='bsp-layers'>BSP Layers</link>" and the
|
||||
"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding
|
||||
and Creating Layers"</ulink> in the Yocto Project Development Manual.</para></listitem>
|
||||
<listitem><para>The requirements in this section apply regardless of how you
|
||||
ultimately package a BSP.
|
||||
You should consult the packaging and distribution guidelines for your
|
||||
specific release process.
|
||||
For an example of packaging and distribution requirements, see the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Third_Party_BSP_Release_Process'>Third
|
||||
Party BSP Release Process</ulink> wiki page.</para></listitem>
|
||||
<listitem><para>The requirements for the BSP as it is made available to a developer
|
||||
are completely independent of the released form of the BSP.
|
||||
For example, the BSP metadata can be contained within a Git repository
|
||||
and could have a directory structure completely different from what appears
|
||||
in the officially released BSP layer.</para></listitem>
|
||||
<listitem><para>It is not required that specific packages or package
|
||||
modifications exist in the BSP layer, beyond the requirements for general
|
||||
compliance with the Yocto Project.
|
||||
For example, no requirement exists dictating that a specific kernel or
|
||||
kernel version be used in a given BSP.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Following are the requirements for a released BSP that conforms to the
|
||||
Yocto Project:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Layer Name:</emphasis>
|
||||
The BSP must have a layer name that follows the Yocto
|
||||
Project standards.
|
||||
For information on BSP layer names, see the
|
||||
"<link linkend='bsp-layers'>BSP Layers</link>" section.
|
||||
</para></listitem>
|
||||
<listitem><para><emphasis>File System Layout:</emphasis>
|
||||
When possible, use the same directory names in your
|
||||
BSP layer as listed in the <filename>recipes.txt</filename> file.
|
||||
In particular, you should place recipes
|
||||
(<filename>.bb</filename> files) and recipe
|
||||
modifications (<filename>.bbappend</filename> files) into
|
||||
<filename>recipes-*</filename> subdirectories by functional area
|
||||
as outlined in <filename>recipes.txt</filename>.
|
||||
If you cannot find a category in <filename>recipes.txt</filename>
|
||||
to fit a particular recipe, you can make up your own
|
||||
<filename>recipe-*</filename> subdirectory.
|
||||
You can find <filename>recipes.txt</filename> in the
|
||||
<filename>meta</filename> directory of the
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-files'>Yocto
|
||||
Project Files</ulink>, or in the OpenEmbedded Core Layer
|
||||
(<filename>openembedded-core</filename>) found at
|
||||
<ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
|
||||
</para>
|
||||
<para>Within any particular <filename>recipes-*</filename> category, the layout
|
||||
should match what is found in the OpenEmbedded Core
|
||||
Git repository (<filename>openembedded-core</filename>)
|
||||
or the Yocto Project Files (<filename>poky</filename>).
|
||||
In other words, make sure you place related files in appropriately
|
||||
related <filename>recipes-*</filename> subdirectories specific to the
|
||||
recipe's function, or within a subdirectory containing a set of closely-related
|
||||
recipes.
|
||||
The recipes themselves should follow the general guidelines
|
||||
for recipes used in the Yocto Project found in the
|
||||
<ulink url='https://wiki.yoctoproject.org/wiki/Recipe_%26_Patch_Style_Guide'>Yocto
|
||||
Recipe and Patch Style Guide</ulink>.</para></listitem>
|
||||
<listitem><para><emphasis>License File:</emphasis>
|
||||
You must include a license file in the
|
||||
<filename>meta-<bsp_name></filename> directory.
|
||||
This license covers the BSP metadata as a whole.
|
||||
You must specify which license to use since there is no
|
||||
default license if one is not specified.
|
||||
See the
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fishriver/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
|
||||
file for the Fish River BSP in the <filename>meta-fishriver</filename> BSP layer
|
||||
as an example.</para></listitem>
|
||||
<listitem><para><emphasis>README File:</emphasis>
|
||||
You must include a <filename>README</filename> file in the
|
||||
<filename>meta-<bsp_name></filename> directory.
|
||||
See the
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fishriver/README'><filename>README</filename></ulink>
|
||||
file for the Fish River BSP in the <filename>meta-fishriver</filename> BSP layer
|
||||
as an example.</para>
|
||||
<para>At a minimum, the <filename>README</filename> file should
|
||||
contain the following:
|
||||
<itemizedlist>
|
||||
<listitem><para>A brief description about the hardware the BSP
|
||||
targets.</para></listitem>
|
||||
<listitem><para>A list of all the dependencies a
|
||||
on which a BSP layer depends.
|
||||
These dependencies are typically a list of required layers needed
|
||||
to build the BSP.
|
||||
However, the dependencies should also contain information regarding
|
||||
any other dependencies the BSP might have.</para></listitem>
|
||||
<listitem><para>Any required special licensing information.
|
||||
For example, this information includes information on
|
||||
special variables needed to satisfy a EULA,
|
||||
or instructions on information needed to build or distribute
|
||||
binaries built from the BSP metadata.</para></listitem>
|
||||
<listitem><para>The name and contact information for the
|
||||
BSP layer maintainer.
|
||||
This is the person to whom patches and questions should
|
||||
be sent.</para></listitem>
|
||||
<listitem><para>Instructions on how to build the BSP using the BSP
|
||||
layer.</para></listitem>
|
||||
<listitem><para>Instructions on how to boot the BSP build from
|
||||
the BSP layer.</para></listitem>
|
||||
<listitem><para>Instructions on how to boot the binary images
|
||||
contained in the <filename>/binary</filename> directory,
|
||||
if present.</para></listitem>
|
||||
<listitem><para>Information on any known bugs or issues that users
|
||||
should know about when either building or booting the BSP
|
||||
binaries.</para></listitem>
|
||||
</itemizedlist></para></listitem>
|
||||
<listitem><para><emphasis>README.sources File:</emphasis>
|
||||
You must include a <filename>README.sources</filename> in the
|
||||
<filename>meta-<bsp_name></filename> directory.
|
||||
This file specifies exactly where you can find the sources used to
|
||||
generate the binary images contained in the
|
||||
<filename>/binary</filename> directory, if present.
|
||||
See the
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fishriver/README.sources'><filename>README.sources</filename></ulink>
|
||||
file for the Fish River BSP in the <filename>meta-fishriver</filename> BSP layer
|
||||
as an example.</para></listitem>
|
||||
<listitem><para><emphasis>Layer Configuration File:</emphasis>
|
||||
You must include a <filename>conf/layer.conf</filename> in the
|
||||
<filename>meta-<bsp_name></filename> directory.
|
||||
This file identifies the <filename>meta-<bsp_name></filename>
|
||||
BSP layer as a layer to the build system.</para></listitem>
|
||||
<listitem><para><emphasis>Machine Configuration File:</emphasis>
|
||||
You must include a <filename>conf/machine/<bsp_name>.conf</filename>
|
||||
in the <filename>meta-<bsp_name></filename> directory.
|
||||
This configuration file defines a machine target that can be built
|
||||
using the BSP layer.
|
||||
Multiple machine configuration files define variations of machine
|
||||
configurations that are supported by the BSP.
|
||||
If a BSP supports more multiple machine variations, you need to
|
||||
adequately describe each variation in the BSP
|
||||
<filename>README</filename> file.
|
||||
Do not use multiple machine configuration files to describe disparate
|
||||
hardware.
|
||||
Multiple machine configuration files should describe very similar targets.
|
||||
If you do have very different targets, you should create a separate
|
||||
BSP.
|
||||
<note>It is completely possible for a developer to structure the
|
||||
working repository as a conglomeration of unrelated BSP
|
||||
files, and to possibly generate specifically targeted 'release' BSPs
|
||||
from that directory using scripts or some other mechanism.
|
||||
Such considerations are outside the scope of this document.</note>
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='released-bsp-recommendations'>
|
||||
<title>Released BSP Recommendations</title>
|
||||
|
||||
<para>
|
||||
Following are recommendations for a released BSP that conforms to the
|
||||
Yocto Project:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>Bootable Images:</emphasis>
|
||||
BSP releases
|
||||
can contain one or more bootable images.
|
||||
Including bootable images allows users to easily try out the BSP
|
||||
on their own hardware.</para>
|
||||
<para>In some cases, it might not be convenient to include a
|
||||
bootable image.
|
||||
In this case, you might want to make two versions of the
|
||||
BSP available: one that contains binary images, and one
|
||||
that does not.
|
||||
The version that does not contain bootable images avoids
|
||||
unnecessary download times for users not interested in the images.
|
||||
</para>
|
||||
<para>If you need to distribute a BSP and include bootable images or build kernel and
|
||||
filesystems meant to allow users to boot the BSP for evaluation
|
||||
purposes, you should put the images and artifacts within a
|
||||
<filename>binary/</filename> subdirectory located in the
|
||||
<filename>meta-<bsp_name></filename> directory.
|
||||
<note>If you do include a bootable image as part of the BSP and the image
|
||||
was built by software covered by the GPL or other open source licenses,
|
||||
it is your responsibility to understand
|
||||
and meet all licensing requirements, which could include distribution
|
||||
of source files.</note></para></listitem>
|
||||
<listitem><para><emphasis>Use a Yocto Linux Kernel:</emphasis>
|
||||
Kernel recipes in the BSP should be based on a Yocto Linux kernel.
|
||||
Basing your recipes on these kernels reduces the costs for maintaining
|
||||
the BSP and increases its scalability.
|
||||
See the <filename>Yocto Linux Kernel</filename> category in the
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi'><filename>Yocto Source Repositories</filename></ulink>
|
||||
for these kernels.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section id='customizing-a-recipe-for-a-bsp'>
|
||||
<title>Customizing a Recipe for a BSP</title>
|
||||
|
||||
@@ -760,7 +982,7 @@
|
||||
restart the build to continue where it left off.
|
||||
During the build, the prompt will not appear again
|
||||
since you have satisfied the requirement.</para>
|
||||
<para>Once the appropriate license flags are whitelisted
|
||||
<para>Once the appropriate license flags are on the white list
|
||||
in the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, you
|
||||
can build the encumbered image with no change at all
|
||||
to the normal build process.</para></listitem>
|
||||
@@ -919,7 +1141,7 @@
|
||||
...
|
||||
|
||||
NOTE: Once created, you should add your new layer to your
|
||||
bblayers.conf file in order for it to be subsquently seen and
|
||||
bblayers.conf file in order for it to be subsequently seen and
|
||||
modified by the yocto-kernel tool.
|
||||
|
||||
NOTE for x86- and x86_64-based BSPs: The generated BSP assumes the
|
||||
@@ -931,7 +1153,7 @@
|
||||
<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
|
||||
necessary to create a BSP and perform basic kernel maintenance on that BSP using
|
||||
the tools.
|
||||
The next sections provide a concrete starting point to expand on a few points that
|
||||
might not be immediately obvious or that could use further explanation.
|
||||
@@ -990,7 +1212,7 @@
|
||||
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.
|
||||
and can easily be followed without requiring actual hardware.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -1059,7 +1281,7 @@
|
||||
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
|
||||
branch created especially for your BSP in the local
|
||||
<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>
|
||||
Git repository .
|
||||
If not, then the script re-uses an existing branch.</para>
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
$ git clone git://git.yoctoproject.org/poky
|
||||
$ cd poky
|
||||
</literallayout>
|
||||
Alternatively, you can start with the downloaded Poky "edison" tarball.
|
||||
Alternatively, you can start with the downloaded Poky "&DISTRO_NAME;" tarball.
|
||||
These commands unpack the tarball into a Yocto Project File directory structure.
|
||||
By default, the top-level directory of the file structure is named
|
||||
<filename>poky-&YOCTO_POKY;</filename>:
|
||||
<filename>&YOCTO_POKY;</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ tar xfj &YOCTO_POKY_TARBALL;
|
||||
$ cd &YOCTO_POKY;
|
||||
@@ -54,7 +54,7 @@
|
||||
<note><para>If you're using the tarball method, you can ignore all the following steps that
|
||||
ask you to carry out Git operations.
|
||||
You already have the results of those operations
|
||||
in the form of the edison release tarballs.
|
||||
in the form of the &DISTRO_NAME; release tarballs.
|
||||
Consequently, there is nothing left to do other than extract those tarballs into the
|
||||
proper locations.</para>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
and keep changes in revision control.
|
||||
See the
|
||||
"<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>" section
|
||||
for more discussion around these differneces.</para></note>
|
||||
for more discussion around these differences.</para></note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -133,7 +133,8 @@
|
||||
|
||||
<para>
|
||||
You need to have the base BSP layer on your development system.
|
||||
Similar to the local Yocto Project files, you can get the BSP
|
||||
Similar to the local <link linkend='yocto-project-files'>Yocto Project Files</link>,
|
||||
you can get the BSP
|
||||
layer in a couple of different ways:
|
||||
download the BSP tarball and extract it, or set up a local Git repository that
|
||||
has the Yocto Project BSP layers.
|
||||
@@ -160,15 +161,15 @@
|
||||
$ cd meta-intel
|
||||
</literallayout>
|
||||
Alternatively, you can start with the downloaded Crown Bay tarball.
|
||||
You can download the edison version of the BSP tarball from the
|
||||
You can download the &DISTRO_NAME; version of the BSP tarball from the
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Download</ulink> page of the
|
||||
Yocto Project website.
|
||||
Here is the specific link for the tarball needed for this example:
|
||||
<ulink url='&YOCTO_MACHINES_DL_URL;/crownbay-noemgd/crownbay-noemgd-&DISTRO_NAME;-6.0.0.tar.bz2'></ulink>.
|
||||
<ulink url='&YOCTO_MACHINES_DL_URL;/crownbay-noemgd/crownbay-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2'></ulink>.
|
||||
Again, be sure that you are already in the <filename>poky</filename> directory
|
||||
as described previously before installing the tarball:
|
||||
<literallayout class='monospaced'>
|
||||
$ tar xfj crownbay-noemgd-&DISTRO_NAME;-6.0.0.tar.bz2
|
||||
$ tar xfj crownbay-noemgd-&DISTRO_NAME;-&POKYVERSION;.tar.bz2
|
||||
$ cd meta-intel
|
||||
</literallayout>
|
||||
</para>
|
||||
@@ -177,7 +178,7 @@
|
||||
The <filename>meta-intel</filename> directory contains all the metadata
|
||||
that supports BSP creation.
|
||||
If you're using the Git method, the following
|
||||
step will switch to the edison metadata.
|
||||
step will switch to the &DISTRO_NAME; metadata.
|
||||
If you're using the tarball method, you already have the correct metadata and can
|
||||
skip to the next step.
|
||||
Because <filename>meta-intel</filename> is its own Git repository, you will want
|
||||
@@ -185,6 +186,7 @@
|
||||
For this example we are going to use the <filename>&DISTRO_NAME;</filename> branch.
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
</literallayout>
|
||||
</para>
|
||||
@@ -261,10 +263,10 @@
|
||||
|
||||
<para>
|
||||
Note that inside the <filename>mymachine.conf</filename> is the
|
||||
<filename>PREFERRED_PROVIDER_virtual/kernel</filename> statement.
|
||||
<filename>PREFERRED_VERSION_linux-yocto</filename> statement.
|
||||
This statement identifies the kernel that the BSP is going to use.
|
||||
In this case, the BSP is using <filename>linux-yocto</filename>, which is the
|
||||
current Linux Yocto kernel based on the Linux 3.0 release.
|
||||
current Linux Yocto kernel based on the Linux 3.2 release.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -283,6 +285,8 @@
|
||||
BBFILE_COLLECTIONS += "crownbay"
|
||||
BBFILE_PATTERN_crownbay := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_crownbay = "6"
|
||||
|
||||
LAYERDEPENDS_crownbay = "intel"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -293,6 +297,8 @@
|
||||
BBFILE_COLLECTIONS += "mymachine"
|
||||
BBFILE_PATTERN_mymachine := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_mymachine = "6"
|
||||
|
||||
LAYERDEPENDS_mymachine = "intel"
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
@@ -391,7 +397,7 @@
|
||||
The recipe for that kernel is not located in the
|
||||
BSP layer but rather in the local Yocto Project files at
|
||||
<filename>meta/recipes-kernel/linux</filename> and is
|
||||
named <filename>linux-yocto_3.0.bb</filename>.
|
||||
named <filename>linux-yocto_3.2.bb</filename>.
|
||||
The <filename>SRCREV_machine</filename> and <filename>SRCREV_meta</filename>
|
||||
statements point to the exact commits used by the Yocto Project development team
|
||||
in their source repositories that identify the right kernel for our hardware.
|
||||
@@ -404,7 +410,7 @@
|
||||
<para>
|
||||
However, in the <filename>meta-mymachine</filename> layer in
|
||||
<filename>recipes-kernel/linux</filename> resides a <filename>.bbappend</filename>
|
||||
file named <filename>linux-yocto_3.0.bbappend</filename> that
|
||||
file named <filename>linux-yocto_3.2.bbappend</filename> that
|
||||
appends information to the recipe of the same name in <filename>meta/recipes-kernel/linux</filename>.
|
||||
Thus, the <filename>SRCREV</filename> statements in the append file override
|
||||
the more general statements found in <filename>meta</filename>.
|
||||
@@ -413,17 +419,20 @@
|
||||
<para>
|
||||
The <filename>SRCREV</filename> statements in the append file currently identify
|
||||
the kernel that supports the Crown Bay BSP with and without EMGD support.
|
||||
Here are the statements:
|
||||
Here are the statements:
|
||||
<note>The commit ID strings used in this manual might not match the actual commit
|
||||
ID strings found in the <filename>linux-yocto_3.2.bbappend</filename> file.
|
||||
For the example, this difference does not matter.</note>
|
||||
<literallayout class='monospaced'>
|
||||
SRCREV_machine_pn-linux-yocto_crownbay ?= \
|
||||
"2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||
"211fc7f4d10ec2b82b424286aabbaff9254b7cbd"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay ?= \
|
||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||
"514847185c78c07f52e02750fbe0a03ca3a31d8f"
|
||||
|
||||
SRCREV_machine_pn-linux-yocto_crownbay-noemgd ?= \
|
||||
"2247da9131ea7e46ed4766a69bb1353dba22f873"
|
||||
"211fc7f4d10ec2b82b424286aabbaff9254b7cbd"
|
||||
SRCREV_meta_pn-linux-yocto_crownbay-noemgd ?= \
|
||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||
"514847185c78c07f52e02750fbe0a03ca3a31d8f"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -438,19 +447,19 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To fix this situation in <filename>linux-yocto_3.0.bbappend</filename>,
|
||||
To fix this situation in <filename>linux-yocto_3.2.bbappend</filename>,
|
||||
we delete the two <filename>SRCREV</filename> statements that support
|
||||
EMGD (the top pair).
|
||||
We also change the remaining pair to specify <filename>mymachine</filename>
|
||||
and insert the commit identifiers to identify the kernel in which we
|
||||
are interested, which will be based on the <filename>atom-pc-standard</filename>
|
||||
kernel.
|
||||
In this case, because we're working with the edison branch of everything, we
|
||||
In this case, because we're working with the &DISTRO_NAME; branch of everything, we
|
||||
need to use the <filename>SRCREV</filename> values for the atom-pc branch
|
||||
that are associated with the edison release.
|
||||
that are associated with the &DISTRO_NAME; release.
|
||||
To find those values, we need to find the <filename>SRCREV</filename>
|
||||
values that edison uses for the atom-pc branch, which we find in the
|
||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>
|
||||
values that &DISTRO_NAME; uses for the atom-pc branch, which we find in the
|
||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.2.bbappend</filename>
|
||||
file.
|
||||
</para>
|
||||
|
||||
@@ -459,23 +468,21 @@
|
||||
<filename>SRCREV_machine_atom-pc</filename> variable.
|
||||
The meta <filename>SRCREV</filename> isn't specified in this file, so it must be
|
||||
specified in the base kernel recipe in the
|
||||
<filename>poky/meta/recipes-kernel/linux/linux-yocto_3.0.bb</filename>
|
||||
file, in the <filename>SRCREV_meta variable</filename> found there.
|
||||
It happens to be the same as the value we already inherited from the
|
||||
<filename>meta-crownbay</filename> BSP.
|
||||
<filename>poky/meta/recipes-kernel/linux/linux-yocto_3.2.bb</filename>
|
||||
file, in the <filename>SRCREV_meta</filename> variable found there.
|
||||
Here are the final <filename>SRCREV</filename> statements:
|
||||
<literallayout class='monospaced'>
|
||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||
"1e18e44adbe79b846e382370eb29bc4b8cd5a1a0"
|
||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||
"f29531a41df15d74be5ad47d958e4117ca9e489e"
|
||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||
"b14a08f5c7b469a5077c10942f4e1aec171faa9d"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In this example, we're using the <filename>SRCREV</filename> values we
|
||||
found already captured in the edison release because we're creating a BSP based on
|
||||
edison.
|
||||
found already captured in the &DISTRO_NAME; release because we're creating a BSP based on
|
||||
&DISTRO_NAME;.
|
||||
If, instead, we had based our BSP on the master branches, we would want to use
|
||||
the most recent <filename>SRCREV</filename> values taken directly from the kernel repo.
|
||||
We will not be doing that for this example.
|
||||
@@ -484,19 +491,19 @@
|
||||
exact commit strings in the Yocto Project source repositories you need to change
|
||||
the <filename>SRCREV</filename> statements.
|
||||
You can find all the <filename>machine</filename> and <filename>meta</filename>
|
||||
branch points (commits) for the <filename>linux-yocto-3.0</filename> kernel at
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/linux-yocto-3.0'></ulink>.
|
||||
branch points (commits) for the <filename>linux-yocto-3.2</filename> kernel at
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/linux-yocto-3.2'></ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you need a little more assistance after going to the link then do the following:
|
||||
<orderedlist>
|
||||
<listitem><para>Expand the list of branches by clicking <filename>[…]</filename></para></listitem>
|
||||
<listitem><para>Click on the <filename>yocto/standard/common-pc/atom-pc</filename>
|
||||
<listitem><para>Click on the <filename>standard/default/common-pc/atom-pc</filename>
|
||||
branch</para></listitem>
|
||||
<listitem><para>Click on the commit column header to view the top commit</para></listitem>
|
||||
<listitem><para>Copy the commit string for use in the
|
||||
<filename>linux-yocto_3.0.bbappend</filename> file</para></listitem>
|
||||
<filename>linux-yocto_3.2.bbappend</filename> file</para></listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
|
||||
@@ -507,32 +514,34 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Also in the <filename>linux-yocto_3.0.bbappend</filename> file are
|
||||
Also in the <filename>linux-yocto_3.2.bbappend</filename> file are
|
||||
<filename>COMPATIBLE_MACHINE</filename>, <filename>KMACHINE</filename>,
|
||||
and <filename>KERNEL_FEATURES</filename> statements.
|
||||
and <filename>KBRANCH</filename> statements.
|
||||
Two sets of these exist: one set supports EMGD and one set does not.
|
||||
Because we are not interested in supporting EMGD those three can be deleted.
|
||||
The remaining three must be changed so that <filename>mymachine</filename> replaces
|
||||
<filename>crownbay-noemgd</filename> and <filename>crownbay</filename>.
|
||||
Because we are using the atom-pc branch for this new BSP, we can also find
|
||||
the exact branch we need for the KMACHINE variable in our new BSP from the value
|
||||
Because we are using the <filename>atom-pc</filename> branch for this new BSP, we can also find
|
||||
the exact branch we need for the <filename>KMACHINE</filename>
|
||||
and <filename>KBRANCH</filename> variables in our new BSP from the value
|
||||
we find in the
|
||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>
|
||||
<filename>poky/meta-yocto/recipes-kernel/linux/linux-yocto_3.2.bbappend</filename>
|
||||
file we looked at in a previous step.
|
||||
In this case, the value we want is in the KMACHINE_atom-pc variable in that file.
|
||||
Here is the final <filename>linux-yocto_3.0.bbappend</filename> file after all
|
||||
In this case, the values we want are in the <filename>KMACHINE_atom-pc</filename> variable
|
||||
and the <filename>KBRANCH_atom-pc</filename> variables in that file.
|
||||
Here is the final <filename>linux-yocto_3.2.bbappend</filename> file after all
|
||||
the edits:
|
||||
<literallayout class='monospaced'>
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
COMPATIBLE_MACHINE_mymachine = "mymachine"
|
||||
KMACHINE_mymachine = "yocto/standard/common-pc/atom-pc"
|
||||
KERNEL_FEATURES_append_mymachine += " cfg/smp.scc"
|
||||
KMACHINE_mymachine = "atom-pc"
|
||||
KBRANCH_mymachine = "standard/default/common-pc/atom-pc"
|
||||
|
||||
SRCREV_machine_pn-linux-yocto_mymachine ?= \
|
||||
"1e18e44adbe79b846e382370eb29bc4b8cd5a1a0"
|
||||
"f29531a41df15d74be5ad47d958e4117ca9e489e"
|
||||
SRCREV_meta_pn-linux-yocto_mymachine ?= \
|
||||
"d05450e4aef02c1b7137398ab3a9f8f96da74f52"
|
||||
"b14a08f5c7b469a5077c10942f4e1aec171faa9d"
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
@@ -600,11 +609,12 @@
|
||||
both the <filename>BB_NUMBER_THREADS</filename> and <filename>PARALLEL_MAKE</filename>
|
||||
variables to twice the number of cores your system supports.</para></listitem>
|
||||
<listitem><para>Update the <filename>bblayers.conf</filename> file so that it includes
|
||||
the path to your new BSP layer.
|
||||
In this example you need to include the pathname to <filename>meta-mymachine</filename>.
|
||||
For this example the
|
||||
<filename>BBLAYERS</filename> variable in the file would need to include the following path:
|
||||
both the path to your new BSP layer and the path to the
|
||||
<filename>meta-intel</filename> layer.
|
||||
In this example, you need to include both these paths as part of the
|
||||
<filename>BBLAYERS</filename> variable:
|
||||
<literallayout class='monospaced'>
|
||||
$HOME/poky/meta-intel
|
||||
$HOME/poky/meta-intel/meta-mymachine
|
||||
</literallayout></para></listitem>
|
||||
</orderedlist>
|
||||
@@ -682,12 +692,12 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For reference, the sato image produced by the previous steps for edison
|
||||
For reference, the sato image produced by the previous steps for &DISTRO_NAME;
|
||||
should look like the following in terms of size.
|
||||
If your sato image is much different from this,
|
||||
you probably made a mistake in one of the above steps:
|
||||
<literallayout class='monospaced'>
|
||||
358715392 2011-11-01 19:11 core-image-sato-mymachine-20111101223904.hddimg
|
||||
260538368 2012-04-27 01:44 core-image-sato-mymachine-20120427025051.hddimg
|
||||
</literallayout>
|
||||
<note>The previous instructions are also present in the README that was copied
|
||||
from meta-crownbay, which should also be updated to reflect the specifics of your
|
||||
|
||||
@@ -188,7 +188,8 @@
|
||||
<listitem><para>Store custom layers in a Git repository that uses the
|
||||
<filename>meta-<layer_name></filename> format.</para></listitem>
|
||||
<listitem><para>Clone the repository alongside other <filename>meta</filename>
|
||||
directories in the Yocto Project source files area.</para></listitem>
|
||||
directories in
|
||||
<link linkend='yocto-project-files'>Yocto Project Files</link>.</para></listitem>
|
||||
</itemizedlist>
|
||||
Following these recommendations keeps your Yocto Project files area and
|
||||
its configuration entirely inside the Yocto Project's core base.
|
||||
@@ -248,8 +249,8 @@
|
||||
|
||||
<para>
|
||||
Append files files must have the same name as the underlying recipe.
|
||||
For example, the append file <filename>someapp_1.1.bbappend</filename> must
|
||||
apply to <filename>someapp_1.1.bb</filename>.
|
||||
For example, the append file <filename>someapp_&DISTRO;.bbappend</filename> must
|
||||
apply to <filename>someapp_&DISTRO;.bb</filename>.
|
||||
This means the original recipe and append file names are version number specific.
|
||||
If the underlying recipe is renamed to update to a newer version, the
|
||||
corresponding <filename>.bbappend</filename> file must be renamed as well.
|
||||
@@ -269,14 +270,14 @@
|
||||
append file both from the
|
||||
<link linkend='yocto-project-files'>Yocto Project Files</link>.
|
||||
Here is the main formfactor recipe, which is named <filename>formfactor_0.0.bb</filename> and
|
||||
located in the meta layer at <filename>meta/bsp-recipes/formfactor</filename>:
|
||||
located in the meta layer at <filename>meta/recipes-bsp/formfactor</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
DESCRIPTION = "Device formfactor information"
|
||||
SECTION = "base"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
|
||||
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
PR = "r19"
|
||||
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||
PR = "r20"
|
||||
|
||||
SRC_URI = "file://config file://machconfig"
|
||||
S = "${WORKDIR}"
|
||||
@@ -290,11 +291,12 @@
|
||||
install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
|
||||
if [ -s "${S}/machconfig" ]; then
|
||||
install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/
|
||||
fi
|
||||
fi
|
||||
}
|
||||
</literallayout>
|
||||
Here is the append file, which is named <filename>formfactor_0.0.bbappend</filename> and is from the
|
||||
Crown Bay BSP Layer named <filename>meta-intel/meta-crownbay</filename>:
|
||||
Crown Bay BSP Layer named <filename>meta-intel/meta-crownbay</filename>.
|
||||
The file is in <filename>recipes-bsp/formfactor</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
|
||||
@@ -477,12 +479,12 @@
|
||||
</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:
|
||||
The other method for creating a custom image is to base it on an existing image.
|
||||
For example, if you want to create an image based on <filename>core-image-sato</filename>
|
||||
but add the additional package <filename>strace</filename> to the image,
|
||||
copy the <filename>meta/recipes-sato/images/core-image-sato.bb</filename> to a
|
||||
new <filename>.bb</filename> and add the following line to the end of the copy:
|
||||
<literallayout class='monospaced'>
|
||||
require core-image-sato.bb
|
||||
|
||||
IMAGE_INSTALL += "strace"
|
||||
</literallayout>
|
||||
</para>
|
||||
@@ -495,7 +497,7 @@
|
||||
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>.
|
||||
<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
|
||||
@@ -748,7 +750,7 @@
|
||||
The variable
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename>
|
||||
is used to track source license changes as described in the
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Change</ulink>" section.
|
||||
"<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Track License Changes</ulink>" section.
|
||||
You can quickly create Autotool-based recipes in a manner similar to the previous example.
|
||||
</para>
|
||||
</section>
|
||||
@@ -953,7 +955,7 @@
|
||||
<filename>postinst</filename> script.
|
||||
Normally
|
||||
<filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'>PN</ulink></filename>
|
||||
can be used, which automatically expands to PACKAGENAME.
|
||||
can be used, which automatically expands to <filename>PACKAGENAME</filename>.
|
||||
A post-installation function has the following structure:
|
||||
<literallayout class='monospaced'>
|
||||
pkg_postinst_PACKAGENAME () {
|
||||
@@ -1082,7 +1084,7 @@ so that there are some definite steps on how to do this. I need more detail her
|
||||
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'>
|
||||
PREFERRED_PROVIDER</ulink></filename>_virtual/kernel (see below)</para></listitem>
|
||||
<listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'>
|
||||
MACHINE_FEATURES</ulink></filename> (e.g. "kernel26 apm screen wifi")</para></listitem>
|
||||
MACHINE_FEATURES</ulink></filename> (e.g. "apm screen wifi")</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
|
||||
@@ -127,6 +127,14 @@
|
||||
<ulink url='&YOCTO_HOME_URL;/download/yocto/yocto-project-1.1-release-notes-poky-&POKYVERSION;'>
|
||||
Release Notes</ulink>:</emphasis> Features, updates and known issues for the current
|
||||
release of the Yocto Project.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='&YOCTO_HOME_URL;/projects/hob'>
|
||||
Hob</ulink>:</emphasis> A graphical user interface for BitBake.
|
||||
Hob's primary goal is to enable a user to perform common tasks more easily.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>
|
||||
Build Appliance</ulink>:</emphasis> Allows you to build and boot a custom embedded Linux
|
||||
image with the Yocto Project using a non-Linux development system.</para></listitem>
|
||||
<listitem><para><emphasis>
|
||||
<ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:</emphasis>
|
||||
The bug tracking application the Yocto Project uses.
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/kernel-example-repos.png" width="7in" depth="5in"
|
||||
<imagedata fileref="figures/kernel-example-repos-denzil.png" width="7in" depth="5in"
|
||||
align="center" scale="100" />
|
||||
</para>
|
||||
|
||||
@@ -155,13 +155,13 @@
|
||||
$ git branch -a
|
||||
$ git tag -l
|
||||
</literallayout>
|
||||
This example uses the Yocto Project 1.1 Release code named "edison",
|
||||
which maps to the <filename>edison</filename> branch in the repository.
|
||||
The following commands create and checkout the local <filename>edison</filename>
|
||||
This example uses the Yocto Project &DISTRO; Release code named "&DISTRO_NAME;",
|
||||
which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository.
|
||||
The following commands create and checkout the local <filename>&DISTRO_NAME;</filename>
|
||||
branch:
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
Branch edison set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
</literallayout>
|
||||
</para>
|
||||
@@ -178,13 +178,28 @@
|
||||
<filename>poky-extras</filename> Git Repository</link>"
|
||||
for information on how to get the <filename>poky-extras</filename> repository.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Because this example uses the Yocto Project &DISTRO; Release code
|
||||
named "&DISTRO_NAME;", which maps to the <filename>&DISTRO_NAME;</filename>
|
||||
branch in the repository, you need to be sure you are using that
|
||||
branch for <filename>poky-extra</filename>.
|
||||
The following commands create and checkout the local
|
||||
branch you are using for the <filename>&DISTRO_NAME;</filename>
|
||||
branch:
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section id='setting-up-the-bare-clone-and-its-copy'>
|
||||
<title>Setting Up the Bare Clone and its Copy</title>
|
||||
|
||||
<para>
|
||||
This example modifies the <filename>linux-yocto-3.0-1.1.x</filename> kernel.
|
||||
This example modifies the <filename>linux-yocto-3.2</filename> kernel.
|
||||
Thus, you need to create a bare clone of that kernel and then make a copy of the
|
||||
bare clone.
|
||||
See the bulleted item
|
||||
@@ -196,15 +211,16 @@
|
||||
The bare clone exists for the kernel build tools and simply as the receiving end
|
||||
of <filename>git push</filename>
|
||||
commands after you make edits and commits inside the copy of the clone.
|
||||
The copy (<filename>my-linux-yocto-3.0-1.1.x-work</filename> in this example) has to have
|
||||
The copy (<filename>my-linux-yocto-3.2-work</filename> in this example) has to have
|
||||
a local branch created and checked out for your work.
|
||||
This example uses <filename>common-pc-base</filename> as the local branch.
|
||||
The following commands create and checkout the branch:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/my-linux-yocto-3.0-1.1.x-work
|
||||
$ git checkout -b common-pc-base origin/yocto/standard/common-pc/base
|
||||
$ cd ~/my-linux-yocto-3.2-work
|
||||
$ git checkout -b common-pc-base origin/standard/default/common-pc/base
|
||||
Checking out files: 100% (532/532), done.
|
||||
Branch common-pc-base set up to track remote branch
|
||||
yocto/standard/common-pc/base from origin.
|
||||
standard/default/common-pc/base from origin.
|
||||
Switched to a new branch 'common-pc-base'
|
||||
</literallayout>
|
||||
</para>
|
||||
@@ -296,7 +312,7 @@
|
||||
|
||||
<para>
|
||||
The file you change in this example is named <filename>calibrate.c</filename>
|
||||
and is located in the <filename>my-linux-yocto-3.0-1.1.x-work</filename> Git repository
|
||||
and is located in the <filename>my-linux-yocto-3.2-work</filename> Git repository
|
||||
(the copy of the bare clone) in <filename>init</filename>.
|
||||
This example simply inserts several <filename>printk</filename> statements
|
||||
at the beginning of the <filename>calibrate_delay</filename> function.
|
||||
@@ -307,10 +323,11 @@
|
||||
<literallayout class='monospaced'>
|
||||
void __cpuinit calibrate_delay(void)
|
||||
{
|
||||
unsigned long lpj;
|
||||
static bool printed;
|
||||
unsigned long lpj;
|
||||
static bool printed;
|
||||
int this_cpu = smp_processor_id();
|
||||
|
||||
if (preset_lpj) {
|
||||
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
|
||||
.
|
||||
.
|
||||
.
|
||||
@@ -319,19 +336,21 @@
|
||||
|
||||
<para>
|
||||
Here is the altered code showing five new <filename>printk</filename> statements
|
||||
just after initializing <filename>lps_precision</filename>:
|
||||
near the top of the function:
|
||||
<literallayout class='monospaced'>
|
||||
void __cpuinit calibrate_delay(void)
|
||||
{
|
||||
unsigned long lpj;
|
||||
static bool printed;
|
||||
unsigned long lpj;
|
||||
static bool printed;
|
||||
int this_cpu = smp_processor_id();
|
||||
|
||||
printk("*************************************\n");
|
||||
printk("* *\n");
|
||||
printk("* HELLO YOCTO KERNEL *\n");
|
||||
printk("* *\n");
|
||||
printk("*************************************\n");
|
||||
|
||||
if (preset_lpj) {
|
||||
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
|
||||
.
|
||||
.
|
||||
.
|
||||
@@ -357,7 +376,7 @@
|
||||
<para>
|
||||
The following command pushes the changes to the bare clone:
|
||||
<literallayout class='monospaced'>
|
||||
$ git push origin common-pc-base:yocto/standard/common-pc/base
|
||||
$ git push origin common-pc-base:standard/default/common-pc/base
|
||||
</literallayout>
|
||||
</para>
|
||||
</section>
|
||||
@@ -416,24 +435,24 @@
|
||||
"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Identify Your Source Files:</emphasis> In the
|
||||
<filename>linux-yocto_3.0.bbappend</filename> file located in the
|
||||
<filename>linux-yocto_3.2.bbappend</filename> file located in the
|
||||
<filename>poky-extras/meta-kernel-dev/recipes-kernel/linux</filename>
|
||||
directory, you need to identify the location of the
|
||||
local source code, which in this example is the bare clone named
|
||||
<filename>linux-yocto-3.0-1.1.x.git</filename>.
|
||||
<filename>linux-yocto-3.2.git</filename>.
|
||||
To do this, set the <filename>KSRC_linux_yocto</filename> variable to point to your
|
||||
local <filename>linux-yocto-3.0-1.1.x.git</filename> Git repository by adding the
|
||||
local <filename>linux-yocto-3.2.git</filename> Git repository by adding the
|
||||
following statement.
|
||||
Be sure to substitute your user information in the statement:
|
||||
<literallayout class='monospaced'>
|
||||
KSRC_linux_yocto ?= /home/scottrif/linux-yocto-3.0-1.1.x.git
|
||||
KSRC_linux_yocto_3_2 ?= "/home/scottrif/linux-yocto-3.2.git"
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para><emphasis>Specify the Kernel Machine:</emphasis> Also in the
|
||||
<filename>linux-yocto_3.0.bbappend</filename> file, you need to specify
|
||||
<!-- <listitem><para><emphasis>Specify the Kernel Machine:</emphasis> Also in the
|
||||
<filename>linux-yocto_3.2.bbappend</filename> file, you need to specify
|
||||
the kernel machine with the following statement:
|
||||
<literallayout class='monospaced'>
|
||||
KMACHINE_qemux86 = "yocto/standard/common-pc/base"
|
||||
</literallayout></para></listitem>
|
||||
KMACHINE_qemux86 = "standard/default/common-pc/base"
|
||||
</literallayout></para></listitem> -->
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
@@ -446,7 +465,7 @@
|
||||
unused <filename>.bbappend</filename> files.
|
||||
Alternatively, you can simply remove all the files
|
||||
except the one your are using for the build
|
||||
(i.e. <filename>linux-yocto_3.0.bbappend</filename> in this example).
|
||||
(i.e. <filename>linux-yocto_3.2.bbappend</filename> in this example).
|
||||
</note>
|
||||
</section>
|
||||
|
||||
@@ -505,8 +524,8 @@
|
||||
<title>Changing the Kernel Configuration</title>
|
||||
|
||||
<para>
|
||||
This example changes the default behavior, which is "off", of the Symmetric
|
||||
Multi-processing Support (<filename>CONFIG_SMP</filename>) to "on".
|
||||
This example changes the default behavior, which is "on", of the Symmetric
|
||||
Multi-processing Support (<filename>CONFIG_SMP</filename>) to "off".
|
||||
It is a simple example that demonstrates how to reconfigure the kernel.
|
||||
</para>
|
||||
|
||||
@@ -518,9 +537,9 @@
|
||||
in "<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source
|
||||
Code</link>" you should already have the Yocto Project files set up on your
|
||||
host machine.
|
||||
If this is the case, go to then next section titled
|
||||
If this is the case, go to the next section, which is titled
|
||||
"<link linkend='examining-the-default-config-smp-behavior'>Examining the Default
|
||||
<filename>CONFIG_SMP</filename> Behavior</link>" and continue with the
|
||||
<filename>CONFIG_SMP</filename> Behavior</link>", and continue with the
|
||||
example.
|
||||
</para>
|
||||
|
||||
@@ -529,7 +548,7 @@
|
||||
you can get them through tarball extraction or by
|
||||
cloning the <filename>poky</filename> Git repository.
|
||||
This example uses <filename>poky</filename> as the root directory of the
|
||||
local Yocto Project files Git repository.
|
||||
local <link linkend='yocto-project-files'>Yocto Project Files</link> Git repository.
|
||||
See the bulleted item
|
||||
"<link linkend='local-yp-release'>Yocto Project Release</link>"
|
||||
for information on how to get these files.
|
||||
@@ -545,13 +564,13 @@
|
||||
$ git branch -a
|
||||
$ git tag -l
|
||||
</literallayout>
|
||||
This example uses the Yocto Project 1.1.1 Release code named "&DISTRO_NAME;",
|
||||
This example uses the Yocto Project &DISTRO; Release code named "&DISTRO_NAME;",
|
||||
which maps to the <filename>&DISTRO_NAME;</filename> branch in the repository.
|
||||
The following commands create and checkout the local <filename>&DISTRO_NAME;</filename>
|
||||
branch:
|
||||
<literallayout class='monospaced'>
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
Branch edison set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Branch &DISTRO_NAME; set up to track remote branch &DISTRO_NAME; from origin.
|
||||
Switched to a new branch '&DISTRO_NAME;'
|
||||
</literallayout>
|
||||
</para>
|
||||
@@ -612,11 +631,11 @@
|
||||
<title>Examining the Default <filename>CONFIG_SMP</filename> Behavior</title>
|
||||
|
||||
<para>
|
||||
By default, <filename>CONFIG_SMP</filename> supports single processor machines.
|
||||
By default, <filename>CONFIG_SMP</filename> supports multiple processor machines.
|
||||
To see this default setting from within the QEMU emulator, boot your image using
|
||||
the emulator as follows:
|
||||
<literallayout class='monospaced'>
|
||||
$ runqemu qemux86 qemuparams="-smp 2"
|
||||
$ runqemu qemux86 qemuparams="-smp 4"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -624,11 +643,25 @@
|
||||
Login to the machine using <filename>root</filename> with no password.
|
||||
After logging in, enter the following command to see how many processors are
|
||||
being supported in the emulator.
|
||||
The emulator reports support for a single processor:
|
||||
The emulator reports support for the number of processors you specified using
|
||||
the <filename>-smp</filename> option, four in this case:
|
||||
<literallayout class='monospaced'>
|
||||
# cat /proc/cpuinfo | grep processor
|
||||
processor : 0
|
||||
processor : 1
|
||||
processor : 2
|
||||
processor : 3
|
||||
#
|
||||
</literallayout>
|
||||
To check the setting for <filename>CONFIG_SMP</filename>, you can use the
|
||||
following command:
|
||||
<literallayout class='monospaced'>
|
||||
zcat /proc/config.gz | grep CONFIG_SMP
|
||||
</literallayout>
|
||||
The console returns the following showing that multi-processor machine support
|
||||
is set:
|
||||
<literallayout class='monospaced'>
|
||||
CONFIG_SMP=y
|
||||
</literallayout>
|
||||
Logout of the emulator using the <filename>exit</filename> command and
|
||||
then close it down.
|
||||
@@ -654,15 +687,25 @@
|
||||
<para>
|
||||
After setting up the environment to run <filename>menuconfig</filename>, you are ready
|
||||
to use the tool to interactively change the kernel configuration.
|
||||
In this example, we are basing our changes on the <filename>linux-yocto-3.0-1.1.x</filename>
|
||||
In this example, we are basing our changes on the <filename>linux-yocto-3.2</filename>
|
||||
kernel.
|
||||
The Yocto Project build environment recognizes this kernel as
|
||||
<filename>linux-yocto</filename>.
|
||||
Thus, the following command from the shell in which you previously sourced the
|
||||
environment initialization script launches <filename>menuconfig</filename>:
|
||||
Thus, the following commands from the shell in which you previously sourced the
|
||||
environment initialization script cleans the shared state memory and the
|
||||
<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
|
||||
directory and then builds and launches <filename>menuconfig</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ bitbake linux-yocto -c cleansstate
|
||||
$ bitbake linux-yocto -c menuconfig
|
||||
</literallayout>
|
||||
<note>
|
||||
Due to a bug in the release, it is necessary to clean the shared state memory
|
||||
in order for configurations made using <filename>menuconfig</filename> to take
|
||||
effect.
|
||||
For information on the bug, see
|
||||
<ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=2256'></ulink>
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -671,7 +714,7 @@
|
||||
You can find it at <filename>Processor Type and Features</filename>.
|
||||
The configuration selection is
|
||||
<filename>Symmetric Multi-processing Support</filename>.
|
||||
After using the arrow keys to highlight this selection, press "y" to select it.
|
||||
After using the arrow keys to highlight this selection, press "n" to turn it off.
|
||||
Then, exit out and save your selections.
|
||||
</para>
|
||||
|
||||
@@ -680,22 +723,25 @@
|
||||
is updated.
|
||||
This is the file that the build system uses to configure the Linux Yocto kernel
|
||||
when it is built.
|
||||
You can find and examine this file in the Yocto Project files Git repository in
|
||||
You can find and examine this file in the Yocto Project Files Git repository in
|
||||
the build directory.
|
||||
This example uses the following.
|
||||
Note that this example directory is artificially split and many of the characters
|
||||
in the actually filename are omitted in order to make it more
|
||||
readable:
|
||||
This example uses the following:
|
||||
<literallayout class='monospaced'>
|
||||
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-2.6.37+git1+84f...
|
||||
...r20/linux-qemux86-standard-build
|
||||
~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.2.11+git1+84f...
|
||||
...656ed30-r1/linux-qemux86-standard-build
|
||||
</literallayout>
|
||||
<note>
|
||||
The previous example directory is artificially split and many of the characters
|
||||
in the actual filename are omitted in order to make it more readable.
|
||||
Also, depending on the kernel you are using, the exact pathname might differ
|
||||
slightly.
|
||||
</note>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Within the <filename>.config</filename> file, you can see the following setting:
|
||||
<literallayout class='monospaced'>
|
||||
CONFIG_SMP=y
|
||||
# CONFIG_SMP is not set
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -729,11 +775,22 @@
|
||||
$ bitbake linux-yocto
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<note>
|
||||
Manually turning off a kernel configuration setting such as
|
||||
<filename>CONFIG_SMP</filename> can cause the kernel configuration audit
|
||||
to issue warnings during the build.
|
||||
In this example, warnings appear telling you that the expected value
|
||||
<filename>CONFIG_SMP</filename> does not appear in the <filename>.config</filename>
|
||||
file.
|
||||
Because in this example you specifically turned off <filename>CONFIG_SMP</filename>,
|
||||
you can safely ignore the apparent conflict.
|
||||
</note>
|
||||
|
||||
<para>
|
||||
Now run the QEMU emulator:
|
||||
Now run the QEMU emulator and pass it the same multi-processor option as before:
|
||||
<literallayout class='monospaced'>
|
||||
$ runqemu qemux86 qemuparams="-smp 2"
|
||||
$ runqemu qemux86 qemuparams="-smp 4"
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
@@ -743,13 +800,22 @@
|
||||
<literallayout class='monospaced'>
|
||||
# cat /proc/cpuinfo | grep processor
|
||||
processor : 0
|
||||
processor : 1
|
||||
#
|
||||
</literallayout>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
From the output, you can see that you have successfully reconfigured the kernel.
|
||||
From the output, you can see that the kernel no longer supports multi-processor systems.
|
||||
The output indicates support for a single processor. You can verify the
|
||||
<filename>CONFIG_SMP</filename> setting by using this command:
|
||||
<literallayout class='monospaced'>
|
||||
zcat /proc/config.gz | grep CONFIG_SMP
|
||||
</literallayout>
|
||||
The console returns the following output:
|
||||
<literallayout class='monospaced'>
|
||||
# CONFIG_SMP is not set
|
||||
</literallayout>
|
||||
You have successfully reconfigured the kernel.
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
@@ -120,13 +120,15 @@
|
||||
Crown Bay that does not support the <trademark class='registered'>Intel</trademark>
|
||||
Embedded Media Graphics Driver (EMGD).
|
||||
The remainder of this example uses that base BSP.</para>
|
||||
<para>To see the supported BSPs, go to the Yocto Project
|
||||
<ulink url='&YOCTO_DL_URL;/download'>download page</ulink> and click
|
||||
on “BSP Downloads.”</para></listitem>
|
||||
<para>To see the supported BSPs, go to the
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Download</ulink> page on the Yocto Project
|
||||
website and click on “BSP Downloads.”</para></listitem>
|
||||
<listitem><para><emphasis>Create your own BSP layer</emphasis>: Layers are ideal for
|
||||
isolating and storing work for a given piece of hardware.
|
||||
A layer is really just a location or area in which you place the recipes for your BSP.
|
||||
A layer is really just a location or area in which you place the recipes for your BSP.
|
||||
In fact, a BSP is, in itself, a special type of layer.
|
||||
</para>
|
||||
<para>
|
||||
Another example that illustrates a layer is an application.
|
||||
Suppose you are creating an application that has library or other dependencies in
|
||||
order for it to compile and run.
|
||||
@@ -134,16 +136,22 @@
|
||||
are kept.
|
||||
The key point for a layer is that it is an isolated area that contains
|
||||
all the relevant information for the project that the Yocto Project build
|
||||
system knows about.</para>
|
||||
system knows about.
|
||||
For more information on layers, see the
|
||||
"<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
|
||||
section.
|
||||
For more information on BSP layers, see the
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" section in the
|
||||
Yocto Project Board Support Package (BSP) Developer's Guide.</para>
|
||||
<note>The Yocto Project supports four BSPs that are part of the
|
||||
Yocto Project release: <filename>atom-pc</filename>, <filename>beagleboard</filename>,
|
||||
<filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
|
||||
The recipes and configurations for these four BSPs are located and dispersed
|
||||
within the local Yocto Project files.
|
||||
Consequently, they are not totally isolated in the spirit of layers unless you think
|
||||
of <filename>meta-yocto</filename> as a layer itself.
|
||||
within the <link linkend='yocto-project-files'>Yocto Project Files</link>.
|
||||
On the other hand, BSP layers for Crown Bay, Emenlow, Jasper Forest,
|
||||
N450, and Sugar Bay are isolated.</note>
|
||||
N450, Cedar Trail, Fish River, Fish River Island II, Romley, sys940x, tlk,
|
||||
and Sugar Bay exist in their own separate layers within the larger
|
||||
<filename>meta-intel</filename> layer.</note>
|
||||
<para>When you set up a layer for a new BSP, you should follow a standard layout.
|
||||
This layout is described in the section
|
||||
"<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
|
||||
@@ -235,7 +243,7 @@
|
||||
<ulink url='&YOCTO_GIT_URL;'></ulink>.
|
||||
If you look at the interface, you will see to the left a grouping of
|
||||
Git repositories titled "Yocto Linux Kernel."
|
||||
Within this group, you will find the four different kernels supported by
|
||||
Within this group, you will find several kernels supported by
|
||||
the Yocto Project:
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis><filename>linux-yocto-2.6.34</filename></emphasis> - The
|
||||
@@ -247,6 +255,9 @@
|
||||
<listitem><para><emphasis><filename>linux-yocto-3.0-1.1.x</filename></emphasis> - The
|
||||
stable Linux Yocto kernel to use with the Yocto Project Release 1.1.x. This kernel
|
||||
is based on the Linux 3.0 release</para></listitem>
|
||||
<listitem><para><emphasis><filename>linux-yocto-3.2</filename></emphasis> - The
|
||||
stable Linux Yocto kernel to use with the Yocto Project Release 1.2. This kernel
|
||||
is based on the Linux 3.2 release</para></listitem>
|
||||
<listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
|
||||
kernel based on the latest upstream release candidate available.</para></listitem>
|
||||
</itemizedlist>
|
||||
@@ -288,7 +299,7 @@
|
||||
</para>
|
||||
|
||||
<note>
|
||||
Keep in mind the figure does not take into account all four supported Linux Yocto
|
||||
Keep in mind the figure does not take into account all the supported Linux Yocto
|
||||
kernel types, but rather shows a single generic kernel just for conceptual purposes.
|
||||
Also keep in mind that this structure represents the Yocto Project source repositories
|
||||
that are either pulled from during the build or established on the host development system
|
||||
@@ -325,7 +336,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<imagedata fileref="figures/kernel-overview-3.png"
|
||||
<imagedata fileref="figures/kernel-overview-3-denzil.png"
|
||||
width="6in" depth="4in" align="center" scale="100" />
|
||||
</para>
|
||||
|
||||
@@ -363,11 +374,11 @@
|
||||
<para>
|
||||
Again, for a complete discussion of the Yocto Project kernel's architcture and its
|
||||
branching strategy,
|
||||
see the <ulink url='&YOCTO_DOCS_KERNEL_URL;'>
|
||||
see <ulink url='&YOCTO_DOCS_KERNEL_URL;'>
|
||||
The Yocto Project Kernel Architecture and Use Manual</ulink>.
|
||||
Also, you can reference
|
||||
<xref linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</xref>
|
||||
for a detailed example that modifies the kernel.
|
||||
You can also reference the
|
||||
"<link linkend='modifying-the-kernel-source-code'>Modifying the Kernel Source Code</link>"
|
||||
section for a detailed example that modifies the kernel.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -461,7 +472,7 @@
|
||||
<listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
|
||||
changes to your kernel (configurations, source code changes, recipe additions,
|
||||
or recipe changes), there remains a few things
|
||||
you need to do in order for the Yocto Project build system to create your image.
|
||||
you need to do in order for the Yocto Project build system (BitBake) to create your image.
|
||||
If you have not done so, you need to get the build environment ready by sourcing
|
||||
the environment setup script described earlier.
|
||||
You also need to be sure two key configuration files
|
||||
@@ -574,7 +585,7 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
||||
You must have a target kernel image that has been built using the Yocto Project.</para>
|
||||
<para>Depending on whether the Yocto Project has a pre-built image that matches your target
|
||||
architecture and where you are going to run the image while you develop your application
|
||||
(QEMU or real hardware), the area you get the image from differs.
|
||||
(QEMU or real hardware), the area from which you get the image differs.
|
||||
<itemizedlist>
|
||||
<listitem><para>Download the image from
|
||||
<ulink url='&YOCTO_MACHINES_DL_URL;'>
|
||||
@@ -717,8 +728,8 @@ WRITER NOTE: The areas to get the kernel and root filesystem are located in the
|
||||
<listitem><para>You can modify various policy settings such as the package format used to build with,
|
||||
the parrallelism BitBake uses, whether or not to build an external toolchain, and which host
|
||||
to build against.</para></listitem>
|
||||
<listitem><para>You can manage <link linkend='understanding-and-creating-layers'>Understanding
|
||||
and Creating layers</link>.</para></listitem>
|
||||
<listitem><para>You can manage
|
||||
<link linkend='understanding-and-creating-layers'>layers</link>.</para></listitem>
|
||||
<listitem><para>You can select a base image and then add extra packages for your custom build.
|
||||
</para></listitem>
|
||||
<listitem><para>You can launch and monitor the build from within Hob.</para></listitem>
|
||||
|
||||
@@ -335,7 +335,8 @@
|
||||
The area is created when you <filename>source</filename> the Yocto Project setup
|
||||
environment script that is found in the Yocto Project files area
|
||||
(i.e. <filename>oe-init-build-env</filename>).
|
||||
The <filename>TOPDIR</filename> variable points to the build directory.</para>
|
||||
The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>
|
||||
variable points to the build directory.</para>
|
||||
|
||||
<para>You have a lot of flexibility when creating the Yocto Project Build Directory.
|
||||
Following are some examples that show how to create the directory:
|
||||
@@ -494,7 +495,8 @@
|
||||
Git uses "branches" to organize different development efforts.
|
||||
For example, the <filename>poky</filename> repository has
|
||||
<filename>laverne</filename>, <filename>bernard</filename>,
|
||||
<filename>edison</filename>, and <filename>master</filename> branches among
|
||||
<filename>edison</filename>, <filename>denzil</filename> and
|
||||
<filename>master</filename> branches among
|
||||
others.
|
||||
You can see all the branches by going to
|
||||
<ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
|
||||
@@ -525,7 +527,7 @@
|
||||
$ cd ~
|
||||
$ git clone git://git.yoctoproject.org/poky
|
||||
$ cd poky
|
||||
$ git checkout &DISTRO_NAME; -b &DISTRO_NAME;
|
||||
$ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
|
||||
</literallayout>
|
||||
In this example, the name of the top-level directory of your local Yocto Project
|
||||
Files Git repository is <filename>poky</filename>.
|
||||
@@ -577,14 +579,14 @@
|
||||
$ cd ~
|
||||
$ git clone git://git.yoctoproject.org/poky
|
||||
$ cd poky
|
||||
$ git checkout &DISTRO_NAME;-&POKYVERSION; -b &DISTRO_NAME;-&POKYVERSION;
|
||||
$ git checkout -b my-&DISTRO_NAME;-&POKYVERSION; &DISTRO_NAME;-&POKYVERSION;
|
||||
</literallayout>
|
||||
In this example, the name of the top-level directory of your local Yocto Project
|
||||
Files Git repository is <filename>poky</filename>.
|
||||
And, the name of the local branch you have created and checked out is
|
||||
<filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
|
||||
<filename>my-&DISTRO_NAME;-&POKYVERSION;</filename>.
|
||||
The files in your repository now exactly match the Yocto Project &DISTRO;
|
||||
Release tag (&DISTRO_NAME;).
|
||||
Release tag (<filename>&DISTRO_NAME;-&POKYVERSION;</filename>).
|
||||
It is important to understand that when you create and checkout a local
|
||||
working branch based on a tag, your environment matches a specific point
|
||||
in time and not a development branch.
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can use the Yocto Project, which uses the BitBake build tool, to develop complete Linux
|
||||
You can use the Yocto Project build system, which uses
|
||||
<ulink url='http://bitbake.berlios.de/manual/'>BitBake</ulink>, to develop complete Linux
|
||||
images and associated user-space applications for architectures based on ARM, MIPS, PowerPC,
|
||||
x86 and x86-64.
|
||||
While the Yocto Project does not provide a strict testing framework,
|
||||
@@ -109,11 +110,11 @@
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone git://git.yoctoproject.org/poky
|
||||
Initialized empty Git repository in /home/scottrif/poky/.git/
|
||||
remote: Counting objects: 116882, done.
|
||||
remote: Compressing objects: 100% (35987/35987), done.
|
||||
remote: Total 116882 (delta 80651), reused 113045 (delta 77578)
|
||||
Receiving objects: 100% (116882/116882), 72.13 MiB | 2.68 MiB/s, done.
|
||||
Resolving deltas: 100% (80651/80651), done.
|
||||
remote: Counting objects: 141863, done.
|
||||
remote: Compressing objects: 100% (38624/38624), done.
|
||||
remote: Total 141863 (delta 99661), reused 141816 (delta 99614)
|
||||
Receiving objects: 100% (141863/141863), 76.64 MiB | 126 KiB/s, done.
|
||||
Resolving deltas: 100% (99661/99661), done.
|
||||
</literallayout></para>
|
||||
<para>For another example of how to set up your own local Git repositories, see this
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
||||
@@ -132,29 +133,29 @@
|
||||
For simplicity, it is recommended that you create these structures outside of the
|
||||
Yocto Project Files Git repository.</para>
|
||||
<para>As an example, the following transcript shows how to create the bare clone
|
||||
of the <filename>linux-yocto-3.0-1.1.x</filename> kernel and then create a copy of
|
||||
of the <filename>linux-yocto-3.2</filename> kernel and then create a copy of
|
||||
that clone.
|
||||
<note>When you have a local Linux Yocto kernel Git repository, you can
|
||||
reference that repository rather than the upstream Git repository as
|
||||
part of the <filename>clone</filename> command.
|
||||
Doing so can speed up the process.</note></para>
|
||||
<para>In the following example, the bare clone is named
|
||||
<filename>linux-yocto-3.0-1.1.x.git</filename>, while the
|
||||
copy is named <filename>my-linux-yocto-3.0-1.1.x-work</filename>:
|
||||
<filename>linux-yocto-3.2.git</filename>, while the
|
||||
copy is named <filename>my-linux-yocto-3.2-work</filename>:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.0-1.1.x linux-yocto-3.0-1.1.x.git
|
||||
Initialized empty Git repository in /home/scottrif/linux-yocto-3.0-1.1.x.git/
|
||||
remote: Counting objects: 2259181, done.
|
||||
remote: Compressing objects: 100% (373259/373259), done.
|
||||
remote: Total 2259181 (delta 1892638), reused 2231556 (delta 1865300)
|
||||
Receiving objects: 100% (2259181/2259181), 482.44 MiB | 580 KiB/s, done.
|
||||
Resolving deltas: 100% (1892638/1892638), done.
|
||||
$ git clone --bare git://git.yoctoproject.org/linux-yocto-3.2 linux-yocto-3.2.git
|
||||
Initialized empty Git repository in /home/scottrif/linux-yocto-3.2.git/
|
||||
remote: Counting objects: 2468027, done.
|
||||
remote: Compressing objects: 100% (392255/392255), done.
|
||||
remote: Total 2468027 (delta 2071693), reused 2448773 (delta 2052498)
|
||||
Receiving objects: 100% (2468027/2468027), 530.46 MiB | 129 KiB/s, done.
|
||||
Resolving deltas: 100% (2071693/2071693), done.
|
||||
</literallayout></para>
|
||||
<para>Now create a clone of the bare clone just created:
|
||||
<literallayout class='monospaced'>
|
||||
$ git clone linux-yocto-3.0-1.1.x.git my-linux-yocto-3.0-1.1.x-work
|
||||
Initialized empty Git repository in /home/scottrif/my-linux-yocto-3.0-1.1.x/.git/
|
||||
Checking out files: 100% (36898/36898), done.
|
||||
$ git clone linux-yocto-3.2.git my-linux-yocto-3.2-work
|
||||
Initialized empty Git repository in /home/scottrif/my-linux-yocto-3.2-work/.git/
|
||||
Checking out files: 100% (37619/37619), done.
|
||||
</literallayout></para></listitem>
|
||||
<listitem id='poky-extras-repo'><para><emphasis>
|
||||
The <filename>poky-extras</filename> Git Repository</emphasis>:
|
||||
@@ -175,14 +176,13 @@
|
||||
repository inside the Yocto Project files Git repository, which is named
|
||||
<filename>poky</filename> in this case:
|
||||
<literallayout class='monospaced'>
|
||||
$ cd ~/poky
|
||||
$ git clone git://git.yoctoproject.org/poky-extras poky-extras
|
||||
Initialized empty Git repository in /home/scottrif/poky/poky-extras/.git/
|
||||
remote: Counting objects: 561, done.
|
||||
remote: Compressing objects: 100% (501/501), done.
|
||||
remote: Total 561 (delta 159), reused 306 (delta 39)
|
||||
Receiving objects: 100% (561/561), 519.96 KiB | 479 KiB/s, done.
|
||||
Resolving deltas: 100% (159/159), done.
|
||||
remote: Counting objects: 618, done.
|
||||
remote: Compressing objects: 100% (558/558), done.
|
||||
remote: Total 618 (delta 192), reused 307 (delta 39)
|
||||
Receiving objects: 100% (618/618), 526.26 KiB | 111 KiB/s, done.
|
||||
Resolving deltas: 100% (192/192), done.
|
||||
</literallayout></para></listitem>
|
||||
<listitem><para id='supported-board-support-packages-(bsps)'><emphasis>Supported Board
|
||||
Support Packages (BSPs):</emphasis>
|
||||
@@ -231,14 +231,13 @@
|
||||
<filename>meta-intel</filename>
|
||||
Git repository inside the <filename>poky</filename> Git repository.
|
||||
<literallayout class='monospaced'>
|
||||
$ cd poky
|
||||
$ git clone git://git.yoctoproject.org/meta-intel.git
|
||||
Initialized empty Git repository in /home/scottrif/poky/meta-intel/.git/
|
||||
remote: Counting objects: 1325, done.
|
||||
remote: Compressing objects: 100% (1078/1078), done.
|
||||
remote: Total 1325 (delta 546), reused 85 (delta 27)
|
||||
Receiving objects: 100% (1325/1325), 1.56 MiB | 330 KiB/s, done.
|
||||
Resolving deltas: 100% (546/546), done.
|
||||
remote: Counting objects: 3380, done.
|
||||
remote: Compressing objects: 100% (2750/2750), done.
|
||||
remote: Total 3380 (delta 1689), reused 227 (delta 113)
|
||||
Receiving objects: 100% (3380/3380), 1.77 MiB | 128 KiB/s, done.
|
||||
Resolving deltas: 100% (1689/1689), done.
|
||||
</literallayout></para>
|
||||
<para>The same
|
||||
<ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>
|
||||
|
||||
@@ -36,8 +36,13 @@
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2</revnumber>
|
||||
<date>TBD 2012</date>
|
||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
||||
<date>April 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2.1</revnumber>
|
||||
<date>July 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
|
||||
BIN
documentation/dev-manual/figures/kernel-example-repos-denzil.png
Normal file
BIN
documentation/dev-manual/figures/kernel-example-repos-denzil.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
BIN
documentation/dev-manual/figures/kernel-overview-3-denzil.png
Normal file
BIN
documentation/dev-manual/figures/kernel-overview-3-denzil.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
@@ -51,8 +51,13 @@
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2</revnumber>
|
||||
<date>TBD 2012</date>
|
||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
||||
<date>April 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2.1</revnumber>
|
||||
<date>July 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -65,8 +65,13 @@
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2</revnumber>
|
||||
<date>TBD 2012</date>
|
||||
<revremark>Work in progress for the Yocto Project 1.2 Release.</revremark>
|
||||
<date>April 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2 Release.</revremark>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1.2.1</revnumber>
|
||||
<date>July 2012</date>
|
||||
<revremark>Released with the Yocto Project 1.2.1 Release.</revremark>
|
||||
</revision>
|
||||
</revhistory>
|
||||
|
||||
|
||||
@@ -106,6 +106,14 @@
|
||||
instead of X11.
|
||||
In order to build, this image requires specific distro configuration that enables
|
||||
<filename>gtk</filename> over <filename>directfb</filename>.</para></listitem>
|
||||
<listitem><para><emphasis><filename>self-hosted-image</filename>:</emphasis>
|
||||
An image you can run using the Yocto Project Build Appliance.
|
||||
The image is suitable to load and boot from either
|
||||
<ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
|
||||
or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMWare Workstation</ulink>.
|
||||
For more information on the Build Appliance, see the
|
||||
<ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
|
||||
the Yocto Project website.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<tip>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!ENTITY DISTRO "1.1">
|
||||
<!ENTITY DISTRO_NAME "edison">
|
||||
<!ENTITY YOCTO_DOC_VERSION "latest">
|
||||
<!ENTITY POKYVERSION "6.0">
|
||||
<!ENTITY DISTRO "1.2.1">
|
||||
<!ENTITY DISTRO_NAME "denzil">
|
||||
<!ENTITY YOCTO_DOC_VERSION "current">
|
||||
<!ENTITY POKYVERSION "7.0.1">
|
||||
<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
|
||||
<!ENTITY COPYRIGHT_YEAR "2010-2012">
|
||||
<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
|
||||
|
||||
@@ -21,15 +21,23 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If you know all about open-source development, Linux development environments, Git source
|
||||
repositories and the like and you just want some quick information that lets you try out
|
||||
the Yocto Project, skip right to the "<link linkend='super-user'>Super User</link>" section at
|
||||
the end of this quick start.
|
||||
Otherwise, keep reading...
|
||||
If you don't have a system that runs Linux and you want to give the Yocto Project a test run,
|
||||
you might consider using the Yocto Project Build Appliance.
|
||||
The Build Appliance allows you to build and boot a custom embedded Linux image with the Yocto
|
||||
Project using a non-Linux development system.
|
||||
See the <ulink url='http://www.yoctoproject.org/documentation/build-appliance'>Yocto
|
||||
Project Build Appliance</ulink> for more information.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This short document will give you some basic information about the environment and
|
||||
On the other hand, if you know all about open-source development, Linux development environments,
|
||||
Git source repositories and the like and you just want some quick information that lets you try out
|
||||
the Yocto Project on your Linux system, skip right to the
|
||||
"<link linkend='super-user'>Super User</link>" section at the end of this quick start.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
For the rest of you, this short document will give you some basic information about the environment and
|
||||
let you experience it in its simplest form.
|
||||
After reading this document, you will have a basic understanding of what the Yocto Project is
|
||||
and how to use some of its core components.
|
||||
@@ -209,7 +217,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'>
|
||||
@@ -220,11 +228,11 @@
|
||||
</para>
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo apt-get install sed wget cvs subversion git-core coreutils \
|
||||
$ sudo apt-get install sed wget subversion git-core coreutils \
|
||||
unzip texi2html texinfo libsdl1.2-dev docbook-utils fop gawk \
|
||||
python-pysqlite2 diffstat help2man make gcc build-essential xsltproc \
|
||||
python-pysqlite2 diffstat make gcc build-essential xsltproc \
|
||||
g++ desktop-file-utils chrpath libgl1-mesa-dev libglu1-mesa-dev \
|
||||
mercurial autoconf automake groff libtool xterm libxml-parser-perl
|
||||
autoconf automake groff libtool xterm libxml-parser-perl
|
||||
</literallayout>
|
||||
</section>
|
||||
|
||||
@@ -238,23 +246,16 @@
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo yum groupinstall "development tools"
|
||||
$ sudo yum install python m4 make wget curl ftp hg tar bzip2 gzip \
|
||||
unzip python-psyco perl texinfo texi2html diffstat openjade \
|
||||
$ sudo yum install python m4 make wget curl ftp tar bzip2 gzip \
|
||||
unzip perl texinfo texi2html diffstat openjade \
|
||||
docbook-style-dsssl sed docbook-style-xsl docbook-dtds fop xsltproc \
|
||||
docbook-utils sed bc eglibc-devel ccache pcre pcre-devel quilt \
|
||||
groff linuxdoc-tools patch linuxdoc-tools cmake help2man \
|
||||
groff linuxdoc-tools patch cmake \
|
||||
perl-ExtUtils-MakeMaker tcl-devel gettext chrpath ncurses apr \
|
||||
SDL-devel mesa-libGL-devel mesa-libGLU-devel gnome-doc-utils \
|
||||
autoconf automake libtool xterm
|
||||
</literallayout>
|
||||
|
||||
<note><para>
|
||||
If you are using a Fedora version prior to version 15, you will need to take some
|
||||
extra steps to enable <filename>sudo</filename>, or you will need to run
|
||||
the commands as root user.
|
||||
See the <ulink url='https://fedoraproject.org/wiki/Configuring_Sudo'>Configuring Sudo</ulink>
|
||||
wiki page for details.
|
||||
</para></note>
|
||||
</section>
|
||||
|
||||
<section id='opensuse'>
|
||||
@@ -267,10 +268,40 @@
|
||||
|
||||
<literallayout class='monospaced'>
|
||||
$ sudo zypper install python gcc gcc-c++ libtool fop \
|
||||
subversion git chrpath automake make wget help2man xsltproc \
|
||||
diffstat texinfo mercurial freeglut-devel libSDL-devel
|
||||
subversion git chrpath automake make wget xsltproc \
|
||||
diffstat texinfo 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 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'>
|
||||
@@ -294,9 +325,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>
|
||||
@@ -305,7 +334,7 @@
|
||||
<title>A Quick Test Run</title>
|
||||
|
||||
<para>
|
||||
Now that you have your system requirements in order, you can give Yocto Project a try.
|
||||
Now that you have your system requirements in order, you can give the Yocto Project a try.
|
||||
This section presents some steps that let you do the following:
|
||||
</para>
|
||||
|
||||
@@ -351,9 +380,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>
|
||||
|
||||
@@ -361,18 +390,18 @@
|
||||
<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'>
|
||||
INHERIT += rm_work
|
||||
INHERIT += "rm_work"
|
||||
</literallayout>
|
||||
</para></tip>
|
||||
|
||||
@@ -381,16 +410,16 @@
|
||||
release tarball from the source repositories using the
|
||||
<filename>wget</filename> command.
|
||||
Alternatively, you can go to the
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Yocto Project website</ulink>
|
||||
Downloads page to retrieve the tarball.</para></listitem>
|
||||
<ulink url='&YOCTO_HOME_URL;/download'>Yocto Project website's Downloads page</ulink>
|
||||
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
|
||||
@@ -430,9 +459,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>
|
||||
@@ -441,15 +469,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'>
|
||||
@@ -550,9 +578,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>
|
||||
|
||||
@@ -583,8 +610,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>
|
||||
|
||||
@@ -604,7 +630,7 @@
|
||||
You must use the <filename>ext3</filename> form when booting an image using the
|
||||
QEMU emulator.
|
||||
The <filename>tar</filename> form can be flattened out in your host development system
|
||||
and used for Yocto Project build purposes.
|
||||
and used for build purposes with the Yocto Project.
|
||||
<literallayout class='monospaced'>
|
||||
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.ext3
|
||||
core-image-<<emphasis>profile</emphasis>>-qemu<<emphasis>arch</emphasis>>.tar.bz2
|
||||
@@ -658,11 +684,13 @@
|
||||
<para>
|
||||
Continuing with the example, the following two commands setup the emulation
|
||||
environment and launch QEMU.
|
||||
This example assumes the root filesystem tarball has been downloaded and expanded, and
|
||||
that the kernel and filesystem are for a 32-bit target architecture.
|
||||
This example assumes the root filesystem (<filename>.ext3</filename> file) and
|
||||
the pre-built kernel image file both reside in your home directory.
|
||||
The kernel and filesystem are for a 32-bit target architecture.
|
||||
<literallayout class='monospaced'>
|
||||
$ source &YOCTO_ADTPATH_DIR;/environment-setup-i686-poky-linux
|
||||
$ runqemu qemux86 bzImage-qemux86-&DISTRO;.bin \
|
||||
$ cd $HOME
|
||||
$ source &YOCTO_ADTPATH_DIR;/environment-setup-i586-poky-linux
|
||||
$ runqemu qemux86 bzImage-qemux86.bin \
|
||||
core-image-sato-qemux86.ext3
|
||||
</literallayout>
|
||||
</para>
|
||||
@@ -711,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>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -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"
|
||||
@@ -63,12 +63,7 @@ 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"
|
||||
# for gettext
|
||||
DISTRO_FEATURES_LIBC_TINY += "libc-posix-clang-wchar"
|
||||
# for m4
|
||||
DISTRO_FEATURES_LIBC_TINY += "libc-spawn libc-locale-code"
|
||||
# for elfutils
|
||||
DISTRO_FEATURES_LIBC_TINY += "libc-ftraverse"
|
||||
|
||||
# Required for "who"
|
||||
DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
|
||||
DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
|
||||
@@ -119,3 +114,8 @@ IMAGE_FSTYPES = "ext2 cpio.gz"
|
||||
# variants of all compatible machines, but that leads to a lot
|
||||
# more machine configs to maintain long term.
|
||||
MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
|
||||
|
||||
# The mtrace script included by eglibc is a perl script. This means the system
|
||||
# will build perl in case this package is installed. Since we don't care about
|
||||
# this script for the purposes of tiny, remove the dependency from here.
|
||||
RDEPENDS_${PN}-mtrace_pn-eglibc = ""
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
DISTRO = "poky"
|
||||
DISTRO_NAME = "Yocto (Built by Poky 6.0)"
|
||||
DISTRO_VERSION = "1.1+snapshot-${DATE}"
|
||||
DISTRO_NAME = "Yocto (Built by Poky 7.0.1)"
|
||||
DISTRO_VERSION = "1.2.1"
|
||||
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 LTS \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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1 +1 @@
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
|
||||
|
||||
@@ -4,10 +4,10 @@ KMACHINE_mpc8315e-rdb = "yocto/standard/fsl-mpc8315e-rdb"
|
||||
KMACHINE_beagleboard = "yocto/standard/beagleboard"
|
||||
|
||||
|
||||
SRCREV_machine_atom-pc ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
SRCREV_machine_routerstationpro ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
SRCREV_machine_mpc8315e-rdb ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
SRCREV_machine_beagleboard ?= "12b4af6966843baf7bb3aedbae93e69ae19405b0"
|
||||
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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -402,7 +402,7 @@ buildhistory_commit() {
|
||||
git add ${BUILDHISTORY_DIR}/*
|
||||
HOSTNAME=`hostname 2>/dev/null || echo unknown`
|
||||
# porcelain output looks like "?? packages/foo/bar"
|
||||
for entry in `echo $repostatus | awk '{print $2}' | awk -F/ '{print $1}' | sort | uniq` ; do
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
DEPENDS += "gconf gconf-native"
|
||||
|
||||
# This is referenced by the gconf m4 macros and would default to the value hardcoded
|
||||
# into gconf at compile time otherwise
|
||||
# These are for when gconftool is used natively and the prefix isn't necessarily
|
||||
# the sysroot. TODO: replicate the postinst logic for -native packages going
|
||||
# into sysroot as they won't be running their own install-time schema
|
||||
# registration (disabled below) nor the postinst script (as they don't happen).
|
||||
export GCONF_SCHEMA_INSTALL_SOURCE = "xml:merged:${STAGING_DIR_NATIVE}${sysconfdir}/gconf/gconf.xml.defaults"
|
||||
export GCONF_BACKEND_DIR = "${STAGING_LIBDIR_NATIVE}/GConf/2"
|
||||
|
||||
# Disable install-time schema registration as we're a packaging system so this
|
||||
# happens in the postinst script, not at install time. Set both the configure
|
||||
# script option and the traditional envionment variable just to make sure.
|
||||
EXTRA_OECONF += "--disable-schemas-install"
|
||||
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL = "1"
|
||||
|
||||
gconf_postinst() {
|
||||
if [ "x$D" != "x" ]; then
|
||||
exit 1
|
||||
@@ -57,7 +65,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)
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ def gettext_oeconf(d):
|
||||
return '--disable-nls'
|
||||
return "--enable-nls"
|
||||
|
||||
DEPENDS_GETTEXT = "virtual/gettext gettext-native"
|
||||
DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
|
||||
|
||||
BASEDEPENDS =+ "${@gettext_dependencies(d)}"
|
||||
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
|
||||
|
||||
@@ -131,6 +131,7 @@ PSEUDO_PASSWD = "${IMAGE_ROOTFS}"
|
||||
do_rootfs[nostamp] = "1"
|
||||
do_rootfs[dirs] = "${TOPDIR}"
|
||||
do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
|
||||
do_rootfs[cleandirs] += "${S}"
|
||||
do_build[nostamp] = "1"
|
||||
|
||||
# Must call real_do_rootfs() from inside here, rather than as a separate
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -276,9 +276,7 @@ fi
|
||||
}
|
||||
|
||||
pkg_postinst_modules () {
|
||||
if [ -n "$D" ]; then
|
||||
${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_VERSION} ${KERNEL_VERSION}
|
||||
else
|
||||
if [ -z "$D" ]; then
|
||||
depmod -a
|
||||
update-modules || true
|
||||
fi
|
||||
|
||||
@@ -257,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 = {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
MIRRORS += "\
|
||||
${DEBIAN_MIRROR}/main http://snapshot.debian.net/archive/pool \n \
|
||||
${DEBIAN_MIRROR}/main http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool/ \n \
|
||||
${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool \n \
|
||||
${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool \n \
|
||||
${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool \n \
|
||||
|
||||
@@ -37,15 +37,14 @@ module_do_install() {
|
||||
}
|
||||
|
||||
pkg_postinst_append () {
|
||||
if [ -n "$D" ]; then
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$D" ]; then
|
||||
depmod -a
|
||||
update-modules || true
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm_append () {
|
||||
update-modules || true
|
||||
update-modules || true
|
||||
}
|
||||
|
||||
EXPORT_FUNCTIONS do_compile do_install
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -870,6 +870,14 @@ python split_and_strip_files () {
|
||||
elf_file = int(file_list[file][5:])
|
||||
#bb.note("Strip %s" % file)
|
||||
runstrip(file, elf_file, d)
|
||||
|
||||
|
||||
if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
|
||||
for root, dirs, files in os.walk(dvar):
|
||||
for f in files:
|
||||
if not f.endswith(".ko"):
|
||||
continue
|
||||
runstrip(os.path.join(root, f), None, d)
|
||||
#
|
||||
# End of strip
|
||||
#
|
||||
|
||||
@@ -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" $@
|
||||
@@ -486,8 +487,7 @@ EOF
|
||||
|
||||
${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}-base_archs.macro`" \
|
||||
-D "`cat ${confbase}-ml_archs.macro`" \
|
||||
-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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2006 OpenedHand LTD
|
||||
|
||||
# Point to an empty file so any user's custom settings don't break things
|
||||
QUILTRCFILE ?= "${STAGING_BINDIR_NATIVE}/quiltrc"
|
||||
QUILTRCFILE ?= "${STAGING_ETCDIR_NATIVE}/quiltrc"
|
||||
|
||||
PATCHDEPENDENCY = "${PATCHTOOL}-native:do_populate_sysroot"
|
||||
|
||||
|
||||
@@ -4,7 +4,16 @@
|
||||
|
||||
SANITY_REQUIRED_UTILITIES ?= "patch diffstat texi2html makeinfo svn bzip2 tar gzip gawk chrpath wget cpio"
|
||||
|
||||
def raise_sanity_error(msg):
|
||||
def raise_sanity_error(msg, d):
|
||||
if d.getVar("SANITY_USE_EVENTS", True) == "1":
|
||||
# FIXME: handle when BitBake version is too old to support bb.event.SanityCheckFailed
|
||||
# We can just fire the event directly once the minimum version is bumped beyond 1.15.1
|
||||
try:
|
||||
bb.event.fire(bb.event.SanityCheckFailed(msg), d)
|
||||
return
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
bb.fatal(""" OE-core's config sanity checker detected a potential misconfiguration.
|
||||
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
|
||||
Following is the list of potential problems / advisories:
|
||||
@@ -112,18 +121,19 @@ def check_connectivity(d):
|
||||
|
||||
return retval
|
||||
|
||||
def check_supported_distro(e):
|
||||
tested_distros = e.data.getVar('SANITY_TESTED_DISTROS', True)
|
||||
def check_supported_distro(sanity_data):
|
||||
tested_distros = sanity_data.getVar('SANITY_TESTED_DISTROS', True)
|
||||
if not tested_distros:
|
||||
return
|
||||
|
||||
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()
|
||||
@@ -159,26 +169,26 @@ def check_supported_distro(e):
|
||||
bb.warn('Host distribution could not be determined; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.')
|
||||
|
||||
# Checks we should only make if MACHINE is set correctly
|
||||
def check_sanity_validmachine(e):
|
||||
def check_sanity_validmachine(sanity_data):
|
||||
from bb import data
|
||||
|
||||
messages = ""
|
||||
|
||||
# Check TUNE_ARCH is set
|
||||
if data.getVar('TUNE_ARCH', e.data, True) == 'INVALID':
|
||||
if data.getVar('TUNE_ARCH', sanity_data, True) == 'INVALID':
|
||||
messages = messages + 'TUNE_ARCH is unset. Please ensure your MACHINE configuration includes a valid tune configuration file which will set this correctly.\n'
|
||||
|
||||
# Check TARGET_ARCH is set correctly
|
||||
if data.getVar('TARGE_ARCH', e.data, False) == '${TUNE_ARCH}':
|
||||
if data.getVar('TARGE_ARCH', sanity_data, False) == '${TUNE_ARCH}':
|
||||
messages = messages + 'TARGET_ARCH is being overwritten, likely by your MACHINE configuration files.\nPlease use a valid tune configuration file which should set this correctly automatically\nand avoid setting this in the machine configuration. See the OE-Core mailing list for more information.\n'
|
||||
|
||||
# Check TARGET_OS is set
|
||||
if data.getVar('TARGET_OS', e.data, True) == 'INVALID':
|
||||
if data.getVar('TARGET_OS', sanity_data, True) == 'INVALID':
|
||||
messages = messages + 'Please set TARGET_OS directly, or choose a MACHINE or DISTRO that does so.\n'
|
||||
|
||||
# Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
|
||||
pkgarchs = data.getVar('PACKAGE_ARCHS', e.data, True)
|
||||
tunepkg = data.getVar('TUNE_PKGARCH', e.data, True)
|
||||
pkgarchs = data.getVar('PACKAGE_ARCHS', sanity_data, True)
|
||||
tunepkg = data.getVar('TUNE_PKGARCH', sanity_data, True)
|
||||
tunefound = False
|
||||
seen = {}
|
||||
dups = []
|
||||
@@ -200,7 +210,7 @@ def check_sanity_validmachine(e):
|
||||
return messages
|
||||
|
||||
|
||||
def check_sanity(e):
|
||||
def check_sanity(sanity_data):
|
||||
from bb import note, error, data, __version__
|
||||
|
||||
try:
|
||||
@@ -210,7 +220,7 @@ def check_sanity(e):
|
||||
import commands
|
||||
|
||||
# Check the bitbake version meets minimum requirements
|
||||
minversion = data.getVar('BB_MIN_VERSION', e.data , True)
|
||||
minversion = data.getVar('BB_MIN_VERSION', sanity_data , True)
|
||||
if not minversion:
|
||||
# Hack: BB_MIN_VERSION hasn't been parsed yet so return
|
||||
# and wait for the next call
|
||||
@@ -218,7 +228,7 @@ def check_sanity(e):
|
||||
return
|
||||
|
||||
if 0 == os.getuid():
|
||||
raise_sanity_error("Do not use Bitbake as root.")
|
||||
raise_sanity_error("Do not use Bitbake as root.", sanity_data)
|
||||
|
||||
messages = ""
|
||||
|
||||
@@ -232,42 +242,42 @@ def check_sanity(e):
|
||||
messages = messages + 'Bitbake version %s is required and version %s was found\n' % (minversion, __version__)
|
||||
|
||||
# Check that the MACHINE is valid, if it is set
|
||||
if data.getVar('MACHINE', e.data, True):
|
||||
if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
|
||||
if data.getVar('MACHINE', sanity_data, True):
|
||||
if not check_conf_exists("conf/machine/${MACHINE}.conf", sanity_data):
|
||||
messages = messages + 'Please set a valid MACHINE in your local.conf or environment\n'
|
||||
else:
|
||||
messages = messages + check_sanity_validmachine(e)
|
||||
messages = messages + check_sanity_validmachine(sanity_data)
|
||||
else:
|
||||
messages = messages + 'Please set a MACHINE in your local.conf or environment\n'
|
||||
|
||||
# Check we are using a valid lacal.conf
|
||||
current_conf = data.getVar('CONF_VERSION', e.data, True)
|
||||
conf_version = data.getVar('LOCALCONF_VERSION', e.data, True)
|
||||
current_conf = data.getVar('CONF_VERSION', sanity_data, True)
|
||||
conf_version = data.getVar('LOCALCONF_VERSION', sanity_data, True)
|
||||
|
||||
if current_conf != conf_version:
|
||||
messages = messages + "Your version of local.conf was generated from an older version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf conf/local.conf.sample\" is a good way to visualise the changes.\n"
|
||||
|
||||
# Check bblayers.conf is valid
|
||||
current_lconf = data.getVar('LCONF_VERSION', e.data, True)
|
||||
lconf_version = data.getVar('LAYER_CONF_VERSION', e.data, True)
|
||||
current_lconf = data.getVar('LCONF_VERSION', sanity_data, True)
|
||||
lconf_version = data.getVar('LAYER_CONF_VERSION', sanity_data, True)
|
||||
if current_lconf != lconf_version:
|
||||
messages = messages + "Your version of bblayers.conf was generated from an older version of bblayers.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/bblayers.conf conf/bblayers.conf.sample\" is a good way to visualise the changes.\n"
|
||||
|
||||
# If we have a site.conf, check it's valid
|
||||
if check_conf_exists("conf/site.conf", e.data):
|
||||
current_sconf = data.getVar('SCONF_VERSION', e.data, True)
|
||||
sconf_version = data.getVar('SITE_CONF_VERSION', e.data, True)
|
||||
if check_conf_exists("conf/site.conf", sanity_data):
|
||||
current_sconf = data.getVar('SCONF_VERSION', sanity_data, True)
|
||||
sconf_version = data.getVar('SITE_CONF_VERSION', sanity_data, True)
|
||||
if current_sconf != sconf_version:
|
||||
messages = messages + "Your version of site.conf was generated from an older version of site.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/site.conf conf/site.conf.sample\" is a good way to visualise the changes.\n"
|
||||
|
||||
assume_provided = data.getVar('ASSUME_PROVIDED', e.data , True).split()
|
||||
assume_provided = data.getVar('ASSUME_PROVIDED', sanity_data , True).split()
|
||||
# Check user doesn't have ASSUME_PROVIDED = instead of += in local.conf
|
||||
if "diffstat-native" not in assume_provided:
|
||||
messages = messages + 'Please use ASSUME_PROVIDED +=, not ASSUME_PROVIDED = in your local.conf\n'
|
||||
|
||||
# Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't
|
||||
# set, since so much relies on it being set.
|
||||
dldir = data.getVar('DL_DIR', e.data, True)
|
||||
dldir = data.getVar('DL_DIR', sanity_data, True)
|
||||
if not dldir:
|
||||
messages = messages + "DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n"
|
||||
if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
|
||||
@@ -275,32 +285,32 @@ def check_sanity(e):
|
||||
|
||||
# Check that the DISTRO is valid, if set
|
||||
# need to take into account DISTRO renaming DISTRO
|
||||
distro = data.getVar('DISTRO', e.data, True)
|
||||
distro = data.getVar('DISTRO', sanity_data, True)
|
||||
if distro:
|
||||
if not ( check_conf_exists("conf/distro/${DISTRO}.conf", e.data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", e.data) ):
|
||||
messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", e.data, True )
|
||||
if not ( check_conf_exists("conf/distro/${DISTRO}.conf", sanity_data) or check_conf_exists("conf/distro/include/${DISTRO}.inc", sanity_data) ):
|
||||
messages = messages + "DISTRO '%s' not found. Please set a valid DISTRO in your local.conf\n" % data.getVar("DISTRO", sanity_data, True )
|
||||
|
||||
missing = ""
|
||||
|
||||
if not check_app_exists("${MAKE}", e.data):
|
||||
if not check_app_exists("${MAKE}", sanity_data):
|
||||
missing = missing + "GNU make,"
|
||||
|
||||
if not check_app_exists('${BUILD_PREFIX}gcc', e.data):
|
||||
missing = missing + "C Compiler (%sgcc)," % data.getVar("BUILD_PREFIX", e.data, True)
|
||||
if not check_app_exists('${BUILD_PREFIX}gcc', sanity_data):
|
||||
missing = missing + "C Compiler (%sgcc)," % data.getVar("BUILD_PREFIX", sanity_data, True)
|
||||
|
||||
if not check_app_exists('${BUILD_PREFIX}g++', e.data):
|
||||
missing = missing + "C++ Compiler (%sg++)," % data.getVar("BUILD_PREFIX", e.data, True)
|
||||
if not check_app_exists('${BUILD_PREFIX}g++', sanity_data):
|
||||
missing = missing + "C++ Compiler (%sg++)," % data.getVar("BUILD_PREFIX", sanity_data, True)
|
||||
|
||||
required_utilities = e.data.getVar('SANITY_REQUIRED_UTILITIES', True)
|
||||
required_utilities = sanity_data.getVar('SANITY_REQUIRED_UTILITIES', True)
|
||||
|
||||
if "qemu-native" in assume_provided:
|
||||
if not check_app_exists("qemu-arm", e.data):
|
||||
if not check_app_exists("qemu-arm", sanity_data):
|
||||
messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
|
||||
|
||||
if "." in data.getVar('PATH', e.data, True).split(":"):
|
||||
if "." in data.getVar('PATH', sanity_data, True).split(":"):
|
||||
messages = messages + "PATH contains '.' which will break the build, please remove this"
|
||||
|
||||
if data.getVar('TARGET_ARCH', e.data, True) == "arm":
|
||||
if data.getVar('TARGET_ARCH', sanity_data, True) == "arm":
|
||||
# This path is no longer user-readable in modern (very recent) Linux
|
||||
try:
|
||||
if os.path.exists("/proc/sys/vm/mmap_min_addr"):
|
||||
@@ -314,7 +324,7 @@ def check_sanity(e):
|
||||
pass
|
||||
|
||||
for util in required_utilities.split():
|
||||
if not check_app_exists( util, e.data ):
|
||||
if not check_app_exists( util, sanity_data ):
|
||||
missing = missing + "%s," % util
|
||||
|
||||
if missing != "":
|
||||
@@ -325,10 +335,10 @@ def check_sanity(e):
|
||||
if pseudo_msg != "":
|
||||
messages = messages + pseudo_msg + '\n'
|
||||
|
||||
check_supported_distro(e)
|
||||
check_supported_distro(sanity_data)
|
||||
|
||||
# Check if DISPLAY is set if IMAGETEST is set
|
||||
if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu':
|
||||
if not data.getVar( 'DISPLAY', sanity_data, True ) and data.getVar( 'IMAGETEST', sanity_data, True ) == 'qemu':
|
||||
messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
|
||||
|
||||
omask = os.umask(022)
|
||||
@@ -336,11 +346,11 @@ def check_sanity(e):
|
||||
messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
|
||||
os.umask(omask)
|
||||
|
||||
oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True )
|
||||
oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', sanity_data, True )
|
||||
if not oes_bb_conf:
|
||||
messages = messages + 'You do not include OpenEmbeddeds version of conf/bitbake.conf. This means your environment is misconfigured, in particular check BBPATH.\n'
|
||||
|
||||
nolibs = data.getVar('NO32LIBS', e.data, True)
|
||||
nolibs = data.getVar('NO32LIBS', sanity_data, True)
|
||||
if not nolibs:
|
||||
lib32path = '/lib'
|
||||
if os.path.exists('/lib64') and ( os.path.islink('/lib64') or os.path.islink('/lib') ):
|
||||
@@ -349,8 +359,8 @@ def check_sanity(e):
|
||||
if os.path.exists('%s/libc.so.6' % lib32path) and not os.path.exists('/usr/include/gnu/stubs-32.h'):
|
||||
messages = messages + "You have a 32-bit libc, but no 32-bit headers. You must install the 32-bit libc headers.\n"
|
||||
|
||||
tmpdir = data.getVar('TMPDIR', e.data, True)
|
||||
sstate_dir = data.getVar('SSTATE_DIR', e.data, True)
|
||||
tmpdir = data.getVar('TMPDIR', sanity_data, True)
|
||||
sstate_dir = data.getVar('SSTATE_DIR', sanity_data, True)
|
||||
|
||||
# Check saved sanity info
|
||||
last_sanity_version = 0
|
||||
@@ -367,18 +377,18 @@ def check_sanity(e):
|
||||
if line.startswith('SSTATE_DIR'):
|
||||
last_sstate_dir = line.split()[1]
|
||||
|
||||
sanity_version = int(data.getVar('SANITY_VERSION', e.data, True) or 1)
|
||||
sanity_version = int(data.getVar('SANITY_VERSION', sanity_data, True) or 1)
|
||||
if last_sanity_version < sanity_version:
|
||||
messages = messages + check_sanity_version_change(e.data)
|
||||
messages = messages + check_sanity_tmpdir_change(tmpdir, e.data)
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
|
||||
messages = messages + check_sanity_version_change(sanity_data)
|
||||
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_data)
|
||||
else:
|
||||
if last_tmpdir != tmpdir:
|
||||
messages = messages + check_sanity_tmpdir_change(tmpdir, e.data)
|
||||
messages = messages + check_sanity_tmpdir_change(tmpdir, sanity_data)
|
||||
if last_sstate_dir != sstate_dir:
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, e.data)
|
||||
messages = messages + check_sanity_sstate_dir_change(sstate_dir, sanity_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)
|
||||
@@ -401,8 +411,8 @@ def check_sanity(e):
|
||||
#
|
||||
# Check the 'ABI' of TMPDIR
|
||||
#
|
||||
current_abi = data.getVar('OELAYOUT_ABI', e.data, True)
|
||||
abifile = data.getVar('SANITY_ABIFILE', e.data, True)
|
||||
current_abi = data.getVar('OELAYOUT_ABI', sanity_data, True)
|
||||
abifile = data.getVar('SANITY_ABIFILE', sanity_data, True)
|
||||
if os.path.exists(abifile):
|
||||
f = file(abifile, "r")
|
||||
abi = f.read().strip()
|
||||
@@ -411,16 +421,16 @@ def check_sanity(e):
|
||||
f.write(current_abi)
|
||||
elif abi == "2" and current_abi == "3":
|
||||
bb.note("Converting staging from layout version 2 to layout version 3")
|
||||
os.system(e.data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots"))
|
||||
os.system(e.data.expand("ln -s sysroots ${TMPDIR}/staging"))
|
||||
os.system(e.data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"))
|
||||
os.system(sanity_data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots"))
|
||||
os.system(sanity_data.expand("ln -s sysroots ${TMPDIR}/staging"))
|
||||
os.system(sanity_data.expand("cd ${TMPDIR}/stamps; for i in */*do_populate_staging; do new=`echo $i | sed -e 's/do_populate_staging/do_populate_sysroot/'`; mv $i $new; done"))
|
||||
f = file(abifile, "w")
|
||||
f.write(current_abi)
|
||||
elif abi == "3" and current_abi == "4":
|
||||
bb.note("Converting staging layout from version 3 to layout version 4")
|
||||
if os.path.exists(e.data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}")):
|
||||
os.system(e.data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}"))
|
||||
os.system(e.data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"))
|
||||
if os.path.exists(sanity_data.expand("${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}")):
|
||||
os.system(sanity_data.expand("mv ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS} ${STAGING_BINDIR_CROSS}"))
|
||||
os.system(sanity_data.expand("ln -s ${STAGING_BINDIR_CROSS} ${STAGING_DIR_NATIVE}${bindir_native}/${MULTIMACH_HOST_SYS}"))
|
||||
|
||||
f = file(abifile, "w")
|
||||
f.write(current_abi)
|
||||
@@ -428,7 +438,7 @@ def check_sanity(e):
|
||||
messages = messages + "Staging layout has changed. The cross directory has been deprecated and cross packages are now built under the native sysroot.\nThis requires a rebuild.\n"
|
||||
elif abi == "5" and current_abi == "6":
|
||||
bb.note("Converting staging layout from version 5 to layout version 6")
|
||||
os.system(e.data.expand("mv ${TMPDIR}/pstagelogs ${SSTATE_MANIFESTS}"))
|
||||
os.system(sanity_data.expand("mv ${TMPDIR}/pstagelogs ${SSTATE_MANIFESTS}"))
|
||||
f = file(abifile, "w")
|
||||
f.write(current_abi)
|
||||
elif abi == "7" and current_abi == "8":
|
||||
@@ -441,19 +451,32 @@ def check_sanity(e):
|
||||
f.write(current_abi)
|
||||
f.close()
|
||||
|
||||
oeroot = data.getVar('COREBASE', e.data)
|
||||
oeroot = data.getVar('COREBASE', sanity_data)
|
||||
if oeroot.find ('+') != -1:
|
||||
messages = messages + "Error, you have an invalid character (+) in your COREBASE directory path. Please move the installation to a directory which doesn't include a +."
|
||||
elif oeroot.find (' ') != -1:
|
||||
messages = messages + "Error, you have a space in your COREBASE directory path. Please move the installation to a directory which doesn't include a space."
|
||||
|
||||
if messages != "":
|
||||
raise_sanity_error(messages)
|
||||
raise_sanity_error(messages, sanity_data)
|
||||
|
||||
# Create a copy of the datastore and finalise it to ensure appends and
|
||||
# overrides are set - the datastore has yet to be finalised at ConfigParsed
|
||||
def copy_data(e):
|
||||
sanity_data = bb.data.createCopy(e.data)
|
||||
sanity_data.finalize()
|
||||
return sanity_data
|
||||
|
||||
addhandler check_sanity_eventhandler
|
||||
python check_sanity_eventhandler() {
|
||||
if bb.event.getName(e) == "ConfigParsed" and e.data.getVar("BB_WORKERCONTEXT", True) != "1":
|
||||
check_sanity(e)
|
||||
if bb.event.getName(e) == "ConfigParsed" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1":
|
||||
sanity_data = copy_data(e)
|
||||
check_sanity(sanity_data)
|
||||
elif bb.event.getName(e) == "SanityCheck":
|
||||
sanity_data = copy_data(e)
|
||||
sanity_data.setVar("SANITY_USE_EVENTS", "1")
|
||||
check_sanity(sanity_data)
|
||||
bb.event.fire(bb.event.SanityCheckPassed(), e.data)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -282,7 +282,6 @@ create_cmdline_wrapper () {
|
||||
cmd=$1
|
||||
shift
|
||||
|
||||
# run echo via env to test syntactic validity of the variable arguments
|
||||
echo "Generating wrapper script for $cmd"
|
||||
|
||||
mv $cmd $cmd.real
|
||||
@@ -306,8 +305,7 @@ create_wrapper () {
|
||||
cmd=$1
|
||||
shift
|
||||
|
||||
# run echo via env to test syntactic validity of the variable arguments
|
||||
env $@ echo "Generating wrapper script for $cmd"
|
||||
echo "Generating wrapper script for $cmd"
|
||||
|
||||
mv $cmd $cmd.real
|
||||
cmdname=`basename $cmd`.real
|
||||
|
||||
@@ -340,6 +340,7 @@ STAGING_DATADIR_NATIVE = "${STAGING_DIR_NATIVE}${datadir_native}"
|
||||
STAGING_DIR_HOST = "${STAGING_DIR}/${MACHINE}"
|
||||
STAGING_BINDIR = "${STAGING_DIR_HOST}${bindir}"
|
||||
STAGING_LIBDIR = "${STAGING_DIR_HOST}${libdir}"
|
||||
STAGING_BASELIBDIR = "${STAGING_DIR_HOST}${base_libdir}"
|
||||
STAGING_INCDIR = "${STAGING_DIR_HOST}${includedir}"
|
||||
STAGING_DATADIR = "${STAGING_DIR_HOST}${datadir}"
|
||||
STAGING_EXECPREFIXDIR = "${STAGING_DIR_HOST}${exec_prefix}"
|
||||
@@ -558,17 +559,17 @@ XORG_MIRROR = "http://xorg.freedesktop.org/releases"
|
||||
|
||||
FETCHCMD_svn = "/usr/bin/env svn"
|
||||
FETCHCMD_cvs = "/usr/bin/env cvs"
|
||||
FETCHCMD_wget = "/usr/bin/env wget -t 5 -nv --no-check-certificate"
|
||||
FETCHCMD_wget = "/usr/bin/env wget -t 2 -T 30 -nv --no-check-certificate"
|
||||
FETCHCMD_bzr = "/usr/bin/env bzr"
|
||||
FETCHCMD_hg = "/usr/bin/env hg"
|
||||
|
||||
FETCHCOMMAND = "ERROR, this must be a BitBake bug"
|
||||
FETCHCOMMAND_wget = "/usr/bin/env wget -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
|
||||
FETCHCOMMAND_wget = "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
|
||||
FETCHCOMMAND_cvs = "/usr/bin/env cvs '-d${CVSROOT}' co ${CVSCOOPTS} ${CVSMODULE}"
|
||||
FETCHCOMMAND_svn = "/usr/bin/env svn co ${SVNCOOPTS} ${SVNROOT} ${SVNMODULE}"
|
||||
CHECKCOMMAND_wget = "/usr/bin/env wget --spider -t 5 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
|
||||
CHECKCOMMAND_wget = "/usr/bin/env wget --spider -t 2 -T 30 --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
|
||||
RESUMECOMMAND = "ERROR, this must be a BitBake bug"
|
||||
RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 5 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
|
||||
RESUMECOMMAND_wget = "/usr/bin/env wget -c -t 2 -T 30 -nv --passive-ftp --no-check-certificate -P ${DL_DIR} '${URI}'"
|
||||
UPDATECOMMAND = "ERROR, this must be a BitBake bug"
|
||||
UPDATECOMMAND_cvs = "/usr/bin/env cvs -d${CVSROOT} update -d -P ${CVSCOOPTS}"
|
||||
UPDATECOMMAND_svn = "/usr/bin/env svn update ${SVNCOOPTS}"
|
||||
@@ -648,6 +649,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
|
||||
@@ -659,7 +661,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)
|
||||
@@ -737,7 +738,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"
|
||||
@@ -1726,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
|
||||
@@ -2006,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"
|
||||
@@ -2057,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"
|
||||
@@ -2791,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"
|
||||
@@ -3043,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"
|
||||
@@ -3687,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"
|
||||
@@ -3816,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"
|
||||
@@ -3827,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"
|
||||
@@ -3837,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"
|
||||
@@ -4632,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"
|
||||
@@ -4855,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"
|
||||
@@ -5421,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"
|
||||
@@ -5492,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"
|
||||
@@ -5793,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"
|
||||
@@ -5817,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"
|
||||
@@ -5827,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"
|
||||
@@ -5865,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"
|
||||
@@ -6049,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"
|
||||
@@ -6359,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"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
|
||||
This patch avoids this configure failure
|
||||
|
||||
configure:20306: checking whether `ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow' generates calls to `__enable_execute_stack()'
|
||||
configure:20320: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387 -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -falign-loops=1 -S conftest.c
|
||||
conftest.c:308:6: error: no previous prototype for 'g' [-Werror=missing-prototypes]
|
||||
cc1: all warnings being treated as errors
|
||||
configure:20323: $? = 1
|
||||
configure:20327: error: ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/builddisk/build/build0/tmp/sysroots/emenlow failed to produce assembly code
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
|
||||
Index: grub-1.99/acinclude.m4
|
||||
===================================================================
|
||||
--- grub-1.99.orig/acinclude.m4
|
||||
+++ grub-1.99/acinclude.m4
|
||||
@@ -317,6 +317,7 @@ dnl Check if the C compiler generates ca
|
||||
AC_DEFUN([grub_CHECK_ENABLE_EXECUTE_STACK],[
|
||||
AC_MSG_CHECKING([whether `$CC' generates calls to `__enable_execute_stack()'])
|
||||
AC_LANG_CONFTEST([[
|
||||
+void g (int);
|
||||
void f (int (*p) (void));
|
||||
void g (int i)
|
||||
{
|
||||
@@ -0,0 +1,37 @@
|
||||
Upstream-Status: pending
|
||||
|
||||
This patch fixes this configure issue for grub when -mfpmath=sse is in the gcc parameters.
|
||||
|
||||
configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100 -Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
|
||||
conftest.c:1:0: error: SSE instruction set disabled, using 387 arithmetics [-Werror]
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
|
||||
Index: grub-1.99/configure.ac
|
||||
===================================================================
|
||||
--- grub-1.99.orig/configure.ac
|
||||
+++ grub-1.99/configure.ac
|
||||
@@ -378,7 +378,7 @@ if test "x$target_cpu" = xi386; then
|
||||
|
||||
# Some toolchains enable these features by default, but they need
|
||||
# registers that aren't set up properly in GRUB.
|
||||
- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
|
||||
+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
|
||||
fi
|
||||
|
||||
# By default, GCC 4.4 generates .eh_frame sections containing unwind
|
||||
Index: grub-1.99/configure
|
||||
===================================================================
|
||||
--- grub-1.99.orig/configure
|
||||
+++ grub-1.99/configure
|
||||
@@ -19991,7 +19991,7 @@ $as_echo "$grub_cv_cc_falign_loop" >&6;
|
||||
|
||||
# Some toolchains enable these features by default, but they need
|
||||
# registers that aren't set up properly in GRUB.
|
||||
- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
|
||||
+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -mfpmath=387"
|
||||
fi
|
||||
|
||||
# By default, GCC 4.4 generates .eh_frame sections containing unwind
|
||||
@@ -0,0 +1,147 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
This patch fixes these strick-aliasing errors with gcc 4.7
|
||||
|
||||
|
||||
| gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -DGRUB_FILE=\"fs/zfs/zfs.c\" -I. -I. -I.. -I.. -I../include -I../include -isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror -Wno-trampolines -ffreestanding -isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -c -o fs/zfs/zfs_module-zfs.o `test -f 'fs/zfs/zfs.c' || echo './'`fs/zfs/zfs.c
|
||||
| fs/zfs/zfs.c: In function 'get_filesystem_dnode':
|
||||
| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1449:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'make_mdn':
|
||||
| fs/zfs/zfs.c:1478:3: error: dereferencing type-punned pointer will break strict-alERROR: Function failed: do_compile (see /home/nitin/builds/build0/tmp/work/x86_64-linux/grub-efi-i586-native-1.99-r7/temp/log.do_compile.9293 for further information)
|
||||
| iasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'dnode_get_fullpath':
|
||||
| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1554:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:1571:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'grub_zfs_open':
|
||||
| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2234:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'fill_fs_info':
|
||||
| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2362:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2395:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'iterate_zap':
|
||||
| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2420:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c: In function 'grub_zfs_dir':
|
||||
| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2483:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2484:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| fs/zfs/zfs.c:2502:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
|
||||
| cc1: all warnings being treated as errors
|
||||
| make[3]: *** [fs/zfs/zfs_module-zfs.o] Error 1
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
|
||||
Index: grub-1.99/grub-core/fs/zfs/zfs.c
|
||||
===================================================================
|
||||
--- grub-1.99.orig/grub-core/fs/zfs/zfs.c
|
||||
+++ grub-1.99/grub-core/fs/zfs/zfs.c
|
||||
@@ -1446,7 +1446,8 @@ get_filesystem_dnode (dnode_end_t * mosm
|
||||
ch = *fsname;
|
||||
*fsname = 0;
|
||||
|
||||
- childobj = grub_zfs_to_cpu64 ((((dsl_dir_phys_t *) DN_BONUS (&mdn->dn)))->dd_child_dir_zapobj, mdn->endian);
|
||||
+ dsl_dir_phys_t * tmp = DN_BONUS (&mdn->dn);
|
||||
+ childobj = grub_zfs_to_cpu64 (tmp->dd_child_dir_zapobj, mdn->endian);
|
||||
err = dnode_get (mosmdn, childobj,
|
||||
DMU_OT_DSL_DIR_CHILD_MAP, mdn, data);
|
||||
if (err)
|
||||
@@ -1475,7 +1476,8 @@ make_mdn (dnode_end_t * mdn, struct grub
|
||||
|
||||
grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
|
||||
|
||||
- bp = &(((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_bp);
|
||||
+ dsl_dataset_phys_t * tmp = DN_BONUS(&mdn->dn);
|
||||
+ bp = &(tmp->ds_bp);
|
||||
err = zio_read (bp, mdn->endian, &osp, &ospsize, data);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -1551,7 +1553,8 @@ dnode_get_fullpath (const char *fullpath
|
||||
|
||||
grub_dprintf ("zfs", "alive\n");
|
||||
|
||||
- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&dn->dn))->dd_head_dataset_obj, dn->endian);
|
||||
+ dsl_dir_phys_t * tmp1 = DN_BONUS (&dn->dn);
|
||||
+ headobj = grub_zfs_to_cpu64 (tmp1->dd_head_dataset_obj, dn->endian);
|
||||
|
||||
grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
|
||||
|
||||
@@ -1568,7 +1571,8 @@ dnode_get_fullpath (const char *fullpath
|
||||
{
|
||||
grub_uint64_t snapobj;
|
||||
|
||||
- snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&mdn->dn))->ds_snapnames_zapobj, mdn->endian);
|
||||
+ dsl_dataset_phys_t * tmp2 = DN_BONUS (&mdn->dn);
|
||||
+ snapobj = grub_zfs_to_cpu64 (tmp2->ds_snapnames_zapobj, mdn->endian);
|
||||
|
||||
err = dnode_get (&(data->mos), snapobj,
|
||||
DMU_OT_DSL_DS_SNAP_MAP, mdn, data);
|
||||
@@ -2231,7 +2235,8 @@ grub_zfs_open (struct grub_file *file, c
|
||||
}
|
||||
else
|
||||
{
|
||||
- file->size = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&data->dnode.dn))->zp_size, data->dnode.endian);
|
||||
+ znode_phys_t * tmp = DN_BONUS (&data->dnode.dn);
|
||||
+ file->size = grub_zfs_to_cpu64 (tmp->zp_size, data->dnode.endian);
|
||||
}
|
||||
|
||||
file->data = data;
|
||||
@@ -2359,7 +2364,8 @@ fill_fs_info (struct grub_dirhook_info *
|
||||
|
||||
if (mdn.dn.dn_type == DMU_OT_DSL_DIR)
|
||||
{
|
||||
- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&mdn.dn))->dd_head_dataset_obj, mdn.endian);
|
||||
+ dsl_dir_phys_t * tmp1 = DN_BONUS (&mdn.dn);
|
||||
+ headobj = grub_zfs_to_cpu64 (tmp1->dd_head_dataset_obj, mdn.endian);
|
||||
|
||||
err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &mdn, data);
|
||||
if (err)
|
||||
@@ -2392,7 +2398,8 @@ fill_fs_info (struct grub_dirhook_info *
|
||||
}
|
||||
|
||||
info->mtimeset = 1;
|
||||
- info->mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
|
||||
+ znode_phys_t * tmp2 = DN_BONUS (&dn.dn);
|
||||
+ info->mtime = grub_zfs_to_cpu64 (tmp2->zp_mtime[0], dn.endian);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2417,7 +2424,8 @@ grub_zfs_dir (grub_device_t device, cons
|
||||
|
||||
dnode_get (&(data->mdn), val, 0, &dn, data);
|
||||
info.mtimeset = 1;
|
||||
- info.mtime = grub_zfs_to_cpu64 (((znode_phys_t *) DN_BONUS (&dn.dn))->zp_mtime[0], dn.endian);
|
||||
+ znode_phys_t * tmp1 = DN_BONUS (&dn.dn);
|
||||
+ info.mtime = grub_zfs_to_cpu64 (tmp1->zp_mtime[0], dn.endian);
|
||||
info.dir = (dn.dn.dn_type == DMU_OT_DIRECTORY_CONTENTS);
|
||||
grub_dprintf ("zfs", "type=%d, name=%s\n",
|
||||
(int)dn.dn.dn_type, (char *)name);
|
||||
@@ -2480,8 +2488,9 @@ grub_zfs_dir (grub_device_t device, cons
|
||||
fill_fs_info (&info, data->dnode, data);
|
||||
hook ("@", &info);
|
||||
|
||||
- childobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_child_dir_zapobj, data->dnode.endian);
|
||||
- headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&data->dnode.dn))->dd_head_dataset_obj, data->dnode.endian);
|
||||
+ dsl_dir_phys_t * tmp2 = DN_BONUS (&data->dnode.dn);
|
||||
+ childobj = grub_zfs_to_cpu64 (tmp2->dd_child_dir_zapobj, data->dnode.endian);
|
||||
+ headobj = grub_zfs_to_cpu64 (tmp2->dd_head_dataset_obj, data->dnode.endian);
|
||||
err = dnode_get (&(data->mos), childobj,
|
||||
DMU_OT_DSL_DIR_CHILD_MAP, &dn, data);
|
||||
if (err)
|
||||
@@ -2499,7 +2508,8 @@ grub_zfs_dir (grub_device_t device, cons
|
||||
return err;
|
||||
}
|
||||
|
||||
- snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) DN_BONUS (&dn.dn))->ds_snapnames_zapobj, dn.endian);
|
||||
+ dsl_dataset_phys_t * tmp3 = DN_BONUS (&dn.dn);
|
||||
+ snapobj = grub_zfs_to_cpu64 (tmp3->ds_snapnames_zapobj, dn.endian);
|
||||
|
||||
err = dnode_get (&(data->mos), snapobj,
|
||||
DMU_OT_DSL_DS_SNAP_MAP, &dn, data);
|
||||
@@ -0,0 +1,41 @@
|
||||
UpstreamStatus: Pending
|
||||
|
||||
This patch quitens this error:
|
||||
|
||||
| make[3]: Entering directory
|
||||
`/home/nitin/builds/build0/tmp/work/x86_64-linux/grub-efi-i586-native-1.99-r7/grub-1.99/grub-core'
|
||||
| gcc -DHAVE_CONFIG_H -I. -I.. -Wall -W -I../include -I../include
|
||||
-DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=I386_EFI -nostdinc -isystem
|
||||
/usr/lib/gcc/x86_64-redhat-linux/4.7.0/include -DGRUB_FILE=\"fs/btrfs.c\" -I.
|
||||
-I. -I.. -I.. -I../include -I../include
|
||||
-isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2
|
||||
-pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow -Wpointer-arith
|
||||
-Wmissing-prototypes -Wundef -Wstrict-prototypes -g -falign-jumps=1
|
||||
-falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 -mno-3dnow
|
||||
-fno-dwarf2-cfi-asm -m32 -fno-stack-protector -mno-stack-arg-probe -Werror
|
||||
-Wno-trampolines -ffreestanding
|
||||
-isystem/home/nitin/builds/build0/tmp/sysroots/x86_64-linux/usr/include -O2
|
||||
-pipe -c -o fs/btrfs_module-btrfs.o `test -f 'fs/btrfs.c' || echo
|
||||
'./'`fs/btrfs.c
|
||||
| fs/btrfs.c: In function 'grub_btrfs_read_logical':
|
||||
| fs/btrfs.c:791:5: error: 'err' may be used uninitialized in this function
|
||||
[-Werror=maybe-uninitialized]
|
||||
| fs/btrfs.c:592:18: note: 'err' was declared here
|
||||
| cc1: all warnings being treated as errors
|
||||
| make[3]: *** [fs/btrfs_module-btrfs.o] Error 1
|
||||
|
||||
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
2012/04/13
|
||||
Index: grub-1.99/grub-core/fs/btrfs.c
|
||||
===================================================================
|
||||
--- grub-1.99.orig/grub-core/fs/btrfs.c
|
||||
+++ grub-1.99/grub-core/fs/btrfs.c
|
||||
@@ -589,7 +589,7 @@ grub_btrfs_read_logical (struct grub_btr
|
||||
struct grub_btrfs_key *key;
|
||||
struct grub_btrfs_chunk_item *chunk;
|
||||
grub_uint64_t csize;
|
||||
- grub_err_t err;
|
||||
+ grub_err_t err = 0;
|
||||
struct grub_btrfs_key key_out;
|
||||
int challoc = 0;
|
||||
grub_device_t dev;
|
||||
34
meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch
Normal file
34
meta/recipes-bsp/grub/files/grub-1.99-gcc-4.7.0.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
Upstream-Status: backport from fedora
|
||||
|
||||
2012/04/13
|
||||
Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
|
||||
|
||||
From b0f4ef523b69a497d69820c09bbb07484a6b09cc Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 7 Mar 2012 09:53:50 -0500
|
||||
Subject: [PATCH] Fix gcc error that kills build.
|
||||
|
||||
---
|
||||
conf/Makefile.common | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/conf/Makefile.common b/conf/Makefile.common
|
||||
index 2040a2e..b3ba765 100644
|
||||
--- a/conf/Makefile.common
|
||||
+++ b/conf/Makefile.common
|
||||
@@ -11,10 +11,10 @@ if COND_i386_pc
|
||||
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
||||
endif
|
||||
if COND_i386_efi
|
||||
- LDFLAGS_PLATFORM = -melf_i386
|
||||
+ LDFLAGS_PLATFORM = -m32
|
||||
endif
|
||||
if COND_x86_64_efi
|
||||
- LDFLAGS_PLATFORM = -melf_x86_64
|
||||
+ LDFLAGS_PLATFORM = -m64
|
||||
endif
|
||||
if COND_i386_qemu
|
||||
CFLAGS_PLATFORM += -mrtd -mregparm=3
|
||||
--
|
||||
1.7.7.6
|
||||
|
||||
@@ -16,14 +16,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
# FIXME: We should be able to optionally drop freetype as a dependency
|
||||
DEPENDS = "help2man-native autogen-native"
|
||||
RDEPENDS_${PN} = "diffutils freetype"
|
||||
PR = "r6"
|
||||
PR = "r9"
|
||||
|
||||
# Native packages do not normally rebuild when the target changes.
|
||||
# Ensure this is built once per HOST-TARGET pair.
|
||||
PN := "grub-efi-${TRANSLATED_TARGET_ARCH}-native"
|
||||
|
||||
SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
|
||||
file://grub-1.99_fix_for_automake_1.11.2.patch"
|
||||
file://grub-1.99_fix_for_automake_1.11.2.patch \
|
||||
file://grub-1.99-fpmath-sse-387-fix.patch \
|
||||
file://grub-1.99-gcc-4.7.0.patch \
|
||||
file://grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch \
|
||||
file://grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch \
|
||||
file://grub-1.99-fix-enable_execute_stack-check.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
|
||||
SRC_URI[sha256sum] = "b91f420f2c51f6155e088e34ff99bea09cc1fb89585cf7c0179644e57abd28ff"
|
||||
|
||||
@@ -11,11 +11,18 @@ SECTION = "bootloaders"
|
||||
LICENSE = "GPLv3"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
|
||||
|
||||
DEPENDS = "autogen-native"
|
||||
RDEPENDS_${PN} = "diffutils freetype"
|
||||
PR = "r3"
|
||||
PR = "r7"
|
||||
|
||||
SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
|
||||
file://grub-install.in.patch \
|
||||
file://grub-1.99_fix_for_automake_1.11.2.patch \
|
||||
file://grub-1.99-fpmath-sse-387-fix.patch \
|
||||
file://grub-1.99-gcc-4.7.0.patch \
|
||||
file://grub-1.99-gcc-4.7.0-uninitialized-var-errors.patch \
|
||||
file://grub-1.99-gcc-4.7.0-strict-aliasing-errors.patch \
|
||||
file://grub-1.99-fix-enable_execute_stack-check.patch \
|
||||
file://40_custom"
|
||||
|
||||
SRC_URI[md5sum] = "ca9f2a2d571b57fc5c53212d1d22e2b5"
|
||||
@@ -26,7 +33,7 @@ COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
|
||||
inherit autotools
|
||||
inherit gettext
|
||||
|
||||
EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --target=${TARGET_ARCH} --program-prefix="""
|
||||
EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="""
|
||||
|
||||
do_configure() {
|
||||
oe_runconf
|
||||
|
||||
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
|
||||
file://src/lrz.c;beginline=1;endline=10;md5=5276956373ff7d8758837f6399a1045f"
|
||||
SECTION = "console/network"
|
||||
DEPENDS = ""
|
||||
PR = "r3"
|
||||
PR = "r4"
|
||||
|
||||
SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \
|
||||
file://autotools.patch \
|
||||
@@ -28,13 +28,19 @@ do_install() {
|
||||
}
|
||||
|
||||
pkg_postinst_${PN}() {
|
||||
for util in rz rx rb sz sx sb; do
|
||||
for util in rz rx rb; do
|
||||
update-alternatives --install ${bindir}/$util $util lrz 100
|
||||
done
|
||||
for util in sz sx sb; do
|
||||
update-alternatives --install ${bindir}/$util $util lsz 100
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postrm_${PN}() {
|
||||
for util in rz rx rb sz sx sb; do
|
||||
for util in rz rx rb; do
|
||||
update-alternatives --remove $util ${bindir}/lrz
|
||||
done
|
||||
for util sz sx sb; do
|
||||
update-alternatives --remove $util ${bindir}/lsz
|
||||
done
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ SECTION = "network"
|
||||
# python scripts are under GPLv2+
|
||||
LICENSE = "GPLv2+ & LGPLv2.1+"
|
||||
|
||||
INC_PR = "r1"
|
||||
INC_PR = "r2"
|
||||
|
||||
DEPENDS = "expat libcap libdaemon dbus glib-2.0"
|
||||
|
||||
@@ -123,17 +123,16 @@ do_install_avahi-autoipd() {
|
||||
}
|
||||
|
||||
# At the time the postinst runs, dbus might not be setup so only restart if running
|
||||
# Don't exit early, because update-rc.d needs to run subsequently.
|
||||
|
||||
pkg_postinst_avahi-daemon () {
|
||||
if [ "x$D" != "x" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "$D" ]; then
|
||||
DBUSPID=`pidof dbus-daemon`
|
||||
|
||||
if [ "x$DBUSPID" != "x" ]; then
|
||||
/etc/init.d/dbus-1 force-reload
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst_avahi-autoipd () {
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 56d307993c0a661c73fcdd72b1392c3719a0c297 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <56d307993c0a661c73fcdd72b1392c3719a0c297.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Joshua Lock <josh@linux.intel.com>
|
||||
Date: Tue, 10 Apr 2012 17:54:56 -0700
|
||||
Subject: [PATCH 1/6] Monitor the Manager's State property
|
||||
|
||||
Monitor the Manager's State property and update global_ready
|
||||
appropriately when it changes.
|
||||
|
||||
Without this change using the applet with connman 0.79 and
|
||||
starting the applet after the daemon no status icon is shown.
|
||||
|
||||
With this change this icon displays an appropriate state when
|
||||
the applet launches.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Joshua Lock <josh@linux.intel.com>
|
||||
---
|
||||
applet/main.c | 10 ++++++++++
|
||||
1 files changed, 10 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index 224e2fd..68a77b1 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -111,6 +111,16 @@ static void manager_property_changed(DBusGProxy *proxy, const char *property,
|
||||
iterate_list, &path);
|
||||
update_service(proxy, path);
|
||||
g_free(path);
|
||||
+ } else if (g_str_equal(property, "State") == TRUE) {
|
||||
+ const gchar *state = g_value_get_string(value);
|
||||
+
|
||||
+ if (g_strcmp0(state, "ready") == 0 || g_strcmp0(state, "online") == 0) {
|
||||
+ global_ready = TRUE;
|
||||
+ status_ready(global_strength);
|
||||
+ } else {
|
||||
+ global_ready = FALSE;
|
||||
+ status_offline();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,865 @@
|
||||
From 8b8fd038474def8452354105b40738a402f28d19 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8b8fd038474def8452354105b40738a402f28d19.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Thu, 12 Apr 2012 00:35:00 +0100
|
||||
Subject: [PATCH 2/6] Update for ConnMan 0.79 API changes
|
||||
|
||||
* Use Manager.GetServices method instead of Manager.Services property
|
||||
* Use Manager.GetTechnologies / Technology.Powered instead of
|
||||
Manager.EnabledTechnologies method
|
||||
* Use Technology.Powered property instead of Manager.EnableTechnology
|
||||
and Manager.DisableTechnology methods
|
||||
* Use Technology.Scan method instead of Manager.RequestScan method
|
||||
* Listen for ServicesAdded, ServicesRemoved, TechnologyAdded and
|
||||
TechnologyRemoved signals instead of monitoring the old Services
|
||||
and EnabledTechnologies properties
|
||||
|
||||
Also remove unused code relating to the old API.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-client.c | 90 ++-----------
|
||||
common/connman-client.h | 12 +-
|
||||
common/connman-dbus.c | 359 +++++++++++++++++++++++++++--------------------
|
||||
common/connman-dbus.h | 1 +
|
||||
common/connman-dbus.xml | 17 +--
|
||||
common/marshal.list | 2 +
|
||||
properties/cellular.c | 6 +-
|
||||
properties/ethernet.c | 8 +-
|
||||
properties/main.c | 14 +--
|
||||
properties/wifi.c | 8 +-
|
||||
10 files changed, 245 insertions(+), 272 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index 407aea0..9d755c4 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -112,9 +112,7 @@ static void connman_client_init(ConnmanClient *client)
|
||||
G_TYPE_STRING, /* address */
|
||||
G_TYPE_STRING, /* netmask */
|
||||
G_TYPE_STRING, /* gateway */
|
||||
- G_TYPE_BOOLEAN, /* ethernet enabled */
|
||||
- G_TYPE_BOOLEAN, /* wifi enabled */
|
||||
- G_TYPE_BOOLEAN, /* cellular enabled */
|
||||
+ G_TYPE_BOOLEAN, /* powered */
|
||||
G_TYPE_BOOLEAN);/* offline */
|
||||
|
||||
g_object_set_data(G_OBJECT(priv->store),
|
||||
@@ -288,7 +286,7 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
DBusGProxy *proxy;
|
||||
GValue value = { 0 };
|
||||
|
||||
- DBG("client %p", client);
|
||||
+ DBG("client %p device %s", client, device);
|
||||
|
||||
if (device == NULL)
|
||||
return;
|
||||
@@ -300,64 +298,34 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
g_value_init(&value, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean(&value, powered);
|
||||
|
||||
- connman_set_property(proxy, "Powered", &value, NULL);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-}
|
||||
-
|
||||
-static gboolean device_scan(GtkTreeModel *model, GtkTreePath *path,
|
||||
- GtkTreeIter *iter, gpointer user_data)
|
||||
-{
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- gtk_tree_model_get(model, iter, CONNMAN_COLUMN_PROXY, &proxy, -1);
|
||||
-
|
||||
- if (proxy == NULL)
|
||||
- return FALSE;
|
||||
-
|
||||
- if (g_str_equal(dbus_g_proxy_get_interface(proxy),
|
||||
- CONNMAN_SERVICE_INTERFACE) == FALSE)
|
||||
- return FALSE;
|
||||
-
|
||||
- connman_propose_scan(proxy, NULL);
|
||||
+ GError *error = NULL;
|
||||
+ gboolean ret = connman_set_property(proxy, "Powered", &value, &error);
|
||||
+ if( error )
|
||||
+ fprintf (stderr, "error: %s\n", error->message);
|
||||
|
||||
g_object_unref(proxy);
|
||||
-
|
||||
- return FALSE;
|
||||
}
|
||||
|
||||
-void connman_client_propose_scan(ConnmanClient *client, const gchar *device)
|
||||
+void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
+ connman_scan_reply callback, gpointer user_data)
|
||||
{
|
||||
ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
DBusGProxy *proxy;
|
||||
|
||||
- DBG("client %p", client);
|
||||
+ DBG("client %p device %s", client, device);
|
||||
|
||||
- if (device == NULL) {
|
||||
- gtk_tree_model_foreach(GTK_TREE_MODEL(priv->store),
|
||||
- device_scan, NULL);
|
||||
+ if (device == NULL)
|
||||
return;
|
||||
- }
|
||||
|
||||
proxy = connman_dbus_get_proxy(priv->store, device);
|
||||
if (proxy == NULL)
|
||||
return;
|
||||
|
||||
- connman_propose_scan(proxy, NULL);
|
||||
+ connman_scan_async(proxy, callback, user_data);
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
|
||||
-void connman_client_request_scan(ConnmanClient *client, char *scantype,
|
||||
- connman_request_scan_reply callback, gpointer userdata)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
-
|
||||
- DBG("client %p", client);
|
||||
-
|
||||
- connman_request_scan_async(priv->manager, scantype, callback, userdata);
|
||||
-}
|
||||
-
|
||||
gboolean connman_client_get_offline_status(ConnmanClient *client)
|
||||
{
|
||||
GHashTable *hash;
|
||||
@@ -600,39 +568,3 @@ void connman_client_remove(ConnmanClient *client, const gchar *network)
|
||||
|
||||
g_object_unref(proxy);
|
||||
}
|
||||
-
|
||||
-void connman_client_enable_technology(ConnmanClient *client, const char *network,
|
||||
- const gchar *technology)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- if (network== NULL)
|
||||
- return;
|
||||
-
|
||||
- proxy = connman_dbus_get_proxy(priv->store, network);
|
||||
- if (proxy == NULL)
|
||||
- return;
|
||||
-
|
||||
- connman_enable_technology(proxy, technology, NULL);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-}
|
||||
-
|
||||
-void connman_client_disable_technology(ConnmanClient *client, const char *network,
|
||||
- const gchar *technology)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- if (network == NULL)
|
||||
- return;
|
||||
-
|
||||
- proxy = connman_dbus_get_proxy(priv->store, network);
|
||||
- if (proxy == NULL)
|
||||
- return;
|
||||
-
|
||||
- connman_disable_technology(proxy, technology, NULL);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-}
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 15fa098..6fe772c 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -69,7 +69,8 @@ void connman_client_set_powered(ConnmanClient *client, const gchar *device,
|
||||
gboolean powered);
|
||||
gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
struct ipv4_config *ipv4_config);
|
||||
-void connman_client_propose_scan(ConnmanClient *client, const gchar *device);
|
||||
+void connman_client_scan(ConnmanClient *client, const gchar *device,
|
||||
+ connman_scan_reply callback, gpointer user_data);
|
||||
|
||||
void connman_client_connect(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_disconnect(ConnmanClient *client, const gchar *network);
|
||||
@@ -89,8 +90,6 @@ void connman_client_set_callback(ConnmanClient *client,
|
||||
|
||||
void connman_client_remove(ConnmanClient *client, const gchar *network);
|
||||
|
||||
-void connman_client_request_scan(ConnmanClient *client, char *scantype,
|
||||
- connman_request_scan_reply callback, gpointer userdata);
|
||||
gboolean connman_client_get_offline_status(ConnmanClient *client);
|
||||
void connman_client_set_offlinemode(ConnmanClient *client, gboolean status);
|
||||
|
||||
@@ -114,11 +113,8 @@ enum {
|
||||
CONNMAN_COLUMN_ADDRESS, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_NETMASK, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_GATEWAY, /* G_TYPE_STRING */
|
||||
-
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED,/* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, /* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED,/* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_OFFLINEMODE, /* G_TYPE_STRING */
|
||||
+ CONNMAN_COLUMN_POWERED, /* G_TYPE_BOOLEAN */
|
||||
+ CONNMAN_COLUMN_OFFLINEMODE, /* G_TYPE_BOOLEAN */
|
||||
|
||||
_CONNMAN_NUM_COLUMNS
|
||||
};
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 6669749..4eb77b6 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "connman-dbus.h"
|
||||
#include "connman-dbus-glue.h"
|
||||
|
||||
+#include "marshal.h"
|
||||
+
|
||||
#ifdef DEBUG
|
||||
#define DBG(fmt, arg...) printf("%s:%s() " fmt "\n", __FILE__, __FUNCTION__ , ## arg)
|
||||
#else
|
||||
@@ -164,22 +166,6 @@ gboolean connman_dbus_get_iter(GtkTreeStore *store, const gchar *path,
|
||||
return get_iter_from_path(store, iter, path);
|
||||
}
|
||||
|
||||
-static void iterate_list(const GValue *value, gpointer user_data)
|
||||
-{
|
||||
- GSList **list = user_data;
|
||||
- gchar *path = g_value_dup_boxed(value);
|
||||
-
|
||||
- if (path == NULL)
|
||||
- return;
|
||||
-
|
||||
- *list = g_slist_append(*list, path);
|
||||
-}
|
||||
-
|
||||
-static gint compare_path(gconstpointer a, gconstpointer b)
|
||||
-{
|
||||
- return g_strcmp0(a, b);
|
||||
-}
|
||||
-
|
||||
static guint get_type(const GValue *value)
|
||||
{
|
||||
const char *type = value ? g_value_get_string(value) : NULL;
|
||||
@@ -217,95 +203,76 @@ static const gchar *type2icon(guint type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
+static void tech_changed(DBusGProxy *proxy, const char *property,
|
||||
+ GValue *value, gpointer user_data)
|
||||
{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ const char *path = dbus_g_proxy_get_path(proxy);
|
||||
GtkTreeIter iter;
|
||||
- gboolean ethernet_enabled_prev, ethernet_enabled = FALSE;
|
||||
- gboolean wifi_enabled_prev, wifi_enabled = FALSE;
|
||||
- gboolean cellular_enabled_prev, cellular_enabled = FALSE;
|
||||
- gchar **tech = g_value_get_boxed (value);
|
||||
- guint i;
|
||||
|
||||
- if (value == NULL)
|
||||
- return;
|
||||
-
|
||||
- for (i = 0; i < g_strv_length(tech); i++) {
|
||||
- DBG("technology: %s", *(tech+i));
|
||||
- if (g_str_equal("ethernet", *(tech + i)))
|
||||
- ethernet_enabled = TRUE;
|
||||
- else if (g_str_equal ("wifi", *(tech + i)))
|
||||
- wifi_enabled = TRUE;
|
||||
- else if (g_str_equal ("cellular", *(tech + i)))
|
||||
- cellular_enabled = TRUE;
|
||||
- }
|
||||
+ DBG("store %p proxy %p property %s", store, proxy, property);
|
||||
|
||||
- get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET);
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled_prev, -1);
|
||||
- if (ethernet_enabled_prev != ethernet_enabled)
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ethernet_enabled, -1);
|
||||
+ if (property == NULL || value == NULL)
|
||||
+ return;
|
||||
|
||||
- get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_WIFI);
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled_prev, -1);
|
||||
- if (wifi_enabled_prev != wifi_enabled)
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled, -1);
|
||||
+ if (get_iter_from_path(store, &iter, path) == FALSE)
|
||||
+ return;
|
||||
|
||||
- get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR);
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled_prev, -1);
|
||||
- if (cellular_enabled_prev != cellular_enabled)
|
||||
+ if (g_str_equal(property, "Powered") == TRUE) {
|
||||
+ gboolean powered = g_value_get_boolean(value);
|
||||
gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled, -1);
|
||||
+ CONNMAN_COLUMN_POWERED, powered, -1);
|
||||
+ }
|
||||
}
|
||||
|
||||
-static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *proxy, GValue *value)
|
||||
+static void tech_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
+ GError *error, gpointer user_data)
|
||||
{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
GtkTreeIter iter;
|
||||
- gboolean ethernet_enabled = FALSE;
|
||||
- gboolean wifi_enabled = FALSE;
|
||||
- gboolean cellular_enabled = FALSE;
|
||||
- gchar **tech = g_value_get_boxed (value);
|
||||
- guint i;
|
||||
-
|
||||
- for (i = 0; i < g_strv_length (tech); i++) {
|
||||
- DBG("technology: %s", *(tech+i));
|
||||
- if (g_str_equal("ethernet", *(tech + i)))
|
||||
- ethernet_enabled = TRUE;
|
||||
- else if (g_str_equal ("wifi", *(tech + i)))
|
||||
- wifi_enabled = TRUE;
|
||||
- else if (g_str_equal ("cellular", *(tech + i)))
|
||||
- cellular_enabled = TRUE;
|
||||
- }
|
||||
+ gboolean powered = FALSE;
|
||||
+ GValue *propval = 0;
|
||||
+ const char *techtype = 0;
|
||||
|
||||
- if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET) == FALSE)
|
||||
- gtk_tree_store_append(store, &iter, NULL);
|
||||
+ propval = g_hash_table_lookup(hash, "Type");
|
||||
+ techtype = propval ? g_value_get_string(propval) : NULL;
|
||||
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PROXY, proxy,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ethernet_enabled,
|
||||
- CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_ETHERNET,
|
||||
- -1);
|
||||
+ propval = g_hash_table_lookup(hash, "Powered");
|
||||
+ powered = propval ? g_value_get_boolean(propval) : FALSE;
|
||||
|
||||
- if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_WIFI) == FALSE)
|
||||
- gtk_tree_store_append(store, &iter, NULL);
|
||||
+ if (g_str_equal("ethernet", techtype))
|
||||
+ {
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PROXY, proxy,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled,
|
||||
- CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_WIFI,
|
||||
- -1);
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_POWERED, powered,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_ETHERNET,
|
||||
+ -1);
|
||||
+ }
|
||||
+ else if (g_str_equal ("wifi", techtype))
|
||||
+ {
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_WIFI) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
|
||||
- if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR) == FALSE)
|
||||
- gtk_tree_store_append(store, &iter, NULL);
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_POWERED, powered,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_WIFI,
|
||||
+ -1);
|
||||
+ }
|
||||
+ else if (g_str_equal ("3g", techtype))
|
||||
+ {
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PROXY, proxy,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled,
|
||||
- CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
- -1);
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_POWERED, powered,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
+ -1);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void offline_mode_changed(GtkTreeStore *store, GValue *value)
|
||||
@@ -319,6 +286,39 @@ static void offline_mode_changed(GtkTreeStore *store, GValue *value)
|
||||
-1);
|
||||
}
|
||||
|
||||
+static void tech_added(DBusGProxy *proxy, DBusGObjectPath *path,
|
||||
+ GHashTable *hash, gpointer user_data)
|
||||
+{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ GtkTreeIter iter;
|
||||
+ DBG("store %p proxy %p hash %p", store, proxy, hash);
|
||||
+
|
||||
+ if (!get_iter_from_path(store, &iter, path)) {
|
||||
+ DBusGProxy *tech_proxy = dbus_g_proxy_new_for_name(connection,
|
||||
+ CONNMAN_SERVICE, path,
|
||||
+ CONNMAN_TECHNOLOGY_INTERFACE);
|
||||
+ if (tech_proxy == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ tech_properties(tech_proxy, hash, NULL, user_data);
|
||||
+
|
||||
+ dbus_g_proxy_add_signal(tech_proxy, "PropertyChanged",
|
||||
+ G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(tech_proxy, "PropertyChanged",
|
||||
+ G_CALLBACK(tech_changed), store, NULL);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void tech_removed(DBusGProxy *proxy, DBusGObjectPath *path,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ GtkTreeIter iter;
|
||||
+
|
||||
+ if (get_iter_from_path(store, &iter, path))
|
||||
+ gtk_tree_store_remove(store, &iter);
|
||||
+}
|
||||
+
|
||||
static void offline_mode_properties(GtkTreeStore *store, DBusGProxy *proxy, GValue *value)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
@@ -401,59 +401,8 @@ static void service_changed(DBusGProxy *proxy, const char *property,
|
||||
}
|
||||
}
|
||||
|
||||
-static void property_update(GtkTreeStore *store, const GValue *value,
|
||||
- connman_get_properties_reply callback)
|
||||
-{
|
||||
- GSList *list, *link, *old_list, *new_list = NULL;
|
||||
-
|
||||
- DBG("store %p", store);
|
||||
-
|
||||
- old_list = g_object_get_data(G_OBJECT(store), "Services");
|
||||
-
|
||||
- dbus_g_type_collection_value_iterate(value, iterate_list, &new_list);
|
||||
-
|
||||
- g_object_set_data(G_OBJECT(store), "Services", new_list);
|
||||
-
|
||||
- for (list = new_list; list; list = list->next) {
|
||||
- gchar *path = list->data;
|
||||
- DBusGProxy *proxy;
|
||||
-
|
||||
- DBG("new path %s", path);
|
||||
-
|
||||
- link = g_slist_find_custom(old_list, path, compare_path);
|
||||
- if (link != NULL) {
|
||||
- g_free(link->data);
|
||||
- old_list = g_slist_delete_link(old_list, link);
|
||||
- }
|
||||
-
|
||||
- proxy = dbus_g_proxy_new_for_name(connection,
|
||||
- CONNMAN_SERVICE, path,
|
||||
- CONNMAN_SERVICE_INTERFACE);
|
||||
- if (proxy == NULL)
|
||||
- continue;
|
||||
-
|
||||
- DBG("getting %s properties", "Services");
|
||||
-
|
||||
- connman_get_properties_async(proxy, callback, store);
|
||||
- }
|
||||
-
|
||||
- for (list = old_list; list; list = list->next) {
|
||||
- gchar *path = list->data;
|
||||
- GtkTreeIter iter;
|
||||
-
|
||||
- DBG("old path %s", path);
|
||||
-
|
||||
- if (get_iter_from_path(store, &iter, path) == TRUE)
|
||||
- gtk_tree_store_remove(store, &iter);
|
||||
-
|
||||
- g_free(path);
|
||||
- }
|
||||
-
|
||||
- g_slist_free(old_list);
|
||||
-}
|
||||
-
|
||||
static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
- GError *error, gpointer user_data)
|
||||
+ gpointer user_data)
|
||||
{
|
||||
GtkTreeStore *store = user_data;
|
||||
GValue *value;
|
||||
@@ -468,7 +417,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
|
||||
DBG("store %p proxy %p hash %p", store, proxy, hash);
|
||||
|
||||
- if (error != NULL || hash == NULL)
|
||||
+ if (hash == NULL)
|
||||
goto done;
|
||||
|
||||
value = g_hash_table_lookup(hash, "Name");
|
||||
@@ -572,11 +521,7 @@ static void manager_changed(DBusGProxy *proxy, const char *property,
|
||||
if (property == NULL || value == NULL)
|
||||
return;
|
||||
|
||||
- if (g_str_equal(property, "Services") == TRUE)
|
||||
- property_update(store, value, service_properties);
|
||||
- else if (g_str_equal(property, "EnabledTechnologies") == TRUE)
|
||||
- enabled_technologies_changed(store, value);
|
||||
- else if (g_str_equal(property, "OfflineMode") == TRUE)
|
||||
+ if (g_str_equal(property, "OfflineMode") == TRUE)
|
||||
offline_mode_changed(store, value);
|
||||
}
|
||||
|
||||
@@ -591,23 +536,89 @@ static void manager_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
if (error != NULL || hash == NULL)
|
||||
return;
|
||||
|
||||
- value = g_hash_table_lookup(hash, "Services");
|
||||
- if (value != NULL)
|
||||
- property_update(store, value, service_properties);
|
||||
-
|
||||
- value = g_hash_table_lookup(hash, "EnabledTechnologies");
|
||||
- if (value != NULL)
|
||||
- enabled_technologies_properties(store, proxy, value);
|
||||
-
|
||||
value = g_hash_table_lookup(hash, "OfflineMode");
|
||||
if (value != NULL)
|
||||
offline_mode_properties(store, proxy, value);
|
||||
}
|
||||
|
||||
+static void manager_services(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ GError *error, gpointer user_data)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ DBG("proxy %p array %p", proxy, array);
|
||||
+
|
||||
+ if (error != NULL || array == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ for (i = 0; i < array->len; i++)
|
||||
+ {
|
||||
+ GValueArray *item = g_ptr_array_index(array, i);
|
||||
+
|
||||
+ DBusGObjectPath *path = (DBusGObjectPath *)g_value_get_boxed(g_value_array_get_nth(item, 0));
|
||||
+ DBusGProxy *service_proxy = dbus_g_proxy_new_for_name(connection,
|
||||
+ CONNMAN_SERVICE, path,
|
||||
+ CONNMAN_SERVICE_INTERFACE);
|
||||
+ if (service_proxy == NULL)
|
||||
+ continue;
|
||||
+
|
||||
+ GHashTable *props = (GHashTable *)g_value_get_boxed(g_value_array_get_nth(item, 1));
|
||||
+ service_properties(service_proxy, props, user_data);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void manager_technologies(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ GError *error, gpointer user_data)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ DBG("proxy %p array %p", proxy, array);
|
||||
+
|
||||
+ if (error != NULL || array == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ for (i = 0; i < array->len; i++)
|
||||
+ {
|
||||
+ GValueArray *item = g_ptr_array_index(array, i);
|
||||
+
|
||||
+ DBusGObjectPath *path = (DBusGObjectPath *)g_value_get_boxed(g_value_array_get_nth(item, 0));
|
||||
+ GHashTable *props = (GHashTable *)g_value_get_boxed(g_value_array_get_nth(item, 1));
|
||||
+
|
||||
+ tech_added(proxy, path, props, user_data);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void services_added(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ DBG("proxy %p array %p", proxy, array);
|
||||
+
|
||||
+ manager_services(proxy, array, NULL, user_data);
|
||||
+}
|
||||
+
|
||||
+static void services_removed(DBusGProxy *proxy, GPtrArray *array,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ GtkTreeStore *store = user_data;
|
||||
+ GtkTreeIter iter;
|
||||
+ int i;
|
||||
+
|
||||
+ DBG("store %p proxy %p array %p", store, proxy, array);
|
||||
+
|
||||
+ for (i = 0; i < array->len; i++)
|
||||
+ {
|
||||
+ DBusGObjectPath *path = (DBusGObjectPath *)g_ptr_array_index(array, i);
|
||||
+
|
||||
+ if (get_iter_from_path(store, &iter, path))
|
||||
+ gtk_tree_store_remove(store, &iter);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
|
||||
GtkTreeStore *store)
|
||||
{
|
||||
DBusGProxy *proxy;
|
||||
+ GType otype;
|
||||
|
||||
connection = dbus_g_connection_ref(conn);
|
||||
|
||||
@@ -620,11 +631,49 @@ DBusGProxy *connman_dbus_create_manager(DBusGConnection *conn,
|
||||
G_TYPE_STRING, G_TYPE_VALUE, G_TYPE_INVALID);
|
||||
dbus_g_proxy_connect_signal(proxy, "PropertyChanged",
|
||||
G_CALLBACK(manager_changed), store, NULL);
|
||||
-
|
||||
+
|
||||
+ otype = dbus_g_type_get_struct("GValueArray", DBUS_TYPE_G_OBJECT_PATH, DBUS_TYPE_G_DICTIONARY, G_TYPE_INVALID);
|
||||
+ otype = dbus_g_type_get_collection("GPtrArray", otype);
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__BOXED, G_TYPE_NONE, otype, G_TYPE_INVALID);
|
||||
+
|
||||
+ dbus_g_proxy_add_signal(proxy, "ServicesAdded",
|
||||
+ otype, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "ServicesAdded",
|
||||
+ G_CALLBACK(services_added), store, NULL);
|
||||
+
|
||||
+ otype = DBUS_TYPE_G_OBJECT_PATH_ARRAY;
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__BOXED, G_TYPE_NONE, otype, G_TYPE_INVALID);
|
||||
+
|
||||
+ dbus_g_proxy_add_signal(proxy, "ServicesRemoved",
|
||||
+ otype, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "ServicesRemoved",
|
||||
+ G_CALLBACK(services_removed), store, NULL);
|
||||
+
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__STRING_BOXED, G_TYPE_NONE, DBUS_TYPE_G_OBJECT_PATH, DBUS_TYPE_G_DICTIONARY, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_add_signal(proxy, "TechnologyAdded",
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, DBUS_TYPE_G_DICTIONARY, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "TechnologyAdded",
|
||||
+ G_CALLBACK(tech_added), store, NULL);
|
||||
+
|
||||
+ dbus_g_object_register_marshaller(marshal_VOID__STRING, G_TYPE_NONE, DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_add_signal(proxy, "TechnologyRemoved",
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, G_TYPE_INVALID);
|
||||
+ dbus_g_proxy_connect_signal(proxy, "TechnologyRemoved",
|
||||
+ G_CALLBACK(tech_removed), store, NULL);
|
||||
+
|
||||
+
|
||||
DBG("getting manager properties");
|
||||
|
||||
connman_get_properties_async(proxy, manager_properties, store);
|
||||
|
||||
+ DBG("getting technologies");
|
||||
+
|
||||
+ connman_get_technologies_async(proxy, manager_technologies, store);
|
||||
+
|
||||
+ DBG("getting services");
|
||||
+
|
||||
+ connman_get_services_async(proxy, manager_services, store);
|
||||
+
|
||||
return proxy;
|
||||
}
|
||||
|
||||
diff --git a/common/connman-dbus.h b/common/connman-dbus.h
|
||||
index cfca50e..c1b5091 100644
|
||||
--- a/common/connman-dbus.h
|
||||
+++ b/common/connman-dbus.h
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#define CONNMAN_PROFILE_INTERFACE CONNMAN_SERVICE ".Profile"
|
||||
#define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service"
|
||||
+#define CONNMAN_TECHNOLOGY_INTERFACE CONNMAN_SERVICE ".Technology"
|
||||
|
||||
DBusGProxy *connman_dbus_create_manager(DBusGConnection *connection,
|
||||
GtkTreeStore *store);
|
||||
diff --git a/common/connman-dbus.xml b/common/connman-dbus.xml
|
||||
index e20cb3b..56b9582 100644
|
||||
--- a/common/connman-dbus.xml
|
||||
+++ b/common/connman-dbus.xml
|
||||
@@ -5,26 +5,23 @@
|
||||
<method name="GetProperties">
|
||||
<arg type="a{sv}" direction="out"/>
|
||||
</method>
|
||||
+ <method name="GetServices">
|
||||
+ <arg type="a(oa{sv})" direction="out"/>
|
||||
+ </method>
|
||||
+ <method name="GetTechnologies">
|
||||
+ <arg type="a(oa{sv})" direction="out"/>
|
||||
+ </method>
|
||||
<method name="SetProperty">
|
||||
<arg type="s"/>
|
||||
<arg type="v"/>
|
||||
</method>
|
||||
- <method name="ProposeScan">
|
||||
- </method>
|
||||
<method name="Connect">
|
||||
</method>
|
||||
<method name="Disconnect">
|
||||
</method>
|
||||
<method name="Remove">
|
||||
</method>
|
||||
- <method name="RequestScan">
|
||||
- <arg type="s"/>
|
||||
- </method>
|
||||
- <method name="EnableTechnology">
|
||||
- <arg type="s"/>
|
||||
- </method>
|
||||
- <method name="DisableTechnology">
|
||||
- <arg type="s"/>
|
||||
+ <method name="Scan">
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
diff --git a/common/marshal.list b/common/marshal.list
|
||||
index e72aa4b..8b174d0 100644
|
||||
--- a/common/marshal.list
|
||||
+++ b/common/marshal.list
|
||||
@@ -1 +1,3 @@
|
||||
VOID:STRING,BOXED
|
||||
+VOID:BOXED
|
||||
+VOID:STRING
|
||||
diff --git a/properties/cellular.c b/properties/cellular.c
|
||||
index 7bbfb89..4d27e0e 100644
|
||||
--- a/properties/cellular.c
|
||||
+++ b/properties/cellular.c
|
||||
@@ -59,9 +59,9 @@ static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
const gchar *label = gtk_button_get_label(GTK_BUTTON(data->cellular_button));
|
||||
|
||||
if (g_str_equal(label, "Disable"))
|
||||
- connman_client_disable_technology(data->client, data->device, "cellular");
|
||||
+ connman_client_set_powered(data->client, data->device, FALSE);
|
||||
else
|
||||
- connman_client_enable_technology(data->client, data->device, "cellular");
|
||||
+ connman_client_set_powered(data->client, data->device, TRUE);
|
||||
}
|
||||
|
||||
void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
@@ -75,7 +75,7 @@ void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gboolean cellular_enabled;
|
||||
|
||||
gtk_tree_model_get(data->model, iter,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, &cellular_enabled,
|
||||
-1);
|
||||
|
||||
vbox = gtk_vbox_new(TRUE, 0);
|
||||
diff --git a/properties/ethernet.c b/properties/ethernet.c
|
||||
index d7f91d9..31db7a0 100644
|
||||
--- a/properties/ethernet.c
|
||||
+++ b/properties/ethernet.c
|
||||
@@ -59,9 +59,9 @@ static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
struct config_data *data = user_data;
|
||||
const gchar *label = gtk_button_get_label(GTK_BUTTON(data->ethernet_button));
|
||||
if (g_str_equal(label, "Disable"))
|
||||
- connman_client_disable_technology(data->client, data->device, "ethernet");
|
||||
- else if (g_str_equal(label, "Enable"))
|
||||
- connman_client_enable_technology(data->client, data->device, "ethernet");
|
||||
+ connman_client_set_powered(data->client, data->device, FALSE);
|
||||
+ else
|
||||
+ connman_client_set_powered(data->client, data->device, TRUE);
|
||||
}
|
||||
|
||||
void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
@@ -75,7 +75,7 @@ void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gboolean ethernet_enabled;
|
||||
|
||||
gtk_tree_model_get(data->model, iter,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, ðernet_enabled,
|
||||
-1);
|
||||
|
||||
vbox = gtk_vbox_new(TRUE, 0);
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index 088684a..e266f03 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -40,18 +40,14 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
struct config_data *data = user_data;
|
||||
guint type;
|
||||
const char *name = NULL, *_name = NULL, *state = NULL;
|
||||
- gboolean ethernet_enabled;
|
||||
- gboolean wifi_enabled;
|
||||
- gboolean cellular_enabled;
|
||||
+ gboolean powered;
|
||||
gboolean offline_mode;
|
||||
|
||||
gtk_tree_model_get(model, iter,
|
||||
CONNMAN_COLUMN_STATE, &state,
|
||||
CONNMAN_COLUMN_NAME, &name,
|
||||
CONNMAN_COLUMN_TYPE, &type,
|
||||
- CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled,
|
||||
- CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, &powered,
|
||||
CONNMAN_COLUMN_OFFLINEMODE, &offline_mode,
|
||||
-1);
|
||||
|
||||
@@ -103,14 +99,14 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
} else if (type == CONNMAN_TYPE_LABEL_ETHERNET) {
|
||||
if (!data->ethernet_button)
|
||||
return;
|
||||
- if (ethernet_enabled)
|
||||
+ if (powered)
|
||||
gtk_button_set_label(GTK_BUTTON(data->ethernet_button), _("Disable"));
|
||||
else
|
||||
gtk_button_set_label(GTK_BUTTON(data->ethernet_button), _("Enable"));
|
||||
} else if (type == CONNMAN_TYPE_LABEL_WIFI) {
|
||||
if (!data->wifi_button)
|
||||
return;
|
||||
- if (wifi_enabled) {
|
||||
+ if (powered) {
|
||||
gtk_button_set_label(GTK_BUTTON(data->wifi_button), _("Disable"));
|
||||
gtk_widget_set_sensitive(data->scan_button, 1);
|
||||
} else {
|
||||
@@ -120,7 +116,7 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
} else if (type == CONNMAN_TYPE_LABEL_CELLULAR) {
|
||||
if (!data->cellular_button)
|
||||
return;
|
||||
- if (cellular_enabled)
|
||||
+ if (powered)
|
||||
gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Disable"));
|
||||
else
|
||||
gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Enable"));
|
||||
diff --git a/properties/wifi.c b/properties/wifi.c
|
||||
index 85922a3..038d35a 100644
|
||||
--- a/properties/wifi.c
|
||||
+++ b/properties/wifi.c
|
||||
@@ -96,9 +96,9 @@ static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
const gchar *label = gtk_button_get_label(GTK_BUTTON(data->wifi_button));
|
||||
|
||||
if (g_str_equal(label, "Disable"))
|
||||
- connman_client_disable_technology(data->client, data->device, "wifi");
|
||||
+ connman_client_set_powered(data->client, data->device, FALSE);
|
||||
else
|
||||
- connman_client_enable_technology(data->client, data->device, "wifi");
|
||||
+ connman_client_set_powered(data->client, data->device, TRUE);
|
||||
}
|
||||
|
||||
static void scan_reply_cb(DBusGProxy *proxy, GError *error,
|
||||
@@ -115,7 +115,7 @@ static void scan_callback(GtkWidget *button, gpointer user_data)
|
||||
{
|
||||
struct config_data *data = user_data;
|
||||
gtk_widget_set_sensitive(button, 0);
|
||||
- connman_client_request_scan(data->client, "", scan_reply_cb, button);
|
||||
+ connman_client_scan(data->client, data->device, scan_reply_cb, button);
|
||||
}
|
||||
|
||||
void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
@@ -129,7 +129,7 @@ void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
gboolean wifi_enabled;
|
||||
|
||||
gtk_tree_model_get(data->model, iter,
|
||||
- CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled,
|
||||
+ CONNMAN_COLUMN_POWERED, &wifi_enabled,
|
||||
-1);
|
||||
|
||||
vbox = gtk_vbox_new(TRUE, 0);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
From 8594fb5e2fc347984457e2e46b175eb3cf57951f Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <8594fb5e2fc347984457e2e46b175eb3cf57951f.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 01:11:53 +0100
|
||||
Subject: [PATCH 3/6] Fix setting IPv4 configuration
|
||||
|
||||
Values in the hashtable for IPv4.Configuration need to be variants, not
|
||||
strings, and don't pass address entries if the method is dhcp.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-client.c | 32 +++++++++++++++++++++++++-------
|
||||
1 files changed, 25 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index 9d755c4..e4441ad 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -39,6 +39,11 @@
|
||||
#define CONNMAN_CLIENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
|
||||
CONNMAN_TYPE_CLIENT, ConnmanClientPrivate))
|
||||
|
||||
+#ifndef DBUS_TYPE_G_DICTIONARY
|
||||
+#define DBUS_TYPE_G_DICTIONARY \
|
||||
+ (dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
|
||||
+#endif
|
||||
+
|
||||
typedef struct _ConnmanClientPrivate ConnmanClientPrivate;
|
||||
|
||||
struct _ConnmanClientPrivate {
|
||||
@@ -248,6 +253,16 @@ GtkTreeModel *connman_client_get_device_model(ConnmanClient *client)
|
||||
return model;
|
||||
}
|
||||
|
||||
+void hash_table_value_string_insert( GHashTable *hash, gpointer key, const char *str )
|
||||
+{
|
||||
+ GValue *itemvalue;
|
||||
+
|
||||
+ itemvalue = g_slice_new0(GValue);
|
||||
+ g_value_init(itemvalue, G_TYPE_STRING);
|
||||
+ g_value_set_string(itemvalue, str);
|
||||
+ g_hash_table_insert(hash, key, itemvalue);
|
||||
+}
|
||||
+
|
||||
gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
struct ipv4_config *ipv4_config)
|
||||
{
|
||||
@@ -255,12 +270,7 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
DBusGProxy *proxy;
|
||||
GValue value = { 0 };
|
||||
gboolean ret;
|
||||
- GHashTable *ipv4 = g_hash_table_new(g_str_hash, g_str_equal);
|
||||
-
|
||||
- g_hash_table_insert(ipv4, "Method", (gpointer)ipv4_config->method);
|
||||
- g_hash_table_insert(ipv4, "Address", (gpointer)ipv4_config->address);
|
||||
- g_hash_table_insert(ipv4, "Netmask", (gpointer)ipv4_config->netmask);
|
||||
- g_hash_table_insert(ipv4, "Gateway", (gpointer)ipv4_config->gateway);
|
||||
+ GHashTable *ipv4 = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
|
||||
|
||||
DBG("client %p", client);
|
||||
|
||||
@@ -270,7 +280,15 @@ gboolean connman_client_set_ipv4(ConnmanClient *client, const gchar *device,
|
||||
proxy = connman_dbus_get_proxy(priv->store, device);
|
||||
if (proxy == NULL)
|
||||
return FALSE;
|
||||
- g_value_init(&value, DBUS_TYPE_G_STRING_STRING_HASHTABLE);
|
||||
+
|
||||
+ hash_table_value_string_insert(ipv4, "Method", ipv4_config->method);
|
||||
+ if( g_strcmp0(ipv4_config->method, "dhcp" ) != 0 ) {
|
||||
+ hash_table_value_string_insert(ipv4, "Address", ipv4_config->address);
|
||||
+ hash_table_value_string_insert(ipv4, "Netmask", ipv4_config->netmask);
|
||||
+ hash_table_value_string_insert(ipv4, "Gateway", ipv4_config->gateway);
|
||||
+ }
|
||||
+
|
||||
+ g_value_init(&value, DBUS_TYPE_G_DICTIONARY);
|
||||
g_value_set_boxed(&value, ipv4);
|
||||
ret = connman_set_property(proxy, "IPv4.Configuration", &value, NULL);
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,923 @@
|
||||
From c742b40860851f1659e801d0a652f854f6783bd1 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <c742b40860851f1659e801d0a652f854f6783bd1.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 02:32:43 +0100
|
||||
Subject: [PATCH 4/6] Handle WiFi authentication using an agent
|
||||
|
||||
Register an agent within the applet which shows an appropriate dialog
|
||||
when credentials are requested upon connecting to a secured wireless
|
||||
network.
|
||||
|
||||
Thanks to Julien Massot for providing the underlying agent library code.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
applet/Makefile.am | 3 +-
|
||||
applet/agent.c | 209 +++++++++++++++++++++++
|
||||
applet/agent.h | 29 +++
|
||||
applet/main.c | 3 +
|
||||
common/Makefile.am | 13 +-
|
||||
common/connman-agent.c | 426 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
common/connman-agent.h | 77 +++++++++
|
||||
common/connman-agent.xml | 26 +++
|
||||
common/marshal.list | 2 +
|
||||
9 files changed, 783 insertions(+), 5 deletions(-)
|
||||
create mode 100644 applet/agent.c
|
||||
create mode 100644 applet/agent.h
|
||||
create mode 100644 common/connman-agent.c
|
||||
create mode 100644 common/connman-agent.h
|
||||
create mode 100644 common/connman-agent.xml
|
||||
|
||||
diff --git a/applet/Makefile.am b/applet/Makefile.am
|
||||
index fe582ef..2e7c157 100644
|
||||
--- a/applet/Makefile.am
|
||||
+++ b/applet/Makefile.am
|
||||
@@ -2,7 +2,8 @@
|
||||
bin_PROGRAMS = connman-applet
|
||||
|
||||
connman_applet_SOURCES = main.c \
|
||||
- properties.h properties.c status.h status.c
|
||||
+ properties.h properties.c status.h \
|
||||
+ status.c agent.h agent.c
|
||||
|
||||
connman_applet_LDADD = $(top_builddir)/common/libcommon.a \
|
||||
@GTK_LIBS@ @DBUS_LIBS@
|
||||
diff --git a/applet/agent.c b/applet/agent.c
|
||||
new file mode 100644
|
||||
index 0000000..b12d337
|
||||
--- /dev/null
|
||||
+++ b/applet/agent.c
|
||||
@@ -0,0 +1,209 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Connection Manager
|
||||
+ *
|
||||
+ * Agent implementation based on code from bluez-gnome
|
||||
+ *
|
||||
+ * Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org>
|
||||
+ * Copyright (C) 2006-2007 Bastien Nocera <hadess@hadess.net>
|
||||
+ * 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 as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * 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 St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+#include <config.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+#include <glib/gi18n.h>
|
||||
+#include <gtk/gtk.h>
|
||||
+
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+
|
||||
+#include <connman-agent.h>
|
||||
+
|
||||
+#include "agent.h"
|
||||
+
|
||||
+struct input_data {
|
||||
+ gboolean numeric;
|
||||
+ gpointer request_data;
|
||||
+ GtkWidget *dialog;
|
||||
+ GHashTable *entries;
|
||||
+};
|
||||
+
|
||||
+static struct input_data *input_data_inst = NULL;
|
||||
+
|
||||
+static void input_free(struct input_data *input)
|
||||
+{
|
||||
+ gtk_widget_destroy(input->dialog);
|
||||
+
|
||||
+ g_hash_table_destroy(input->entries);
|
||||
+
|
||||
+ if( input_data_inst == input )
|
||||
+ input_data_inst = NULL;
|
||||
+
|
||||
+ g_free(input);
|
||||
+}
|
||||
+
|
||||
+static void request_input_callback(GtkWidget *dialog,
|
||||
+ gint response, gpointer user_data)
|
||||
+{
|
||||
+ GHashTableIter iter;
|
||||
+ gpointer key, value;
|
||||
+ GValue *retvalue = NULL;
|
||||
+ const gchar *text;
|
||||
+ struct input_data *input = user_data;
|
||||
+
|
||||
+ if (response == GTK_RESPONSE_OK) {
|
||||
+ GHashTable *reply = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
||||
+ g_hash_table_iter_init (&iter, input->entries);
|
||||
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
|
||||
+ text = gtk_entry_get_text((GtkEntry *)value);
|
||||
+ if(strlen(text)) {
|
||||
+ retvalue = g_slice_new0(GValue);
|
||||
+ g_value_init(retvalue, G_TYPE_STRING);
|
||||
+ g_value_set_string(retvalue, text);
|
||||
+ g_hash_table_insert(reply, g_strdup(key), retvalue);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ connman_agent_request_input_set_reply(input->request_data, reply);
|
||||
+ } else {
|
||||
+ connman_agent_request_input_abort(input->request_data);
|
||||
+ }
|
||||
+
|
||||
+ input_free(input);
|
||||
+}
|
||||
+
|
||||
+static void show_dialog(gpointer data, gpointer user_data)
|
||||
+{
|
||||
+ struct input_data *input = data;
|
||||
+
|
||||
+ gtk_widget_show_all(input->dialog);
|
||||
+
|
||||
+ gtk_window_present(GTK_WINDOW(input->dialog));
|
||||
+}
|
||||
+
|
||||
+static void request_input_dialog(GHashTable *request,
|
||||
+ gpointer request_data)
|
||||
+{
|
||||
+ GtkWidget *dialog;
|
||||
+ GtkWidget *label;
|
||||
+ GtkWidget *table;
|
||||
+ GtkWidget *entry;
|
||||
+ struct input_data *input;
|
||||
+ GHashTableIter iter;
|
||||
+ gpointer key, value;
|
||||
+ int elems, i;
|
||||
+
|
||||
+ input = g_try_malloc0(sizeof(*input));
|
||||
+ if (!input)
|
||||
+ return;
|
||||
+
|
||||
+ input->request_data = request_data;
|
||||
+
|
||||
+ input->entries = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
|
||||
+
|
||||
+ dialog = gtk_dialog_new();
|
||||
+ gtk_window_set_title(GTK_WINDOW(dialog), _("Connection Manager"));
|
||||
+ gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
|
||||
+ gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
|
||||
+ gtk_window_set_keep_above(GTK_WINDOW(dialog), TRUE);
|
||||
+ gtk_window_set_urgency_hint(GTK_WINDOW(dialog), TRUE);
|
||||
+ gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
|
||||
+ input->dialog = dialog;
|
||||
+
|
||||
+ gtk_dialog_add_button(GTK_DIALOG(dialog),
|
||||
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
|
||||
+ gtk_dialog_add_button(GTK_DIALOG(dialog),
|
||||
+ GTK_STOCK_OK, GTK_RESPONSE_OK);
|
||||
+
|
||||
+ elems = g_hash_table_size(request);
|
||||
+ table = gtk_table_new(elems+1, 2, FALSE);
|
||||
+ gtk_table_set_row_spacings(GTK_TABLE(table), 4);
|
||||
+ gtk_table_set_col_spacings(GTK_TABLE(table), 20);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(table), 12);
|
||||
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), table);
|
||||
+
|
||||
+ label = gtk_label_new(_("Please provide some network information:"));
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
+ gtk_table_attach(GTK_TABLE(table), label, 0, 2, 0, 1,
|
||||
+ GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
+
|
||||
+ g_hash_table_iter_init (&iter, request);
|
||||
+ i=1;
|
||||
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
|
||||
+ label = gtk_label_new((const char *)key);
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
+ gtk_table_attach(GTK_TABLE(table), label, 0, 1, i, i+1,
|
||||
+ GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
+
|
||||
+ entry = gtk_entry_new();
|
||||
+ gtk_entry_set_max_length(GTK_ENTRY(entry), 64);
|
||||
+ gtk_entry_set_width_chars(GTK_ENTRY(entry), 16);
|
||||
+ gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
|
||||
+ gtk_table_attach(GTK_TABLE(table), entry, 1, 2, i, i+1,
|
||||
+ GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
|
||||
+ g_hash_table_insert(input->entries, g_strdup(key), entry);
|
||||
+
|
||||
+ i++;
|
||||
+ }
|
||||
+
|
||||
+ input_data_inst = input;
|
||||
+
|
||||
+ g_signal_connect(G_OBJECT(dialog), "response",
|
||||
+ G_CALLBACK(request_input_callback), input);
|
||||
+
|
||||
+ show_dialog(input, NULL);
|
||||
+}
|
||||
+
|
||||
+static void request_input(const char *service_id,
|
||||
+ GHashTable *request, gpointer request_data, gpointer user_data)
|
||||
+{
|
||||
+ request_input_dialog(request, request_data);
|
||||
+}
|
||||
+
|
||||
+static gboolean cancel_request(DBusGMethodInvocation *context,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ if( input_data_inst ) {
|
||||
+ connman_agent_request_input_abort(input_data_inst->request_data);
|
||||
+
|
||||
+ input_free(input_data_inst);
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+int setup_agents(void)
|
||||
+{
|
||||
+ ConnmanAgent *agent = connman_agent_new();
|
||||
+ connman_agent_setup(agent, "/org/gnome/connman/applet");
|
||||
+
|
||||
+ connman_agent_set_request_input_func(agent, request_input, agent);
|
||||
+ connman_agent_set_cancel_func(agent, cancel_request, agent);
|
||||
+
|
||||
+ connman_agent_register(agent);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+void cleanup_agents(void)
|
||||
+{
|
||||
+}
|
||||
diff --git a/applet/agent.h b/applet/agent.h
|
||||
new file mode 100644
|
||||
index 0000000..d85676b
|
||||
--- /dev/null
|
||||
+++ b/applet/agent.h
|
||||
@@ -0,0 +1,29 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Connection Manager
|
||||
+ *
|
||||
+ * Agent implementation based on code from bluez-gnome
|
||||
+ *
|
||||
+ * Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org>
|
||||
+ * Copyright (C) 2006-2007 Bastien Nocera <hadess@hadess.net>
|
||||
+ * 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 as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * 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 St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+int setup_agents(void);
|
||||
+void cleanup_agents(void);
|
||||
diff --git a/applet/main.c b/applet/main.c
|
||||
index 68a77b1..d06ce60 100644
|
||||
--- a/applet/main.c
|
||||
+++ b/applet/main.c
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "properties.h"
|
||||
#include "status.h"
|
||||
+#include "agent.h"
|
||||
|
||||
static gboolean global_ready = FALSE;
|
||||
static gint global_strength = -1;
|
||||
@@ -132,6 +133,7 @@ static void manager_init(DBusGConnection *connection)
|
||||
"/", "net.connman.Manager");
|
||||
|
||||
properties_create(manager, manager_property_changed, NULL);
|
||||
+ setup_agents();
|
||||
}
|
||||
|
||||
static void manager_cleanup(void)
|
||||
@@ -148,6 +150,7 @@ static void name_owner_changed(DBusGProxy *proxy, const char *name,
|
||||
if (*new != '\0') {
|
||||
status_offline();
|
||||
properties_enable(manager);
|
||||
+ setup_agents();
|
||||
} else {
|
||||
properties_disable(manager);
|
||||
status_unavailable();
|
||||
diff --git a/common/Makefile.am b/common/Makefile.am
|
||||
index ef1267a..5bfff19 100644
|
||||
--- a/common/Makefile.am
|
||||
+++ b/common/Makefile.am
|
||||
@@ -3,19 +3,21 @@ noinst_LIBRARIES = libcommon.a
|
||||
|
||||
libcommon_a_SOURCES = connman-dbus.c connman-dbus.h connman-dbus-glue.h \
|
||||
connman-client.h connman-client.c \
|
||||
- instance.h instance.c
|
||||
+ instance.h instance.c \
|
||||
+ connman-agent.h connman-agent.c
|
||||
|
||||
BUILT_SOURCES = marshal.h marshal.c \
|
||||
connman-dbus-glue.h \
|
||||
- instance-glue.h
|
||||
+ instance-glue.h \
|
||||
+ connman-agent-glue.h
|
||||
|
||||
-nodist_libcommon_a_SOURCES = connman-dbus-glue.h instance-glue.h
|
||||
+nodist_libcommon_a_SOURCES = connman-dbus-glue.h instance-glue.h connman-agent-glue.h
|
||||
|
||||
CLEANFILES = $(BUILT_SOURCES)
|
||||
|
||||
AM_CFLAGS = @DBUS_CFLAGS@ @GTK_CFLAGS@
|
||||
|
||||
-EXTRA_DIST = marshal.list instance.xml connman-dbus.xml
|
||||
+EXTRA_DIST = marshal.list instance.xml connman-dbus.xml connman-agent.xml
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
@@ -30,3 +32,6 @@ instance-glue.h: instance.xml
|
||||
|
||||
connman-dbus-glue.h: connman-dbus.xml
|
||||
$(DBUS_BINDING_TOOL) --prefix=connman --mode=glib-client --output=$@ $<
|
||||
+
|
||||
+connman-agent-glue.h: connman-agent.xml
|
||||
+ $(DBUS_BINDING_TOOL) --prefix=connman_agent --mode=glib-server --output=$@ $<
|
||||
diff --git a/common/connman-agent.c b/common/connman-agent.c
|
||||
new file mode 100644
|
||||
index 0000000..769bf27
|
||||
--- /dev/null
|
||||
+++ b/common/connman-agent.c
|
||||
@@ -0,0 +1,426 @@
|
||||
+/*
|
||||
+ * Connection Manager Agent implementation
|
||||
+ *
|
||||
+ * Author(s):
|
||||
+ * - Julien MASSOT <jmassot@aldebaran-robotics.com>
|
||||
+ * - Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Aldebaran Robotics
|
||||
+ * Copyright (C) 2012 Intel Corporation
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License version 2.1 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This library 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
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ */
|
||||
+
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+#include <dbus/dbus-glib-lowlevel.h>
|
||||
+#include <stdio.h>
|
||||
+
|
||||
+#include "connman-agent.h"
|
||||
+#include "connman-dbus.h"
|
||||
+
|
||||
+#define CONNMAN_AGENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgentPrivate))
|
||||
+
|
||||
+typedef enum {
|
||||
+ AGENT_ERROR_REJECT,
|
||||
+ AGENT_ERROR_RETRY
|
||||
+} AgentError;
|
||||
+
|
||||
+#define AGENT_ERROR (agent_error_quark())
|
||||
+
|
||||
+#define AGENT_ERROR_TYPE (agent_error_get_type())
|
||||
+
|
||||
+static GQuark agent_error_quark(void)
|
||||
+{
|
||||
+ static GQuark quark = 0;
|
||||
+ if (!quark)
|
||||
+ quark = g_quark_from_static_string("Agent");
|
||||
+
|
||||
+ return quark;
|
||||
+}
|
||||
+
|
||||
+#define ENUM_ENTRY(NAME, DESC) { NAME, "" #NAME "", DESC }
|
||||
+
|
||||
+static GType agent_error_get_type(void)
|
||||
+{
|
||||
+ static GType etype = 0;
|
||||
+ if (etype == 0) {
|
||||
+ static const GEnumValue values[] = {
|
||||
+ ENUM_ENTRY(AGENT_ERROR_REJECT, "Rejected"),
|
||||
+ ENUM_ENTRY(AGENT_ERROR_RETRY, "Retry"),
|
||||
+ { 0, 0, 0 }
|
||||
+ };
|
||||
+
|
||||
+ etype = g_enum_register_static("Agent", values);
|
||||
+ }
|
||||
+
|
||||
+ return etype;
|
||||
+}
|
||||
+
|
||||
+typedef struct _ConnmanAgentPrivate ConnmanAgentPrivate;
|
||||
+
|
||||
+typedef struct _PendingRequest PendingRequest;
|
||||
+
|
||||
+struct _PendingRequest {
|
||||
+ DBusGMethodInvocation *context;
|
||||
+ ConnmanAgent *agent;
|
||||
+};
|
||||
+
|
||||
+struct _ConnmanAgentPrivate {
|
||||
+ gchar *busname;
|
||||
+ gchar *path;
|
||||
+ DBusGConnection *connection;
|
||||
+ DBusGProxy *connman_proxy;
|
||||
+
|
||||
+ ConnmanAgentRequestInputFunc input_func;
|
||||
+ gpointer input_data;
|
||||
+
|
||||
+ ConnmanAgentCancelFunc cancel_func;
|
||||
+ gpointer cancel_data;
|
||||
+
|
||||
+ ConnmanAgentReleaseFunc release_func;
|
||||
+ gpointer release_data;
|
||||
+
|
||||
+ ConnmanAgentDebugFunc debug_func;
|
||||
+ gpointer debug_data;
|
||||
+
|
||||
+};
|
||||
+
|
||||
+G_DEFINE_TYPE(ConnmanAgent, connman_agent, G_TYPE_OBJECT)
|
||||
+
|
||||
+static inline void debug(ConnmanAgent *agent, const char *format, ...)
|
||||
+{
|
||||
+ char str[256];
|
||||
+ va_list ap;
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ if (priv->debug_func == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ va_start(ap, format);
|
||||
+
|
||||
+ if (vsnprintf(str, sizeof(str), format, ap) > 0)
|
||||
+ priv->debug_func(str, priv->debug_data);
|
||||
+
|
||||
+ va_end(ap);
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_request_input_set_reply(gpointer request_data, GHashTable *reply)
|
||||
+{
|
||||
+ PendingRequest *pendingrequest = request_data;
|
||||
+
|
||||
+ if (request_data == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dbus_g_method_return(pendingrequest->context, reply);
|
||||
+
|
||||
+ g_free(pendingrequest);
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_request_input_abort(gpointer request_data)
|
||||
+{
|
||||
+ PendingRequest *pendingrequest = request_data;
|
||||
+ GError *result;
|
||||
+ if (request_data == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ result = g_error_new(AGENT_ERROR, AGENT_ERROR_REJECT,
|
||||
+ "Input request rejected");
|
||||
+ dbus_g_method_return_error(pendingrequest->context, result);
|
||||
+ g_clear_error(&result);
|
||||
+ g_free(pendingrequest);
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+static gboolean connman_agent_request_input_cb(const GHashTable *reply, gpointer user_data)
|
||||
+{
|
||||
+
|
||||
+ PendingRequest *pendingrequest = user_data;
|
||||
+
|
||||
+ dbus_g_method_return(pendingrequest->context, reply);
|
||||
+
|
||||
+ g_free(pendingrequest);
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_report_error(ConnmanAgent *agent,
|
||||
+ const char *path, const char *error,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ GError *result;
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ debug(agent, "connection %s, reports an error: %s", path, error);
|
||||
+ result = g_error_new(AGENT_ERROR, AGENT_ERROR_RETRY,
|
||||
+ "Retry");
|
||||
+ dbus_g_method_return_error(context, result);
|
||||
+ g_clear_error(&result);
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_request_input(ConnmanAgent *agent,
|
||||
+ const char *path, GHashTable *fields,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ const char *sender = dbus_g_method_get_sender(context);
|
||||
+ char *name = NULL, *type = NULL;
|
||||
+ char **id = NULL;
|
||||
+ PendingRequest *pendingrequest = NULL;
|
||||
+
|
||||
+ debug(agent, "request %s, sender %s", path, sender);
|
||||
+
|
||||
+ if (fields == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ if (priv->input_func != NULL) {
|
||||
+ id = g_strsplit(path, "/net/connman/service/", 2);
|
||||
+ if (g_strv_length(id) == 2) {
|
||||
+ pendingrequest = g_try_new0(PendingRequest, 1);
|
||||
+ pendingrequest->context = context;
|
||||
+ pendingrequest->agent = agent;
|
||||
+ priv->input_func(id[1], fields, pendingrequest, priv->input_data);
|
||||
+ }
|
||||
+ g_strfreev(id);
|
||||
+ }
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_cancel(ConnmanAgent *agent,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ const char *sender = dbus_g_method_get_sender(context);
|
||||
+ gboolean result = FALSE;
|
||||
+
|
||||
+ debug(agent, "Request Canceled %s", sender);
|
||||
+
|
||||
+ if (g_str_equal(sender, priv->busname) == FALSE)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ if (priv->cancel_func)
|
||||
+ result = priv->cancel_func(context, priv->cancel_data);
|
||||
+
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_release(ConnmanAgent *agent,
|
||||
+ DBusGMethodInvocation *context)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ const char *sender = dbus_g_method_get_sender(context);
|
||||
+
|
||||
+ debug(agent, "agent %p sender %s", agent, sender);
|
||||
+
|
||||
+ if (g_str_equal(sender, priv->busname) == FALSE)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dbus_g_method_return(context);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+#include "connman-agent-glue.h"
|
||||
+
|
||||
+static void connman_agent_init(ConnmanAgent *agent)
|
||||
+{
|
||||
+ debug(agent, "agent %p", agent);
|
||||
+}
|
||||
+
|
||||
+static void connman_agent_finalize(GObject *agent)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ if (priv->connman_proxy != NULL) {
|
||||
+ g_object_unref(priv->connman_proxy);
|
||||
+ }
|
||||
+
|
||||
+ g_free(priv->path);
|
||||
+ g_free(priv->busname);
|
||||
+ dbus_g_connection_unref(priv->connection);
|
||||
+
|
||||
+ G_OBJECT_CLASS(connman_agent_parent_class)->finalize(agent);
|
||||
+}
|
||||
+
|
||||
+static void connman_agent_class_init(ConnmanAgentClass *klass)
|
||||
+{
|
||||
+ GObjectClass *object_class = (GObjectClass *) klass;
|
||||
+
|
||||
+ g_type_class_add_private(klass, sizeof(ConnmanAgentPrivate));
|
||||
+
|
||||
+ object_class->finalize = connman_agent_finalize;
|
||||
+
|
||||
+ dbus_g_object_type_install_info(CONNMAN_TYPE_AGENT,
|
||||
+ &dbus_glib_connman_agent_object_info);
|
||||
+}
|
||||
+
|
||||
+ConnmanAgent *connman_agent_new(void)
|
||||
+{
|
||||
+ ConnmanAgent *agent;
|
||||
+ g_type_init();
|
||||
+
|
||||
+ agent = CONNMAN_AGENT(g_object_new(CONNMAN_TYPE_AGENT, NULL));
|
||||
+
|
||||
+ return agent;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_setup(ConnmanAgent *agent, const char *path)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ DBusGProxy *proxy;
|
||||
+ GObject *object;
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ debug(agent, "agent_setup %p", agent);
|
||||
+
|
||||
+ if (priv->path != NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ priv->path = g_strdup(path);
|
||||
+ priv->connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
|
||||
+ if (error != NULL) {
|
||||
+ g_printerr("Connecting to system bus failed: %s\n",
|
||||
+ error->message);
|
||||
+ g_error_free(error);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ proxy = dbus_g_proxy_new_for_name_owner(priv->connection, CONNMAN_SERVICE,
|
||||
+ CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE, NULL);
|
||||
+
|
||||
+ g_free(priv->busname);
|
||||
+
|
||||
+ if (proxy != NULL) {
|
||||
+ priv->busname = g_strdup(dbus_g_proxy_get_bus_name(proxy));
|
||||
+ g_object_unref(proxy);
|
||||
+ } else
|
||||
+ priv->busname = NULL;
|
||||
+
|
||||
+ object = dbus_g_connection_lookup_g_object(priv->connection, priv->path);
|
||||
+ if (object != NULL)
|
||||
+ g_object_unref(object);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+gboolean connman_agent_register(ConnmanAgent *agent)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ DBusGProxy *proxy;
|
||||
+ GObject *object;
|
||||
+ GError *error = NULL;
|
||||
+ gchar *path;
|
||||
+
|
||||
+ debug(agent, "register agent %p", agent);
|
||||
+
|
||||
+ if (priv->connman_proxy != NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ priv->connman_proxy = dbus_g_proxy_new_for_name_owner(priv->connection, CONNMAN_SERVICE,
|
||||
+ CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE, NULL);
|
||||
+
|
||||
+ g_free(priv->busname);
|
||||
+
|
||||
+ priv->busname = g_strdup(dbus_g_proxy_get_bus_name(priv->connman_proxy));
|
||||
+
|
||||
+ object = dbus_g_connection_lookup_g_object(priv->connection, priv->path);
|
||||
+ if (object != NULL)
|
||||
+ g_object_unref(object);
|
||||
+
|
||||
+ dbus_g_connection_register_g_object(priv->connection,
|
||||
+ priv->path, G_OBJECT(agent));
|
||||
+
|
||||
+ dbus_g_proxy_call(priv->connman_proxy, "RegisterAgent", &error,
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, priv->path,
|
||||
+ G_TYPE_INVALID, G_TYPE_INVALID);
|
||||
+
|
||||
+ if (error != NULL) {
|
||||
+ g_printerr("Agent registration failed: %s\n",
|
||||
+ error->message);
|
||||
+ g_error_free(error);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+gboolean connman_agent_unregister(ConnmanAgent *agent)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ debug(agent, "unregister agent %p", agent);
|
||||
+
|
||||
+ if (priv->connman_proxy == NULL)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ dbus_g_proxy_call(priv->connman_proxy, "UnregisterAgent", &error,
|
||||
+ DBUS_TYPE_G_OBJECT_PATH, priv->path,
|
||||
+ G_TYPE_INVALID, G_TYPE_INVALID);
|
||||
+
|
||||
+ if (error != NULL) {
|
||||
+ g_printerr("Agent unregistration failed: %s\n",
|
||||
+ error->message);
|
||||
+ g_error_free(error);
|
||||
+ }
|
||||
+
|
||||
+ g_object_unref(priv->connman_proxy);
|
||||
+ priv->connman_proxy = NULL;
|
||||
+
|
||||
+ g_free(priv->path);
|
||||
+ priv->path = NULL;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_request_input_func(ConnmanAgent *agent,
|
||||
+ ConnmanAgentRequestInputFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->input_func = func;
|
||||
+ priv->input_data = data;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_cancel_func(ConnmanAgent *agent,
|
||||
+ ConnmanAgentCancelFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->cancel_func = func;
|
||||
+ priv->cancel_data = data;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_release_func(ConnmanAgent *agent,
|
||||
+ ConnmanAgentReleaseFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->release_func = func;
|
||||
+ priv->release_data = data;
|
||||
+}
|
||||
+
|
||||
+void connman_agent_set_debug_func(ConnmanAgent *agent, ConnmanAgentDebugFunc func, gpointer data)
|
||||
+{
|
||||
+ ConnmanAgentPrivate *priv = CONNMAN_AGENT_GET_PRIVATE(agent);
|
||||
+
|
||||
+ priv->debug_func = func;
|
||||
+ priv->debug_data = data;
|
||||
+}
|
||||
diff --git a/common/connman-agent.h b/common/connman-agent.h
|
||||
new file mode 100644
|
||||
index 0000000..0a1aa92
|
||||
--- /dev/null
|
||||
+++ b/common/connman-agent.h
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * Connection Manager Agent implementation
|
||||
+ *
|
||||
+ * Author(s):
|
||||
+ * - Julien MASSOT <jmassot@aldebaran-robotics.com>
|
||||
+ * - Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
+ *
|
||||
+ * Copyright (C) 2012 Aldebaran Robotics
|
||||
+ * Copyright (C) 2012 Intel Corporation
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License version 2.1 as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This library 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
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ */
|
||||
+
|
||||
+#ifndef CONNMAN_AGENT_H_
|
||||
+# define CONNMAN_AGENT_H_
|
||||
+
|
||||
+#include <glib-object.h>
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+
|
||||
+G_BEGIN_DECLS
|
||||
+
|
||||
+#define CONNMAN_TYPE_AGENT (connman_agent_get_type())
|
||||
+#define CONNMAN_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgent))
|
||||
+#define CONNMAN_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgentClass))
|
||||
+#define CONNMAN_IS_AGENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
+ CONNMAN_TYPE_AGENT))
|
||||
+#define CONNMAN_IS_AGENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), \
|
||||
+ CONNMAN_TYPE_AGENT))
|
||||
+#define CONNMAN_GET_AGENT_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), \
|
||||
+ CONNMAN_TYPE_AGENT, ConnmanAgentClass))
|
||||
+
|
||||
+typedef struct _ConnmanAgent ConnmanAgent;
|
||||
+typedef struct _ConnmanAgentClass ConnmanAgentClass;
|
||||
+
|
||||
+struct _ConnmanAgent {
|
||||
+ GObject parent;
|
||||
+};
|
||||
+
|
||||
+struct _ConnmanAgentClass {
|
||||
+ GObjectClass parent_class;
|
||||
+};
|
||||
+
|
||||
+GType connman_agent_get_type(void);
|
||||
+
|
||||
+ConnmanAgent *connman_agent_new(void);
|
||||
+
|
||||
+gboolean connman_agent_setup(ConnmanAgent *agent, const char *path);
|
||||
+
|
||||
+gboolean connman_agent_register(ConnmanAgent *agent);
|
||||
+gboolean connman_agent_unregister(ConnmanAgent *agent);
|
||||
+gboolean connman_agent_request_input_set_reply(gpointer request_data, GHashTable *reply);
|
||||
+gboolean connman_agent_request_input_abort(gpointer request_data);
|
||||
+
|
||||
+typedef void (*ConnmanAgentRequestInputFunc) (const char *service_id, GHashTable *request, gpointer request_data, gpointer user_data);
|
||||
+typedef gboolean (*ConnmanAgentCancelFunc) (DBusGMethodInvocation *context, gpointer data);
|
||||
+typedef gboolean (*ConnmanAgentReleaseFunc) (DBusGMethodInvocation *context, gpointer data);
|
||||
+typedef void (*ConnmanAgentDebugFunc) (const char *str, gpointer user_data);
|
||||
+
|
||||
+void connman_agent_set_request_input_func(ConnmanAgent *agent, ConnmanAgentRequestInputFunc func, gpointer data);
|
||||
+void connman_agent_set_cancel_func(ConnmanAgent *agent, ConnmanAgentCancelFunc func, gpointer data);
|
||||
+void connman_agent_set_debug_func(ConnmanAgent *agent, ConnmanAgentDebugFunc func, gpointer data);
|
||||
+
|
||||
+G_END_DECLS
|
||||
+#endif /* !CONNMAN_AGENT_H_ */
|
||||
diff --git a/common/connman-agent.xml b/common/connman-agent.xml
|
||||
new file mode 100644
|
||||
index 0000000..ed9ee8b
|
||||
--- /dev/null
|
||||
+++ b/common/connman-agent.xml
|
||||
@@ -0,0 +1,26 @@
|
||||
+<?xml version="1.0" encoding="UTF-8" ?>
|
||||
+
|
||||
+<node name="/net/connman/Agent">
|
||||
+ <interface name="net.connman.Agent">
|
||||
+ <method name="ReportError">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
|
||||
+ <arg type="o" direction="in"/>
|
||||
+ <arg type="s" direction="in"/>
|
||||
+ </method>
|
||||
+
|
||||
+ <method name="RequestInput">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value="true"/>
|
||||
+ <arg type="o" direction="in"/>
|
||||
+ <arg type="a{sv}" direction="in"/>
|
||||
+ <arg type="a{sv}" direction="out"/>
|
||||
+ </method>
|
||||
+
|
||||
+ <method name="Cancel">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
|
||||
+ </method>
|
||||
+
|
||||
+ <method name="Release">
|
||||
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
|
||||
+ </method>
|
||||
+ </interface>
|
||||
+</node>
|
||||
diff --git a/common/marshal.list b/common/marshal.list
|
||||
index 8b174d0..3c6317b 100644
|
||||
--- a/common/marshal.list
|
||||
+++ b/common/marshal.list
|
||||
@@ -1,3 +1,5 @@
|
||||
VOID:STRING,BOXED
|
||||
+VOID:OBJECT,BOXED
|
||||
+VOID:OBJECT
|
||||
VOID:BOXED
|
||||
VOID:STRING
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
From f24d6e26f81e205769cecf0dae7e6cf90b23f9e9 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <f24d6e26f81e205769cecf0dae7e6cf90b23f9e9.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 02:37:55 +0100
|
||||
Subject: [PATCH 5/6] Remove all handling of Passphrase property
|
||||
|
||||
Services no longer have a Passphrase property in ConnMan 0.79 -
|
||||
credentials are handled entirely through the agent.
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-client.c | 51 -----------------------------------------------
|
||||
common/connman-client.h | 4 ---
|
||||
common/connman-dbus.c | 11 +---------
|
||||
properties/advanced.h | 1 -
|
||||
properties/wifi.c | 48 --------------------------------------------
|
||||
5 files changed, 1 insertions(+), 114 deletions(-)
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index e4441ad..dec9867 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -112,7 +112,6 @@ static void connman_client_init(ConnmanClient *client)
|
||||
G_TYPE_BOOLEAN, /* favorite */
|
||||
G_TYPE_UINT, /* strength */
|
||||
G_TYPE_STRING, /* security */
|
||||
- G_TYPE_STRING, /* passphrase */
|
||||
G_TYPE_STRING, /* method */
|
||||
G_TYPE_STRING, /* address */
|
||||
G_TYPE_STRING, /* netmask */
|
||||
@@ -501,56 +500,6 @@ gchar *connman_client_get_security(ConnmanClient *client, const gchar *network)
|
||||
return security;
|
||||
}
|
||||
|
||||
-gchar *connman_client_get_passphrase(ConnmanClient *client, const gchar *network)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- GtkTreeIter iter;
|
||||
- gchar *passphrase;
|
||||
-
|
||||
- DBG("client %p", client);
|
||||
-
|
||||
- if (network == NULL)
|
||||
- return NULL;
|
||||
-
|
||||
- if (connman_dbus_get_iter(priv->store, network, &iter) == FALSE)
|
||||
- return NULL;
|
||||
-
|
||||
- gtk_tree_model_get(GTK_TREE_MODEL(priv->store), &iter,
|
||||
- CONNMAN_COLUMN_PASSPHRASE, &passphrase, -1);
|
||||
-
|
||||
- return passphrase;
|
||||
-}
|
||||
-
|
||||
-gboolean connman_client_set_passphrase(ConnmanClient *client, const gchar *network,
|
||||
- const gchar *passphrase)
|
||||
-{
|
||||
- ConnmanClientPrivate *priv = CONNMAN_CLIENT_GET_PRIVATE(client);
|
||||
- DBusGProxy *proxy;
|
||||
- GValue value = { 0 };
|
||||
- gboolean ret = FALSE;
|
||||
-
|
||||
- DBG("client %p", client);
|
||||
-
|
||||
- if (network == NULL)
|
||||
- goto done;
|
||||
-
|
||||
- proxy = connman_dbus_get_proxy(priv->store, network);
|
||||
- if (proxy == NULL)
|
||||
- goto done;
|
||||
-
|
||||
- g_value_init(&value, G_TYPE_STRING);
|
||||
- g_value_set_string(&value, passphrase);
|
||||
-
|
||||
- ret = connman_set_property(proxy, "Passphrase", &value, NULL);
|
||||
-
|
||||
- g_value_unset(&value);
|
||||
-
|
||||
- g_object_unref(proxy);
|
||||
-
|
||||
-done:
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
void connman_client_set_callback(ConnmanClient *client,
|
||||
ConnmanClientCallback callback, gpointer user_data)
|
||||
{
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 6fe772c..bb36a2f 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -77,9 +77,6 @@ void connman_client_disconnect(ConnmanClient *client, const gchar *network);
|
||||
gchar *connman_client_get_security(ConnmanClient *client, const gchar *network);
|
||||
void connman_client_connect_async(ConnmanClient *client, const gchar *network,
|
||||
connman_connect_reply callback, gpointer userdata);
|
||||
-gchar *connman_client_get_passphrase(ConnmanClient *client, const gchar *network);
|
||||
-gboolean connman_client_set_passphrase(ConnmanClient *client, const gchar *network,
|
||||
- const gchar *passphrase);
|
||||
void connman_client_set_remember(ConnmanClient *client, const gchar *network,
|
||||
gboolean remember);
|
||||
|
||||
@@ -108,7 +105,6 @@ enum {
|
||||
CONNMAN_COLUMN_FAVORITE, /* G_TYPE_BOOLEAN */
|
||||
CONNMAN_COLUMN_STRENGTH, /* G_TYPE_UINT */
|
||||
CONNMAN_COLUMN_SECURITY, /* G_TYPE_STRING */
|
||||
- CONNMAN_COLUMN_PASSPHRASE, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_METHOD, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_ADDRESS, /* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_NETMASK, /* G_TYPE_STRING */
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 4eb77b6..f46a750 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -389,11 +389,6 @@ static void service_changed(DBusGProxy *proxy, const char *property,
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_SECURITY, security,
|
||||
-1);
|
||||
- } else if (g_str_equal(property, "PassPhrase") == TRUE) {
|
||||
- const char *passphrase = value ? g_value_get_string(value) : NULL;
|
||||
- gtk_tree_store_set(store, &iter,
|
||||
- CONNMAN_COLUMN_PASSPHRASE, passphrase,
|
||||
- -1);
|
||||
} else if (g_str_equal(property, "Strength") == TRUE) {
|
||||
guint strength = g_value_get_uchar(value);
|
||||
gtk_tree_store_set(store, &iter,
|
||||
@@ -406,7 +401,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
{
|
||||
GtkTreeStore *store = user_data;
|
||||
GValue *value;
|
||||
- const gchar *name, *icon, *passphrase, *security, *state;
|
||||
+ const gchar *name, *icon, *security, *state;
|
||||
guint type, strength;
|
||||
gboolean favorite;
|
||||
GtkTreeIter iter;
|
||||
@@ -439,9 +434,6 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
value = g_hash_table_lookup(hash, "Security");
|
||||
security = value ? g_strjoinv(" ", g_value_get_boxed(value)) : NULL;
|
||||
|
||||
- value = g_hash_table_lookup(hash, "PassPhrase");
|
||||
- passphrase = value ? g_value_get_string(value) : NULL;
|
||||
-
|
||||
DBG("name %s type %d icon %s", name, type, icon);
|
||||
|
||||
value = g_hash_table_lookup(hash, "IPv4.Configuration");
|
||||
@@ -499,7 +491,6 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
CONNMAN_COLUMN_STATE, state,
|
||||
CONNMAN_COLUMN_FAVORITE, favorite,
|
||||
CONNMAN_COLUMN_SECURITY, security,
|
||||
- CONNMAN_COLUMN_PASSPHRASE, passphrase,
|
||||
CONNMAN_COLUMN_STRENGTH, strength,
|
||||
CONNMAN_COLUMN_METHOD, method,
|
||||
CONNMAN_COLUMN_ADDRESS, addr,
|
||||
diff --git a/properties/advanced.h b/properties/advanced.h
|
||||
index d8f4117..553a15e 100644
|
||||
--- a/properties/advanced.h
|
||||
+++ b/properties/advanced.h
|
||||
@@ -53,7 +53,6 @@ struct config_data {
|
||||
GtkWidget *name;
|
||||
GtkWidget *security;
|
||||
GtkWidget *strength;
|
||||
- GtkWidget *passphrase;
|
||||
GtkWidget *connect_info;
|
||||
GtkWidget *connect;
|
||||
GtkWidget *disconnect;
|
||||
diff --git a/properties/wifi.c b/properties/wifi.c
|
||||
index 038d35a..bd325ef 100644
|
||||
--- a/properties/wifi.c
|
||||
+++ b/properties/wifi.c
|
||||
@@ -57,17 +57,6 @@ static void connect_callback(GtkWidget *editable, gpointer user_data)
|
||||
gboolean ret;
|
||||
gint active;
|
||||
|
||||
- if (data->wifi.passphrase) {
|
||||
- char *passphrase;
|
||||
- passphrase = (gchar *)gtk_entry_get_text(GTK_ENTRY(data->wifi.passphrase));
|
||||
- ret = connman_client_set_passphrase(data->client, data->device,
|
||||
- passphrase);
|
||||
-
|
||||
- if (ret == FALSE) {
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
active = gtk_combo_box_get_active(GTK_COMBO_BOX(data->policy.config));
|
||||
data->ipv4_config.method = active ? "manual" : "dhcp";
|
||||
data->ipv4_config.address = active ? gtk_entry_get_text(GTK_ENTRY(data->ipv4.entry[0])) : NULL;
|
||||
@@ -250,22 +239,11 @@ static void wifi_ipconfig(GtkWidget *table, struct config_data *data, GtkTreeIte
|
||||
G_CALLBACK(changed_callback), data);
|
||||
}
|
||||
|
||||
-static void toggled_callback(GtkWidget *button, gpointer user_data)
|
||||
-{
|
||||
- GtkWidget *entry = user_data;
|
||||
- gboolean mode;
|
||||
-
|
||||
- mode = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
|
||||
-
|
||||
- gtk_entry_set_visibility(GTK_ENTRY(entry), mode);
|
||||
-}
|
||||
-
|
||||
void add_wifi_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data)
|
||||
{
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
- GtkWidget *entry;
|
||||
GtkWidget *button;
|
||||
|
||||
const char *name, *security, *icon, *state;
|
||||
@@ -308,32 +286,6 @@ void add_wifi_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
data->wifi.security = label;
|
||||
|
||||
- label = gtk_label_new(_("Passphrase:"));
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), label, 1, 2, 2, 3);
|
||||
-
|
||||
- if (g_str_equal(security, "none") != TRUE &&
|
||||
- g_str_equal(security, "unknown") != TRUE) {
|
||||
- entry = gtk_entry_new();
|
||||
- gtk_entry_set_max_length (GTK_ENTRY (entry), 64);
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), entry, 2, 4, 2, 3);
|
||||
- gtk_entry_set_visibility(GTK_ENTRY(entry), 0);
|
||||
- data->wifi.passphrase = entry;
|
||||
-
|
||||
- button = gtk_check_button_new_with_label(_("Show input"));
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), button, 4, 5, 2, 3);
|
||||
-
|
||||
- g_signal_connect(G_OBJECT(button), "toggled",
|
||||
- G_CALLBACK(toggled_callback), entry);
|
||||
-
|
||||
-
|
||||
- } else {
|
||||
- label = gtk_label_new(_("none"));
|
||||
- gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 4, 2, 3);
|
||||
- gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
|
||||
- gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
- data->wifi.passphrase = NULL;
|
||||
- }
|
||||
-
|
||||
label = gtk_label_new(_(""));
|
||||
gtk_table_attach_defaults(GTK_TABLE(table), label, 2, 3, 8, 9);
|
||||
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From ce510179cba98c906974bdbd6bda2b586b6058c1 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <ce510179cba98c906974bdbd6bda2b586b6058c1.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
In-Reply-To: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
References: <cover.1334369310.git.paul.eggleton@linux.intel.com>
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Sat, 14 Apr 2012 02:39:15 +0100
|
||||
Subject: [PATCH 6/6] Fix status descriptions in properties tree
|
||||
|
||||
* configurating -> configuring
|
||||
* connnected -> connected
|
||||
* Use i18n wrappers
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
properties/main.c | 6 +++---
|
||||
1 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index e266f03..c05f443 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -332,12 +332,12 @@ static void device_to_text(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
/* Show the AP name */
|
||||
title = N_(name);
|
||||
if (g_str_equal(state, "association") == TRUE)
|
||||
- state = "associating...";
|
||||
+ state = _("associating...");
|
||||
else if (g_str_equal(state, "configuration") == TRUE)
|
||||
- state = "configurating...";
|
||||
+ state = _("configuring...");
|
||||
else if (g_str_equal(state, "ready") == TRUE ||
|
||||
g_str_equal(state, "online") == TRUE)
|
||||
- state = "connnected";
|
||||
+ state = _("connected");
|
||||
else
|
||||
state = "";
|
||||
markup = g_strdup_printf(" %s\n %s", title, state);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 7225bf8e8e9bee42d7d7d02ba754b9fb30a877b6 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Mon, 16 Apr 2012 19:15:35 +0100
|
||||
Subject: [PATCH] connman-gnome: fix segfault due to unchecked null value
|
||||
|
||||
If value is NULL here we should not pass it to g_value_get_boxed().
|
||||
|
||||
Upstream-Status: Submitted
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
---
|
||||
common/connman-dbus.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 33ac623..822fc98 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -437,7 +437,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
DBG("name %s type %d icon %s", name, type, icon);
|
||||
|
||||
value = g_hash_table_lookup(hash, "IPv4.Configuration");
|
||||
- ipv4 = g_value_get_boxed (value);
|
||||
+ ipv4 = value ? g_value_get_boxed (value) : NULL;
|
||||
|
||||
if (!ipv4)
|
||||
goto done;
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -1,507 +0,0 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
commit 15852e826b0b47f577718ada4b68b63515387f4d
|
||||
Author: dongxiao <dongxiao@dongxiao-osel.(none)>
|
||||
Date: Wed Jun 1 14:56:16 2011 +0800
|
||||
|
||||
connman-gnome: Add cellular network config option.
|
||||
|
||||
Add cellular network config option in connman-gnome.
|
||||
|
||||
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
|
||||
|
||||
diff --git a/common/connman-client.c b/common/connman-client.c
|
||||
index e907cc2..d6be363 100644
|
||||
--- a/common/connman-client.c
|
||||
+++ b/common/connman-client.c
|
||||
@@ -112,9 +112,10 @@ static void connman_client_init(ConnmanClient *client)
|
||||
G_TYPE_STRING, /* address */
|
||||
G_TYPE_STRING, /* netmask */
|
||||
G_TYPE_STRING, /* gateway */
|
||||
- G_TYPE_BOOLEAN, /* gateway */
|
||||
- G_TYPE_BOOLEAN, /* gateway */
|
||||
- G_TYPE_BOOLEAN);/* gateway */
|
||||
+ G_TYPE_BOOLEAN, /* ethernet enabled */
|
||||
+ G_TYPE_BOOLEAN, /* wifi enabled */
|
||||
+ G_TYPE_BOOLEAN, /* cellular enabled */
|
||||
+ G_TYPE_BOOLEAN);/* offline */
|
||||
|
||||
g_object_set_data(G_OBJECT(priv->store),
|
||||
"State", g_strdup("unavailable"));
|
||||
@@ -218,6 +219,7 @@ static gboolean device_filter(GtkTreeModel *model,
|
||||
switch (type) {
|
||||
case CONNMAN_TYPE_LABEL_ETHERNET:
|
||||
case CONNMAN_TYPE_LABEL_WIFI:
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
case CONNMAN_TYPE_SYSCONFIG:
|
||||
return TRUE;
|
||||
}
|
||||
diff --git a/common/connman-client.h b/common/connman-client.h
|
||||
index 37e86d0..15fa098 100644
|
||||
--- a/common/connman-client.h
|
||||
+++ b/common/connman-client.h
|
||||
@@ -117,6 +117,7 @@ enum {
|
||||
|
||||
CONNMAN_COLUMN_ETHERNET_ENABLED,/* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, /* G_TYPE_STRING */
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED,/* G_TYPE_STRING */
|
||||
CONNMAN_COLUMN_OFFLINEMODE, /* G_TYPE_STRING */
|
||||
|
||||
_CONNMAN_NUM_COLUMNS
|
||||
@@ -132,6 +133,7 @@ enum {
|
||||
|
||||
CONNMAN_TYPE_LABEL_ETHERNET,
|
||||
CONNMAN_TYPE_LABEL_WIFI,
|
||||
+ CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
CONNMAN_TYPE_SYSCONFIG,
|
||||
|
||||
_CONNMAN_NUM_TYPE,
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index b5a635c..0f4e1db 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -208,6 +208,8 @@ static const gchar *type2icon(guint type)
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
case CONNMAN_TYPE_WIMAX:
|
||||
return "network-wireless";
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
+ return "network-cellular";
|
||||
case CONNMAN_TYPE_BLUETOOTH:
|
||||
return "bluetooth";
|
||||
}
|
||||
@@ -220,6 +222,7 @@ static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
GtkTreeIter iter;
|
||||
gboolean ethernet_enabled_prev, ethernet_enabled = FALSE;
|
||||
gboolean wifi_enabled_prev, wifi_enabled = FALSE;
|
||||
+ gboolean cellular_enabled_prev, cellular_enabled = FALSE;
|
||||
gchar **tech = g_value_get_boxed (value);
|
||||
guint i;
|
||||
|
||||
@@ -227,10 +230,13 @@ static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
return;
|
||||
|
||||
for (i = 0; i < g_strv_length(tech); i++) {
|
||||
+ DBG("technology: %s", *(tech+i));
|
||||
if (g_str_equal("ethernet", *(tech + i)))
|
||||
ethernet_enabled = TRUE;
|
||||
else if (g_str_equal ("wifi", *(tech + i)))
|
||||
wifi_enabled = TRUE;
|
||||
+ else if (g_str_equal ("cellular", *(tech + i)))
|
||||
+ cellular_enabled = TRUE;
|
||||
}
|
||||
|
||||
get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET);
|
||||
@@ -246,6 +252,13 @@ static void enabled_technologies_changed(GtkTreeStore *store, GValue *value)
|
||||
if (wifi_enabled_prev != wifi_enabled)
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled, -1);
|
||||
+
|
||||
+ get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR);
|
||||
+ gtk_tree_model_get(GTK_TREE_MODEL(store), &iter,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled_prev, -1);
|
||||
+ if (cellular_enabled_prev != cellular_enabled)
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled, -1);
|
||||
}
|
||||
|
||||
static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *proxy, GValue *value)
|
||||
@@ -253,14 +266,18 @@ static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *pro
|
||||
GtkTreeIter iter;
|
||||
gboolean ethernet_enabled = FALSE;
|
||||
gboolean wifi_enabled = FALSE;
|
||||
+ gboolean cellular_enabled = FALSE;
|
||||
gchar **tech = g_value_get_boxed (value);
|
||||
guint i;
|
||||
|
||||
for (i = 0; i < g_strv_length (tech); i++) {
|
||||
+ DBG("technology: %s", *(tech+i));
|
||||
if (g_str_equal("ethernet", *(tech + i)))
|
||||
ethernet_enabled = TRUE;
|
||||
else if (g_str_equal ("wifi", *(tech + i)))
|
||||
wifi_enabled = TRUE;
|
||||
+ else if (g_str_equal ("cellular", *(tech + i)))
|
||||
+ cellular_enabled = TRUE;
|
||||
}
|
||||
|
||||
if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_ETHERNET) == FALSE)
|
||||
@@ -280,6 +297,15 @@ static void enabled_technologies_properties(GtkTreeStore *store, DBusGProxy *pro
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, wifi_enabled,
|
||||
CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_WIFI,
|
||||
-1);
|
||||
+
|
||||
+ if (get_iter_from_type(store, &iter, CONNMAN_TYPE_LABEL_CELLULAR) == FALSE)
|
||||
+ gtk_tree_store_append(store, &iter, NULL);
|
||||
+
|
||||
+ gtk_tree_store_set(store, &iter,
|
||||
+ CONNMAN_COLUMN_PROXY, proxy,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, cellular_enabled,
|
||||
+ CONNMAN_COLUMN_TYPE, CONNMAN_TYPE_LABEL_CELLULAR,
|
||||
+ -1);
|
||||
}
|
||||
|
||||
static void offline_mode_changed(GtkTreeStore *store, GValue *value)
|
||||
@@ -497,6 +523,9 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
label_type = CONNMAN_TYPE_LABEL_WIFI;
|
||||
break;
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
+ label_type = CONNMAN_TYPE_LABEL_CELLULAR;
|
||||
+ break;
|
||||
default:
|
||||
label_type = CONNMAN_TYPE_UNKNOWN;
|
||||
break;
|
||||
diff --git a/icons/connman-type-cellular.png b/icons/connman-type-cellular.png
|
||||
new file mode 100644
|
||||
index 0000000..386abd5
|
||||
Binary files /dev/null and b/icons/connman-type-cellular.png differ
|
||||
diff --git a/properties/Makefile.am b/properties/Makefile.am
|
||||
index fc1b8c6..30ae442 100644
|
||||
--- a/properties/Makefile.am
|
||||
+++ b/properties/Makefile.am
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
bin_PROGRAMS = connman-properties
|
||||
|
||||
-connman_properties_SOURCES = main.c advanced.h ethernet.c wifi.c
|
||||
+connman_properties_SOURCES = main.c advanced.h ethernet.c wifi.c cellular.c
|
||||
|
||||
connman_properties_LDADD = $(top_builddir)/common/libcommon.a \
|
||||
@GTK_LIBS@ @DBUS_LIBS@
|
||||
diff --git a/properties/advanced.h b/properties/advanced.h
|
||||
index 79a1c3c..d8f4117 100644
|
||||
--- a/properties/advanced.h
|
||||
+++ b/properties/advanced.h
|
||||
@@ -59,10 +59,18 @@ struct config_data {
|
||||
GtkWidget *disconnect;
|
||||
} wifi;
|
||||
|
||||
+ struct {
|
||||
+ GtkWidget *name;
|
||||
+ GtkWidget *strength;
|
||||
+ GtkWidget *connect_info;
|
||||
+ GtkWidget *connect;
|
||||
+ GtkWidget *disconnect;
|
||||
+ } cellular;
|
||||
+
|
||||
GtkWidget *ethernet_button;
|
||||
GtkWidget *wifi_button;
|
||||
-
|
||||
GtkWidget *scan_button;
|
||||
+ GtkWidget *cellular_button;
|
||||
GtkWidget *offline_button;
|
||||
};
|
||||
|
||||
@@ -88,8 +96,11 @@ void update_ethernet_ipv4(struct config_data *data, guint policy);
|
||||
void add_wifi_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data);
|
||||
void update_wifi_policy(struct config_data *data, guint policy);
|
||||
|
||||
+void add_cellular_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data);
|
||||
void add_ethernet_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
struct config_data *data);
|
||||
|
||||
void add_wifi_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
struct config_data *data);
|
||||
+void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
+ struct config_data *data);
|
||||
diff --git a/properties/cellular.c b/properties/cellular.c
|
||||
new file mode 100644
|
||||
index 0000000..7bbfb89
|
||||
--- /dev/null
|
||||
+++ b/properties/cellular.c
|
||||
@@ -0,0 +1,175 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Connection Manager
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Intel Corporation. All rights reserved.
|
||||
+ *
|
||||
+ * 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 St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#ifdef HAVE_CONFIG_H
|
||||
+#include <config.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <dbus/dbus-glib.h>
|
||||
+#include <glib/gi18n.h>
|
||||
+#include <gtk/gtk.h>
|
||||
+
|
||||
+#include "connman-client.h"
|
||||
+
|
||||
+#include "advanced.h"
|
||||
+
|
||||
+static void connect_reply_cb(DBusGProxy *proxy, GError *error,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ if (error)
|
||||
+ g_error_free(error);
|
||||
+}
|
||||
+
|
||||
+static void connect_callback(GtkWidget *editable, gpointer user_data)
|
||||
+{
|
||||
+ struct config_data *data = user_data;
|
||||
+
|
||||
+ connman_client_connect_async(data->client, data->device, connect_reply_cb, data);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void disconnect_callback(GtkWidget *editable, gpointer user_data)
|
||||
+{
|
||||
+ struct config_data *data = user_data;
|
||||
+
|
||||
+ connman_client_disconnect(data->client, data->device);
|
||||
+}
|
||||
+
|
||||
+static void switch_callback(GtkWidget *editable, gpointer user_data)
|
||||
+{
|
||||
+ struct config_data *data = user_data;
|
||||
+ const gchar *label = gtk_button_get_label(GTK_BUTTON(data->cellular_button));
|
||||
+
|
||||
+ if (g_str_equal(label, "Disable"))
|
||||
+ connman_client_disable_technology(data->client, data->device, "cellular");
|
||||
+ else
|
||||
+ connman_client_enable_technology(data->client, data->device, "cellular");
|
||||
+}
|
||||
+
|
||||
+void add_cellular_switch_button(GtkWidget *mainbox, GtkTreeIter *iter,
|
||||
+ struct config_data *data)
|
||||
+{
|
||||
+ GtkWidget *vbox;
|
||||
+ GtkWidget *table;
|
||||
+ GtkWidget *label;
|
||||
+ GtkWidget *buttonbox;
|
||||
+ GtkWidget *button;
|
||||
+ gboolean cellular_enabled;
|
||||
+
|
||||
+ gtk_tree_model_get(data->model, iter,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
+ -1);
|
||||
+
|
||||
+ vbox = gtk_vbox_new(TRUE, 0);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
+ gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
+
|
||||
+ table = gtk_table_new(1, 1, TRUE);
|
||||
+ gtk_table_set_row_spacings(GTK_TABLE(table), 10);
|
||||
+ gtk_table_set_col_spacings(GTK_TABLE(table), 10);
|
||||
+ gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
+
|
||||
+ label = gtk_label_new(_("Configure Cellular Networks."));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
|
||||
+
|
||||
+ buttonbox = gtk_hbutton_box_new();
|
||||
+ gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonbox), GTK_BUTTONBOX_CENTER);
|
||||
+ gtk_box_pack_start(GTK_BOX(mainbox), buttonbox, FALSE, FALSE, 0);
|
||||
+
|
||||
+ button = gtk_button_new();
|
||||
+ data->cellular_button = button;
|
||||
+
|
||||
+ if (cellular_enabled)
|
||||
+ gtk_button_set_label(GTK_BUTTON(button), _("Disable"));
|
||||
+ else
|
||||
+ gtk_button_set_label(GTK_BUTTON(button), _("Enable"));
|
||||
+
|
||||
+ gtk_container_add(GTK_CONTAINER(buttonbox), button);
|
||||
+ g_signal_connect(G_OBJECT(button), "clicked",
|
||||
+ G_CALLBACK(switch_callback), data);
|
||||
+}
|
||||
+
|
||||
+void add_cellular_service(GtkWidget *mainbox, GtkTreeIter *iter, struct config_data *data)
|
||||
+{
|
||||
+ GtkWidget *vbox;
|
||||
+ GtkWidget *table;
|
||||
+ GtkWidget *label;
|
||||
+ GtkWidget *button;
|
||||
+
|
||||
+ const char *name, *icon, *state;
|
||||
+ guint strength;
|
||||
+
|
||||
+ gtk_tree_model_get(data->model, iter,
|
||||
+ CONNMAN_COLUMN_NAME, &name,
|
||||
+ CONNMAN_COLUMN_ICON, &icon,
|
||||
+ CONNMAN_COLUMN_STATE, &state,
|
||||
+ CONNMAN_COLUMN_STRENGTH, &strength,
|
||||
+ -1);
|
||||
+
|
||||
+ if (g_str_equal(state, "failure") == TRUE)
|
||||
+ connman_client_remove(data->client, data->device);
|
||||
+
|
||||
+ vbox = gtk_vbox_new(TRUE, 0);
|
||||
+ gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
|
||||
+ gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0);
|
||||
+
|
||||
+ table = gtk_table_new(4, 8, TRUE);
|
||||
+ gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
|
||||
+ data->table = table;
|
||||
+
|
||||
+ label = gtk_label_new(_("Access Point:"));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 4, 0, 1);
|
||||
+
|
||||
+ label = gtk_label_new(_(name));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 4, 5, 0, 1);
|
||||
+ gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
|
||||
+ data->cellular.name = label;
|
||||
+
|
||||
+ label = gtk_label_new(_(""));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), label, 3, 5, 2, 3);
|
||||
+ gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
|
||||
+ gtk_widget_hide(label);
|
||||
+ data->cellular.connect_info = label;
|
||||
+
|
||||
+ button = gtk_button_new_with_label(_("Connect"));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), button, 3, 5, 3, 4);
|
||||
+ g_signal_connect(G_OBJECT(button), "clicked",
|
||||
+ G_CALLBACK(connect_callback), data);
|
||||
+ gtk_widget_set_no_show_all(button, TRUE);
|
||||
+ data->cellular.connect = button;
|
||||
+
|
||||
+ button = gtk_button_new_with_label(_("Disconnect"));
|
||||
+ gtk_table_attach_defaults(GTK_TABLE(table), button, 3, 5, 3, 4);
|
||||
+ g_signal_connect(G_OBJECT(button), "clicked",
|
||||
+ G_CALLBACK(disconnect_callback), data);
|
||||
+ data->cellular.disconnect = button;
|
||||
+ gtk_widget_set_no_show_all(button, TRUE);
|
||||
+
|
||||
+ if (g_str_equal(state, "failure") == TRUE
|
||||
+ || g_str_equal(state, "idle") == TRUE) {
|
||||
+ gtk_widget_show(data->cellular.connect);
|
||||
+ gtk_widget_hide(data->cellular.disconnect);
|
||||
+ } else {
|
||||
+ gtk_widget_hide(data->cellular.connect);
|
||||
+ gtk_widget_show(data->cellular.disconnect);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/properties/main.c b/properties/main.c
|
||||
index a09c721..ec36aef 100644
|
||||
--- a/properties/main.c
|
||||
+++ b/properties/main.c
|
||||
@@ -42,6 +42,7 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
const char *name = NULL, *_name = NULL, *state = NULL;
|
||||
gboolean ethernet_enabled;
|
||||
gboolean wifi_enabled;
|
||||
+ gboolean cellular_enabled;
|
||||
gboolean offline_mode;
|
||||
|
||||
gtk_tree_model_get(model, iter,
|
||||
@@ -50,6 +51,7 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
CONNMAN_COLUMN_TYPE, &type,
|
||||
CONNMAN_COLUMN_ETHERNET_ENABLED, ðernet_enabled,
|
||||
CONNMAN_COLUMN_WIFI_ENABLED, &wifi_enabled,
|
||||
+ CONNMAN_COLUMN_CELLULAR_ENABLED, &cellular_enabled,
|
||||
CONNMAN_COLUMN_OFFLINEMODE, &offline_mode,
|
||||
-1);
|
||||
|
||||
@@ -75,6 +77,29 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
gtk_widget_hide(data->wifi.connect);
|
||||
gtk_widget_show(data->wifi.disconnect);
|
||||
}
|
||||
+ } else if (type == CONNMAN_TYPE_CELLULAR) {
|
||||
+ if (data->cellular.name)
|
||||
+ _name = gtk_label_get_text(GTK_LABEL(data->cellular.name));
|
||||
+
|
||||
+ if (!(name && _name && g_str_equal(name, _name)))
|
||||
+ return;
|
||||
+
|
||||
+ if (g_str_equal(state, "failure") == TRUE) {
|
||||
+ gtk_label_set_text(GTK_LABEL(data->cellular.connect_info),
|
||||
+ _("connection failed"));
|
||||
+ gtk_widget_show(data->cellular.connect_info);
|
||||
+ gtk_widget_show(data->cellular.connect);
|
||||
+ gtk_widget_hide(data->cellular.disconnect);
|
||||
+ } else if (g_str_equal(state, "idle") == TRUE) {
|
||||
+ gtk_widget_hide(data->cellular.connect_info);
|
||||
+ gtk_widget_show(data->cellular.connect);
|
||||
+ gtk_widget_hide(data->cellular.disconnect);
|
||||
+ } else {
|
||||
+ gtk_widget_hide(data->cellular.connect_info);
|
||||
+ gtk_widget_hide(data->cellular.connect);
|
||||
+ gtk_widget_show(data->cellular.disconnect);
|
||||
+ }
|
||||
+
|
||||
} else if (type == CONNMAN_TYPE_LABEL_ETHERNET) {
|
||||
if (!data->ethernet_button)
|
||||
return;
|
||||
@@ -92,6 +117,13 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
gtk_button_set_label(GTK_BUTTON(data->wifi_button), _("Enable"));
|
||||
gtk_widget_set_sensitive(data->scan_button, 0);
|
||||
}
|
||||
+ } else if (type == CONNMAN_TYPE_LABEL_CELLULAR) {
|
||||
+ if (!data->cellular_button)
|
||||
+ return;
|
||||
+ if (cellular_enabled)
|
||||
+ gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Disable"));
|
||||
+ else
|
||||
+ gtk_button_set_label(GTK_BUTTON(data->cellular_button), _("Enable"));
|
||||
} else if (type == CONNMAN_TYPE_SYSCONFIG) {
|
||||
if (!data->offline_button)
|
||||
return;
|
||||
@@ -100,7 +132,6 @@ static void status_update(GtkTreeModel *model, GtkTreePath *path,
|
||||
else
|
||||
gtk_button_set_label(GTK_BUTTON(data->offline_button), _("OfflineMode"));
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
static void set_offline_callback(GtkWidget *button, gpointer user_data)
|
||||
@@ -207,12 +238,18 @@ static struct config_data *create_config(GtkTreeModel *model,
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
add_wifi_service(mainbox, iter, data);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
+ add_cellular_service(mainbox, iter, data);
|
||||
+ break;
|
||||
case CONNMAN_TYPE_LABEL_ETHERNET:
|
||||
add_ethernet_switch_button(mainbox, iter, data);
|
||||
break;
|
||||
case CONNMAN_TYPE_LABEL_WIFI:
|
||||
add_wifi_switch_button(mainbox, iter, data);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
+ add_cellular_switch_button(mainbox, iter, data);
|
||||
+ break;
|
||||
case CONNMAN_TYPE_SYSCONFIG:
|
||||
add_system_config(mainbox, iter, data);
|
||||
break;
|
||||
@@ -295,6 +332,7 @@ static void device_to_text(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
markup = g_strdup_printf(" %s\n", title);
|
||||
break;
|
||||
case CONNMAN_TYPE_WIFI:
|
||||
+ case CONNMAN_TYPE_CELLULAR:
|
||||
/* Show the AP name */
|
||||
title = N_(name);
|
||||
if (g_str_equal(state, "association") == TRUE)
|
||||
@@ -324,6 +362,10 @@ static void device_to_text(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
title = N_("Wireless Networks");
|
||||
markup = g_strdup_printf("<b>\n%s\n</b>", title);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
+ title = N_("Cellular Networks");
|
||||
+ markup = g_strdup_printf("<b>\n%s\n</b>", title);
|
||||
+ break;
|
||||
case CONNMAN_TYPE_SYSCONFIG:
|
||||
title = N_("System Configuration");
|
||||
markup = g_strdup_printf("<b>\n%s\n</b>", title);
|
||||
@@ -362,6 +404,10 @@ static void type_to_icon(GtkTreeViewColumn *column, GtkCellRenderer *cell,
|
||||
g_object_set(cell, "icon-name", "network-wireless",
|
||||
"stock-size", 4, NULL);
|
||||
break;
|
||||
+ case CONNMAN_TYPE_LABEL_CELLULAR:
|
||||
+ g_object_set(cell, "icon-name", "network-cellular",
|
||||
+ "stock-size", 4, NULL);
|
||||
+ break;
|
||||
default:
|
||||
g_object_set(cell, "icon-name", NULL, NULL);
|
||||
break;
|
||||
@@ -1,41 +0,0 @@
|
||||
From ec36df9d1fbb6dcbf0d1e79245ffe213049ecd5a Mon Sep 17 00:00:00 2001
|
||||
From: Dongxiao Xu <dongxiao.xu@intel.com>
|
||||
Date: Wed, 3 Aug 2011 14:33:07 +0800
|
||||
Subject: [PATCH] connman-dbus: fix security type mismatch
|
||||
|
||||
Latest connman change the Security type to be array{String}, fix
|
||||
connman-gnome accordingly.
|
||||
|
||||
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
|
||||
---
|
||||
common/connman-dbus.c | 5 +++--
|
||||
1 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
diff --git a/common/connman-dbus.c b/common/connman-dbus.c
|
||||
index 0f4e1db..0ac8ed5 100644
|
||||
--- a/common/connman-dbus.c
|
||||
+++ b/common/connman-dbus.c
|
||||
@@ -384,7 +384,8 @@ static void service_changed(DBusGProxy *proxy, const char *property,
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_FAVORITE, favorite, -1);
|
||||
} else if (g_str_equal(property, "Security") == TRUE) {
|
||||
- const char *security = value ? g_value_get_string(value) : NULL;
|
||||
+ const char **array = value ? g_value_get_boxed(value) : NULL;
|
||||
+ const char *security = g_strjoinv(" ", array);
|
||||
gtk_tree_store_set(store, &iter,
|
||||
CONNMAN_COLUMN_SECURITY, security,
|
||||
-1);
|
||||
@@ -487,7 +488,7 @@ static void service_properties(DBusGProxy *proxy, GHashTable *hash,
|
||||
strength = value ? g_value_get_uchar(value) : 0;
|
||||
|
||||
value = g_hash_table_lookup(hash, "Security");
|
||||
- security = value ? g_value_get_string(value) : NULL;
|
||||
+ security = value ? g_strjoinv(" ", g_value_get_boxed(value)) : NULL;
|
||||
|
||||
value = g_hash_table_lookup(hash, "PassPhrase");
|
||||
passphrase = value ? g_value_get_string(value) : NULL;
|
||||
--
|
||||
1.7.1
|
||||
|
||||
@@ -8,12 +8,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
|
||||
|
||||
DEPENDS = "gtk+ dbus"
|
||||
|
||||
PR = "r8"
|
||||
PR = "r10"
|
||||
|
||||
SRCREV = "78d3c39db6f3f7977b466305110faa8ca5f74ec8"
|
||||
SRC_URI = "git://github.com/connectivity/connman-gnome.git;protocol=git \
|
||||
file://3g.patch \
|
||||
file://security-type.patch"
|
||||
SRCREV = "42c652d123ea133d0a0930b96e8e39dbd0c597b5"
|
||||
SRC_URI = "git://git.kernel.org/pub/scm/network/connman/connman-gnome.git \
|
||||
file://0001-Monitor-the-Manager-s-State-property.patch \
|
||||
file://0002-Update-for-ConnMan-0.79-API-changes.patch \
|
||||
file://0003-Fix-setting-IPv4-configuration.patch \
|
||||
file://0004-Handle-WiFi-authentication-using-an-agent.patch \
|
||||
file://0005-Remove-all-handling-of-Passphrase-property.patch \
|
||||
file://0006-Fix-status-descriptions-in-properties-tree.patch \
|
||||
file://0007-connman-gnome-fix-segfault-due-to-unchecked-null-val.patch"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 7 Apr 2012 18:52:12 -0700
|
||||
Subject: [PATCH] plugin.h: Change visibility to default for debug symbols
|
||||
|
||||
gold refuses to link in undefined weak symbols which
|
||||
have hidden visibility
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
include/plugin.h | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/plugin.h b/include/plugin.h
|
||||
index 692a4e5..a9361c3 100644
|
||||
--- a/include/plugin.h
|
||||
+++ b/include/plugin.h
|
||||
@@ -89,9 +89,9 @@ struct connman_plugin_desc {
|
||||
#else
|
||||
#define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \
|
||||
extern struct connman_debug_desc __start___debug[] \
|
||||
- __attribute__ ((weak, visibility("hidden"))); \
|
||||
+ __attribute__ ((weak, visibility("default"))); \
|
||||
extern struct connman_debug_desc __stop___debug[] \
|
||||
- __attribute__ ((weak, visibility("hidden"))); \
|
||||
+ __attribute__ ((weak, visibility("default"))); \
|
||||
extern struct connman_plugin_desc connman_plugin_desc \
|
||||
__attribute__ ((visibility("default"))); \
|
||||
struct connman_plugin_desc connman_plugin_desc = { \
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From 0b817dd3096f5c3ca8f0b868ee55ea550054137b Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
|
||||
Date: Mon, 19 Mar 2012 14:03:27 +0100
|
||||
Subject: [PATCH 3/3] set-ipv4-method: The arguments have to be wrapped into a
|
||||
variant
|
||||
|
||||
Fixes BMC#24986
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||
---
|
||||
test/set-ipv4-method | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/test/set-ipv4-method b/test/set-ipv4-method
|
||||
index 820b24b..235113f 100755
|
||||
--- a/test/set-ipv4-method
|
||||
+++ b/test/set-ipv4-method
|
||||
@@ -3,6 +3,9 @@
|
||||
import sys
|
||||
import dbus
|
||||
|
||||
+def make_variant(string):
|
||||
+ return dbus.String(string, variant_level=1)
|
||||
+
|
||||
def print_usage():
|
||||
print "Usage: %s <service> [off|dhcp|manual <address> [netmask] [gateway]]" % (sys.argv[0])
|
||||
|
||||
@@ -20,13 +23,13 @@ properties = service.GetProperties()
|
||||
|
||||
print "Setting method %s for %s" % (sys.argv[2], sys.argv[1])
|
||||
|
||||
-ipv4_configuration = { "Method": sys.argv[2] }
|
||||
+ipv4_configuration = { "Method": make_variant(sys.argv[2]) }
|
||||
if (len(sys.argv) > 3):
|
||||
- ipv4_configuration["Address"] = sys.argv[3]
|
||||
+ ipv4_configuration["Address"] = make_variant(sys.argv[3])
|
||||
if (len(sys.argv) > 4):
|
||||
- ipv4_configuration["Netmask"] = sys.argv[4]
|
||||
+ ipv4_configuration["Netmask"] = make_variant(sys.argv[4])
|
||||
if (len(sys.argv) > 5):
|
||||
- ipv4_configuration["Gateway"] = sys.argv[5]
|
||||
+ ipv4_configuration["Gateway"] = make_variant(sys.argv[5])
|
||||
|
||||
service.SetProperty("IPv4.Configuration", ipv4_configuration)
|
||||
print "New IPv4.Configuration: ", ipv4_configuration
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
From 2885e71c9c0df7ea9866e91ab79d255eaa8de53d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
|
||||
Date: Mon, 19 Mar 2012 14:03:28 +0100
|
||||
Subject: [PATCH 2/3] set-ipv6-method: The arguments have to be wrapped into a
|
||||
variant
|
||||
|
||||
Fixes BMC#24986
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||
---
|
||||
test/set-ipv6-method | 13 ++++++++-----
|
||||
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/test/set-ipv6-method b/test/set-ipv6-method
|
||||
index 7f60b88..4f2de09 100755
|
||||
--- a/test/set-ipv6-method
|
||||
+++ b/test/set-ipv6-method
|
||||
@@ -3,6 +3,9 @@
|
||||
import sys
|
||||
import dbus
|
||||
|
||||
+def make_variant(string):
|
||||
+ return dbus.String(string, variant_level=1)
|
||||
+
|
||||
def print_usage():
|
||||
print "Usage: %s <service> off|manual|auto [<address> [prefixlen] [gateway]] [<privacy>]" % (sys.argv[0])
|
||||
|
||||
@@ -19,17 +22,17 @@ properties = service.GetProperties()
|
||||
|
||||
print "Setting method %s for %s" % (sys.argv[2], sys.argv[1])
|
||||
|
||||
-ipv6_configuration = { "Method": sys.argv[2] }
|
||||
+ipv6_configuration = { "Method": make_variant(sys.argv[2])}
|
||||
if sys.argv[2] == "auto":
|
||||
if (len(sys.argv) > 3):
|
||||
- ipv6_configuration["Privacy"] = sys.argv[3]
|
||||
+ ipv6_configuration["Privacy"] = make_variant(sys.argv[3])
|
||||
else:
|
||||
if (len(sys.argv) > 3):
|
||||
- ipv6_configuration["Address"] = sys.argv[3]
|
||||
+ ipv6_configuration["Address"] = make_variant(sys.argv[3])
|
||||
if (len(sys.argv) > 4):
|
||||
- ipv6_configuration["PrefixLength"] = sys.argv[4]
|
||||
+ ipv6_configuration["PrefixLength"] = make_variant(sys.argv[4])
|
||||
if (len(sys.argv) > 5):
|
||||
- ipv6_configuration["Gateway"] = sys.argv[5]
|
||||
+ ipv6_configuration["Gateway"] = make_variant(sys.argv[5])
|
||||
|
||||
service.SetProperty("IPv6.Configuration", ipv6_configuration)
|
||||
print "New IPv6.Configuration: ", ipv6_configuration
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user