참고

FrancaUserGuide-0.12.0.1.pdf


설치 가이드 : https://github.com/franca/franca/wiki/Franca-Quick-Install-Guide



add p

Eclipse Xtend - http://download.itemis.com/updates/releases



Franca UI Add-ons : KIELER open-source framework

http://rtsys.informatik.uni-kiel.de/~kieler/updatesite/release_pragmatics_2017-02-04

추가후 KIELER Lightweight Diagrams - Developer Resources & Examples 선택



For D-Bus Introspection support:  dbus-emf-model homepage


http://kbirken.github.io/dbus-emf-model/releases/

 add D-Bus Model Feature : 0.8.1.201606031239





  • For OMG IDL support: Install the idl4emf package via Help > Install new software... using the following update site link: http://franca.github.io/franca/update_site/thirdparty (this won't work in the browser). Deactivate option Group items by category if the item idl4emf is not visible.
  • For Google Protobuf support: Install the Protobuf Buffer Editor package via Help > Install new software... using the following update site link: http://franca.github.io/franca/update_site/thirdparty (this won't work in the browser). Deactivate option Group items by category if the item Protobuf Buffer Editor is not visible.

DSL 검색후 Eclipse DSL Tools 를 설치한다.


add 

Xtend 추가 : http://download.itemis.com/updates/releases

 Xtend IDE 2.10.0.v201605250459

KIELER 추가 :  http://rtsys.informatik.uni-kiel.de/~kieler/updatesite/release_pragmatics_2017-02-04


dbus-emf-model : http://kbirken.github.io/dbus-emf-model/releases/

 D-Bus model Feature 추가 

idl4emf package : http://franca.github.io/franca/update_site/thirdparty


설치항목

Franca : http://franca.github.io/franca/update_site/releases

Franca Runtime , Franca UI

옵션 설치 : Franca Providers Deployment 

                 Franca User Interface Add-ons

 D-Bus support UI

OMG IDL support UI


2번째 설치기 전체설치를 해 보았다.


추가설치 


    Franca D-Bus support UI 0.13.0.201804131325

    Franca OMG IDL support UI 0.13.0.201804131325

    Franca Providers Deployment 0.13.0.201804131325

    Franca Runtime 0.13.0.201804131325

    Franca UI 0.13.0.201804131325

    Franca User Interface Add-ons 0.13.0.201804131325










'Yocto > GENIVI' 카테고리의 다른 글

[Yocto] meta-ivi 분석  (0) 2018.05.23
CommonAPI 설치  (0) 2018.05.23

현재 최신 meta-ivi 를 파악하고자한다. 

CommonAPI 필요부분


소스코드 링크는 다음과 같다. : https://github.com/GENIVI/meta-ivi



meta-ivi Download

  • 다운로드 및 해당 브랜치로 변경

$ git clone https://github.com/GENIVI/meta-ivi.git

$ cd meta-ivi

$ git log

commit 8efbab9130de3fedd62ef5ac6ad6fe138df610d9 (HEAD -> master, origin/master, origin/HEAD)

Author: Oscar Andreasson <oscar.andreasson@pelagicore.com>

Date:   Fri May 4 11:04:32 2018 +0200


    qemu_2: Remove dependency on libusb

    

    This is a really old dependency append it's causing issues in builds

    relying on the meta-ivi layer. Removing it as it doesn't seem necessary.

    

    Signed-off-by: Oscar Andreasson <oscar.andreasson@pelagicore.com>




14.x 버전 대이다.

  • meta-ivi/meta-ivi/recipes-extended 

     - 해당경로에는 다음과 같은 놈들이 존재한다.

common-api  dlt-daemon  node-health-monitor  node-startup-controller  node-state-manager  persistence-administrator  persistence-client-library  persistence-common-object


여기서 나는 common-api 가 필요하므로 해당 폴더를 파악한다.

 capicxx-core-native_3.1.12.bb

 capicxx-dbus-native_3.1.12.bb

 capicxx-someip-native_3.1.12.bb

 common-api-c++_3.1.12.bb

 common-api-c++-dbus_3.1.12.bb

 common-api-c++-someip_3.1.12.bb


dbus 관련 패치가 존재한다.

 해당파일 : ./recipes-core-ivi/dbus/dbus_%.bbappend


FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"


# add support for GENIVI CommonAPI D-Bus runtime

# - https://genivi-oss.atlassian.net/wiki/display/COMMONAPICPP/CommonAPI-cpp

SRC_URI_append = " \

    file://capi-dbus-add-send-with-reply-set-notify.patch \

    file://capi-dbus-add-support-for-custom-marshalling.patch \

    file://0001-dbus-fix-possible-uninitialized-variable.patch \

    "

SRC_URI_append_qemux86 = " file://build_fix-ubunt1604-qemux86.patch"


dbus 관련하여 어떠한 패치들이 존재하는지 검토해본다.

현재 존재하는 패치는 다음과 같다. 

0001-dbus-fix-possible-uninitialized-variable.patch  

 capi-dbus-add-support-for-custom-marshalling.patch          

 capi-dbus-send-with-reply-and-block-delete-reply-on-error.patch

 build_fix-ubunt1604-qemux86.patch                    

 capi-dbus-block-acquire-io-path-on-send.patch

 capi-dbus-add-send-with-reply-set-notify.patch     

 capi-dbus-correct-dbus-connection-block-pending-call.patch



capi-dbus 패치관련하여 파헤쳐 볼것이다.


 capi-dbus-add-support-for-custom-marshalling.patch   

+add dbus/dbus-message.c

dbus_bool_t

dbus_message_set_signature (DBusMessage *message,

                            const char  *signature)

{

  _dbus_return_val_if_fail (message != NULL, FALSE);

  _dbus_return_val_if_fail (!message->locked, FALSE);

  _dbus_return_val_if_fail (signature == NULL ||

                            _dbus_check_is_valid_signature (signature), FALSE);

  /* can't delete the signature if you have a message body */

  _dbus_return_val_if_fail (_dbus_string_get_length (&message->body) == 0 ||

                            signature != NULL, FALSE);


  return set_or_delete_string_field (message,

                                     DBUS_HEADER_FIELD_SIGNATURE,

                                     DBUS_TYPE_SIGNATURE,

                                     signature);

}




+dbus/dbus-string.h


 #define _dbus_string_get_allocated(s) (((DBusString*)(s))->dummy3 - _DBUS_STRING_ALLOCATION_PADDING)

#ifndef _dbus_string_get_allocated

int           _dbus_string_get_allocated         (const DBusString  *str);

#endif /* !_dbus_string_get_allocated */




'Yocto > GENIVI' 카테고리의 다른 글

[eclipse]Franca IDL 설치  (0) 2018.05.23
CommonAPI 설치  (0) 2018.05.23



우분투 18.04 에 CommonAPI 를 설치하려고 한다.


Franca IDL 툴을 이용하여 생성한 인터페이스 소스를, CommonAPI 를 통해 연결할수 있다. 


CommonAPI 는 dbus 라이브러리와 연관되어 있으며  , 기능을 적용하기 위해서 dbus 라이브러리에 관련 패치들이 추가되어야 한다.



먼저 사용하는 Ubuntu  버전의 dbus 버전 정보를 확인한다.


dpkg -l |grep dbus


 ii  at-spi2-core                               2.28.0-1                            amd64        Assistive Technology Service Provider Interface (dbus core)

ii  dbus                                       1.12.2-1ubuntu1                     amd64        simple interprocess messaging system (daemon and utilities)

ii  dbus-user-session                          1.12.2-1ubuntu1                     amd64        simple interprocess messaging system (systemd --user integration)

ii  dbus-x11                                   1.12.2-1ubuntu1                     amd64        simple interprocess messaging system (X11 deps)

ii  gir1.2-dbusmenu-glib-0.4:amd64             16.04.1+18.04.20171206-0ubuntu1     amd64        typelib file for libdbusmenu-glib4

ii  libdbus-1-3:amd64                          1.12.2-1ubuntu1                     amd64        simple interprocess messaging system (library)

ii  libdbus-1-dev:amd64                        1.12.2-1ubuntu1                     amd64        simple interprocess messaging system (development headers)

ii  libdbus-glib-1-2:amd64                     0.110-2                             amd64        deprecated library for D-Bus IPC

ii  libdbusmenu-glib4:amd64                    16.04.1+18.04.20171206-0ubuntu1     amd64        library for passing menus over DBus

ii  libdbusmenu-gtk3-4:amd64                   16.04.1+18.04.20171206-0ubuntu1     amd64        library for passing menus over DBus - GTK+ version

ii  libdbusmenu-gtk4:amd64                     16.04.1+18.04.20171206-0ubuntu1     amd64        library for passing menus over DBus - GTK+ version

ii  libnet-dbus-perl                           1.1.0-4build2                       amd64        Perl extension for the DBus bindings

ii  libqt5dbus5:amd64                          5.9.5+dfsg-0ubuntu1                 amd64        Qt 5 D-Bus module

ii  python3-dbus                               1.2.6-1                             amd64        simple interprocess messaging system (Python 3 interface)



대충  1.12.2-1ubuntu1을 사용하는 것으로 추측된다.



구글 검색 : 1.12.2-1ubuntu1 dbus

다음 우분투 서버의 패키지 정보가 보여진다.

 https://launchpad.net/ubuntu/+source/dbus/1.12.2-1ubuntu1


dbus_1.12.2.orig.tar.gz2.0 MiB272bb5091770b047c8188b926d5e6038fa4fe6745488b2add96b23e2d9a83d88
dbus_1.12.2-1ubuntu1.debian.tar.xz61.0 KiB7c968a77cc7f8512229f190b51a619cf7b5901db0cf43fcae6c367eff1ede78c


위 두파일을 다운로드한다.


Common API 호출 방식 



CommonAPI C++ Overview



Common API 구조

CommonAPI C++ Overview



Download Source 


  • capicxx-core-runtime

$ git clone https://github.com/GENIVI/capicxx-core-runtime.git

$ cd capicxx-core-runtime/

$ git checkout 3.1.12.4


  • capicxx-dbus-runtime (dbus-patch 파일이 존재한다. src/dbus-patches)

$ git clone https://github.com/GENIVI/capicxx-dbus-runtime.git

$ cd capicxx-dbus-runtime

$ git checkout 3.1.12.4



설치순서 dbus Ubuntu Source Download -> capicxx-dbus-runtime 패치 적용 (dbus) -> dbus 라이브러리 설치이후 관련 라이브러리들을 설치한다.

 dbus 설치 -> dlt-daemon 설치-> capicxx-core-runtime -> capicxx-dbus-runtime 설치순으로 진행


특정 폴더에 dbus_1.12.2.orig.tar.gz , dbus_1.12.2-1ubuntu1.debian.tar.xz 압축을 해제한다.

1. ubuntu 용 패치를 적용한다.


$ cd  debian/patches/ubuntu

$ cp * ../../../dbus-1.12.2/

$ patch -p1 < aa-get-connection-apparmor-security-context.patch

patching file bus/apparmor.c

patching file bus/apparmor.h

patching file bus/driver.c

patching file dbus/dbus-protocol.h


$ patch -p1 < dont-stop-dbus.patch
patching file bus/dbus.service.in
$ rm aa-get-connection-apparmor-security-context.patch dont-stop-dbus.patch


2. capicxx-dbus-runtime 폴더에 존재하는 패치를 적용한다.


capi-dbus-1-pc.patch

capi-dbus-add-send-with-reply-set-notify.patch

capi-dbus-add-support-for-custom-marshalling.patch

capi-dbus-block-acquire-io-path-on-send.patch

capi-dbus-correct-dbus-connection-block-pending-call.patch

capi-dbus-send-with-reply-and-block-delete-reply-on-error.patch


$ cd  capicxx-dbus-runtime/src/dbus-patches

$ cp * /home/kj/GENIVI/CommonAPI/dbus/dbus-1.12.2

$ patch -p1 < capi-dbus-1-pc.patch
patching file dbus-1.pc.in
Hunk #1 succeeded at 19 (offset 1 line).

$ patch -p1 < capi-dbus-add-send-with-reply-set-notify.patch
patching file dbus/dbus-connection.c
Hunk #1 succeeded at 3500 (offset 18 lines).
patching file dbus/dbus-connection.h
Hunk #1 succeeded at 230 (offset 1 line).

$ patch -p1 < capi-dbus-add-support-for-custom-marshalling.patch
patching file dbus/dbus-message.c
Hunk #1 succeeded at 3746 (offset 301 lines).
Hunk #2 succeeded at 5050 (offset 377 lines).
patching file dbus/dbus-message.h
Hunk #1 succeeded at 170 (offset 32 lines).
Hunk #2 succeeded at 302 with fuzz 1 (offset 37 lines).
patching file dbus/dbus-string.c
Hunk #1 succeeded at 744 (offset 14 lines).
patching file dbus/dbus-string.h

$ patch -p1 < capi-dbus-block-acquire-io-path-on-send.patch
patching file dbus/dbus-connection.c

$ patch -p1 < capi-dbus-correct-dbus-connection-block-pending-call.patch
patching file dbus/dbus-connection.c
Hunk #1 succeeded at 2526 (offset 1 line).

$ patch -p1 < capi-dbus-send-with-reply-and-block-delete-reply-on-error.patch
patching file dbus/dbus-connection.c
Hunk #1 succeeded at 3736 (offset 27 lines).
Hunk #2 succeeded at 6527 (offset 84 lines).


3. dbus Library Build


 sudo  mkdir -p /opt/GENIVI

 sudo chmod 777 /opt/GENIVI/

cd /home/kj/GENIVI/CommonAPI/dbus/dbus-1.12.2

$ ./configure --prefix=/opt/GENIVI/


No package 'expat' found

$ sudo apt-get install expat
$ sudo apt-get install libexpat1-dev
다시설치
$ ./configure --prefix=/opt/GENIVI/
$ make -C dbus -j8
$ make -C dbus install
$ make install-pkgconfigDATA
$ export PKG_CONFIG_PATH="/opt/GENIVI/lib/pkgconfig:$PKG_CONFIG_PATH"


configure 결과

  D-Bus 1.12.2

                  ==============


prefix:                   /opt/GENIVI

exec_prefix:              ${prefix}

        libdir:                   /opt/GENIVI/lib

        libexecdir:               /opt/GENIVI/libexec

        bindir:                   /opt/GENIVI/bin

        sysconfdir:               /opt/GENIVI/etc

        localstatedir:            /opt/GENIVI/var

        runstatedir:              /opt/GENIVI/var/run

datadir:                  /opt/GENIVI/share

source code location:   .

compiler:   gcc

cflags:           -fno-strict-aliasing -fno-common -Wall -Wextra -Wundef -Wnested-externs -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wdeclaration-after-statement -Wformat=2 -Wold-style-definition -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wimplicit-function-declaration -Wreturn-type -Wswitch-enum -Wswitch-default -Wchar-subscripts -Wfloat-equal -Wpointer-sign -Wno-deprecated-declarations -Wno-unused-label -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=deprecated-declarations -Wno-error=unused-label 

cppflags:   

cxxflags:   -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wno-overloaded-virtual -Wswitch-enum -Wswitch-default -Wchar-subscripts -Wfloat-equal -Wno-deprecated-declarations -Wno-unused-label -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=overloaded-virtual -Wno-error=deprecated-declarations -Wno-error=unused-label 

ldflags:   -Wl,--no-as-needed 

64-bit int:   long

32-bit int:   int

16-bit int:   short

        Doxygen:                  no

        xmlto:                    no

        ducktype:                 no

        yelp-build:               no


        Rebuilding generated files: yes

        gcc coverage profiling:   no

        Building embedded tests:  no

        Building modular tests:   auto

            - with GLib:          yes

        Installing tests:         no

        Building verbose mode:    no

        Building assertions:      no

        Building checks:          yes

        Building bus stats API:   yes

        Building SELinux support: no

        Building AppArmor support: no

        Building inotify support: yes

        Building kqueue support:  no

        Building systemd support: no

        Building X11 code:        yes

        Building Doxygen docs:    no

        Building Ducktype docs:   no

        Building XML docs:        no

        Building launchd support: no

        System bus socket:        /opt/GENIVI/var/run/dbus/system_bus_socket

        System bus address:       unix:path=/opt/GENIVI/var/run/dbus/system_bus_socket

        System bus PID file:      /opt/GENIVI/var/run/dbus/pid

        Session bus listens on:   unix:tmpdir=/tmp

        Session clients connect to: autolaunch:

        pam_console auth dir:     (none)

        Console owner file:       no

        Console owner file path:  

System bus user:          messagebus

Session bus services dir: /opt/GENIVI/share/dbus-1/services

        'make check' socket dir:  /tmp


dlt-daemon 설치

 git clone https://github.com/GENIVI/dlt-daemon.git

 cd dlt-daemon

 git log

commit da6eefe5cac244421c5af413c54e420717e11c9e (HEAD -> master, origin/master, origin/HEAD)

Author: ManikandanChockalingam <manikandan.chockalingam@in.bosch.com>

Date:   Fri May 18 11:17:31 2018 +0530


    IPC: Unix socket added (#43)

    

    * IPC: Unix socket added

mkdir build
cd build/
cmake -DCMAKE_INSTALL_PREFIX=/opt/GENIVI ..
make -j8
make install


오류시 

/usr/bin/x86_64-linux-gnu-ld: cannot find -ldbus-1

$ sudo apt-get install libdbus-1-dev




capicxx-core-runtime 설치


$ cd common-api-runtime

$ mkdir build

$ cd build

$ cmake -D CMAKE_INSTALL_PREFIX=/opt/GENIVI ..

sudo cp -apr dlt/ /usr/include/  <-- dlt include 패스를 잡지못하여 root 경로에 임의로 복사하였음.

$ make

$ make install



capicxx-dbus-runtime 설치


cd  capicxx-dbus-runtime

mkdir build

cd build

sudo apt-get install cmake

$ cmake -D USE_INSTALLED_COMMONAPI=ON -D CMAKE_INSTALL_PREFIX=/opt/GENIVI ..

$ make -j8

$ make install


설치완료 /opt/GENIVI/lib/pkgconfig 해당폴더에 dlt 관련 라이브러리 설정정보가 있다.

automotive-dlt.pc  CommonAPI-DBus.pc  CommonAPI.pc  dbus-1.pc




참고사이트

CommonAPI C++ :  https://genivi.github.io/capicxx-core-tools/


'Yocto > GENIVI' 카테고리의 다른 글

[eclipse]Franca IDL 설치  (0) 2018.05.23
[Yocto] meta-ivi 분석  (0) 2018.05.23

+ Recent posts