[PATCH weston-ivi-shell v4 8/9] Add a reference of weston.ini for ivi-shell and ivi-hmi-controller.

Nobuhiko Tanibata nobuhiko_tanibata at xddp.denso.co.jp
Tue May 20 03:16:44 PDT 2014


2014-04-25 19:41 に Pekka Paalanen さんは書きました:
> On Mon, 17 Mar 2014 15:31:09 +0900
> Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp> wrote:
> 
>> Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA at xddp.denso.co.jp>
>> ---
>> 
>> Changes for v2:
>>  - squash Makefile to this patch
>> 
>> Changes for v3 and v4
>>   - nothing. Version number aligned to the first patch
>> 
>>  ivi-shell/Makefile.am   | 12 ++++++++
>>  ivi-shell/weston.ini.in | 79 
>> +++++++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 91 insertions(+)
>>  create mode 100644 ivi-shell/weston.ini.in
>> 
>> diff --git a/ivi-shell/Makefile.am b/ivi-shell/Makefile.am
>> index afaa5e3..333abb7 100644
>> --- a/ivi-shell/Makefile.am
>> +++ b/ivi-shell/Makefile.am
>> @@ -67,3 +67,15 @@ CLEANFILES = $(BUILT_SOURCES)
>> 
>>  wayland_protocoldir = $(top_srcdir)/protocol
>>  include $(top_srcdir)/wayland-scanner.mk
>> +
>> +
>> +weston.ini : $(srcdir)/weston.ini.in
>> +	$(AM_V_GEN)$(SED) \
>> +		-e 's|@bindir[@]|$(bindir)|g' \
>> +		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
>> +		-e 's|@libexecdir[@]|$(libexecdir)|g' \
>> +		$< > $@
>> +
>> +all-local : weston.ini
>> +
>> +CLEANFILES += weston.ini
>> diff --git a/ivi-shell/weston.ini.in b/ivi-shell/weston.ini.in
>> new file mode 100644
>> index 0000000..c9a6861
>> --- /dev/null
>> +++ b/ivi-shell/weston.ini.in
>> @@ -0,0 +1,79 @@
>> +[core]
>> +shell=ivi-shell.so
>> +modules=hmi-controller.so
> 
> Ooh, I see, this is how you get hmi-controller.so loaded.
> 
> Since both ivi-shell.so and hmi-controller.so both link to
> libweston-layout.la at build time and both are dlopen'd at runtime, 
> what
> guarantees that both use the same instance of the global 'ivilayout'
> defined in weston-layout.c?
> 
> My knowledge of runtime dynamic linking is a bit weak, but
> personally I'd just avoid that global there. It is a bit much of magic.
> 
> AFAICS, you might be implicitly depending on the loading order of
> ivi-shell.so first, hmi-controller.so next. Weston does do it that way,
> but I'd hope the dependency was more obvious than both secretly using
> the same global in a yet third library.
> 
> What happens, if hmi-controller.so is loaded, but shell is not
> ivi-shell.so?
> 
> What happens, if ivi-shell.so is the shell, but hmi-controller.so is
> not loaded?
> 
> Would it be better if ivi-shell.so loaded the whatever hmi-controller
> plugin that is appropriate? weston_load_module() is exported, and that
> would make the dependency explicit, allowing you to nicely exit weston
> with an error if something doesn't load right.

Thank you for comments.
I modified module_init of ivi-shell to explicitly load hmi-controller.so 
which depends on ivi-layout.so.
hmi-controller.so is specified by key: ivi-module in weston.ini to avoid 
your concerning.

BR,
Nobouhiko


> 
> After all, hmi-controller.so seems like a plugin to ivi-shell than
> anything else.
> 
> 
> Thanks,
> pq
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list