afb-binding API 에 대해 파악 하고 자함


#define AFB_BINDING_VERSION 2


afb/afb-api-x3.h 파일에 정의되어 있음

afb/afb-binding-v2.h 다음버전을 살펴봄


afb_verb_v2

struct afb_binding_v2 



  • 바인딩 정의

 struct afb_binding_v2

{

        const char *api;                        /**< api name for the binding */

        const char *specification;              /**< textual specification of the binding, can be NULL */

        const char *info;                       /**< some info about the api, can be NULL */

        const struct afb_verb_v2 *verbs;        /**< array of descriptions of verbs terminated by a NULL name */

        int (*preinit)();                       /**< callback at load of the binding */

        int (*init)();                          /**< callback for starting the service */

        void (*onevent)(const char *event, struct json_object *object); /**< callback for handling events */

        unsigned noconcurrency: 1;              /**< avoids concurrent requests to verbs */

};



//MediaService 예

const struct afb_binding_v2 afbBindingV2 = {

        .api = "mediaplayer",

        .specification = "Mediaplayer API",

        .verbs = binding_verbs,

        .onevent = onevent,

        .init = init,

};


  • 하나의 동작을 연결하기 위한 API version 2

 struct afb_verb_v2

{

        const char *verb;                       /**< name of the verb, NULL only at end of the array */

        void (*callback)(struct afb_req_x1 req);/**< callback function implementing the verb */

        const struct afb_auth *auth;            /**< required authorisation, can be NULL */

        const char *info;                       /**< some info about the verb, can be NULL */

        uint32_t session;                       /**< authorisation and session requirements of the verb */

};






ㄴㄴ










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

lightmediascanner  (0) 2018.10.18
[AGL] config.xml 설정파일  (1) 2018.10.16
[AGL]smack  (0) 2018.10.10
[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10

https://elinux.org/Using_Rygel_and_Lightmediascanner



sudo apt-get install libmpeg3-dev

sudo apt-get install ffmpeg libavcodec-extra

//sudo aptitude install ubuntu-restricted-extras

 sudo apt-get install libmp4v2-dev

 sudo apt-get install mp4v2-utils

sudo apt-get install libogg-dev

sudo apt-get install libflac-dev

 

 

  • Type the following on the embedded device to launch Light Media Scanner:
lightmediascannerd --startup-scan --directory=/usr/share/media &

 

  • Type the following on the embedded device to verify that lightmediascannerd has successfully retrieved the multimedia files and inserted the to the SQLite database:
sqlite3 ~/.config/lightmediascannerd/db.sqlite3

sqlite> .tables
audio_albums      audios            lms_internal      videos_audios   
audio_artists     files             playlists         videos_subtitles
audio_genres      images            videos            videos_videos

sqlite> SELECT * FROM images;
1|Jpeg||1352977249|3264|1836|0|0.0|0.0|0.0|JPEG_LRG|image/jpeg|jpeg
2|Jpeg||1352977246|3264|1836|0|0.0|0.0|0.0|JPEG_LRG|image/jpeg|jpeg
3|DSCN0024||1361553676|4320|3240|0|0.0|0.0|0.0||application/octet-stream|jpeg

sqlite> .quit
rygel -c /etc
/rygel.conf

 

make  all-recursive
make[1]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/git' 들어감
Making all in src
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/git/src' 들어감
Making all in lib
make[3]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/git/src/lib' 들어감
  CC       lightmediascanner.lo
/bin/bash: 줄 1: ../../-libtool: 그런 파일이나 디렉터리가 없습니다
Makefile:515: 'lightmediascanner.lo' 타겟에 대한 명령이 실패했습니다
make[3]: *** [lightmediascanner.lo] 오류 127
make[3]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/git/src/lib' 나감
Makefile:393: 'all-recursive' 타겟에 대한 명령이 실패했습니다
make[2]: *** [all-recursive] 오류 1
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/git/src' 나감
Makefile:546: 'all-recursive' 타겟에 대한 명령이 실패했습니다
make[1]: *** [all-recursive] 오류 1
make[1]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/git' 나감
Makefile:430: 'all' 타겟에 대한 명령이 실패했습니다
make: *** [all] 오류 2

sudo apt-get install libavformat-dev

 

  /bin/bash ../../libtool   --mode=install /usr/bin/install -c   dummy/dummy.la jpeg/jpeg.la png/png.la video-dummy/video-dummy.la audio-dummy/audio-dummy.la m3u/m3u.la pls/pls.la asf/asf.la rm/rm.la mp4/mp4.la id3/id3.la flac/flac.la wave/wave.la generic/generic.la '/usr/local/lib/lightmediascanner/plugins'
libtool: warning: relinking 'dummy/dummy.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o dummy/dummy.la -rpath /usr/local/lib/lightmediascanner/plugins dummy/dummy.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c dummy/.libs/dummy.soT /usr/local/lib/lightmediascanner/plugins/dummy.so
libtool: install: /usr/bin/install -c dummy/.libs/dummy.lai /usr/local/lib/lightmediascanner/plugins/dummy.la
libtool: warning: relinking 'jpeg/jpeg.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o jpeg/jpeg.la -rpath /usr/local/lib/lightmediascanner/plugins jpeg/jpeg.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c jpeg/.libs/jpeg.soT /usr/local/lib/lightmediascanner/plugins/jpeg.so
libtool: install: /usr/bin/install -c jpeg/.libs/jpeg.lai /usr/local/lib/lightmediascanner/plugins/jpeg.la
libtool: warning: relinking 'png/png.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o png/png.la -rpath /usr/local/lib/lightmediascanner/plugins png/png.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c png/.libs/png.soT /usr/local/lib/lightmediascanner/plugins/png.so
libtool: install: /usr/bin/install -c png/.libs/png.lai /usr/local/lib/lightmediascanner/plugins/png.la
libtool: warning: relinking 'video-dummy/video-dummy.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o video-dummy/video-dummy.la -rpath /usr/local/lib/lightmediascanner/plugins video-dummy/video-dummy.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c video-dummy/.libs/video-dummy.soT /usr/local/lib/lightmediascanner/plugins/video-dummy.so
libtool: install: /usr/bin/install -c video-dummy/.libs/video-dummy.lai /usr/local/lib/lightmediascanner/plugins/video-dummy.la
libtool: warning: relinking 'audio-dummy/audio-dummy.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o audio-dummy/audio-dummy.la -rpath /usr/local/lib/lightmediascanner/plugins audio-dummy/audio-dummy.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c audio-dummy/.libs/audio-dummy.soT /usr/local/lib/lightmediascanner/plugins/audio-dummy.so
libtool: install: /usr/bin/install -c audio-dummy/.libs/audio-dummy.lai /usr/local/lib/lightmediascanner/plugins/audio-dummy.la
libtool: warning: relinking 'm3u/m3u.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o m3u/m3u.la -rpath /usr/local/lib/lightmediascanner/plugins m3u/m3u.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c m3u/.libs/m3u.soT /usr/local/lib/lightmediascanner/plugins/m3u.so
libtool: install: /usr/bin/install -c m3u/.libs/m3u.lai /usr/local/lib/lightmediascanner/plugins/m3u.la
libtool: warning: relinking 'pls/pls.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o pls/pls.la -rpath /usr/local/lib/lightmediascanner/plugins pls/pls.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c pls/.libs/pls.soT /usr/local/lib/lightmediascanner/plugins/pls.so
libtool: install: /usr/bin/install -c pls/.libs/pls.lai /usr/local/lib/lightmediascanner/plugins/pls.la
libtool: warning: relinking 'asf/asf.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o asf/asf.la -rpath /usr/local/lib/lightmediascanner/plugins asf/asf.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c asf/.libs/asf.soT /usr/local/lib/lightmediascanner/plugins/asf.so
libtool: install: /usr/bin/install -c asf/.libs/asf.lai /usr/local/lib/lightmediascanner/plugins/asf.la
libtool: warning: relinking 'rm/rm.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o rm/rm.la -rpath /usr/local/lib/lightmediascanner/plugins rm/rm.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c rm/.libs/rm.soT /usr/local/lib/lightmediascanner/plugins/rm.so
libtool: install: /usr/bin/install -c rm/.libs/rm.lai /usr/local/lib/lightmediascanner/plugins/rm.la
libtool: warning: relinking 'mp4/mp4.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o mp4/mp4.la -rpath /usr/local/lib/lightmediascanner/plugins mp4/mp4.lo ../../src/lib/liblightmediascanner.la -lmp4v2 )
libtool: install: /usr/bin/install -c mp4/.libs/mp4.soT /usr/local/lib/lightmediascanner/plugins/mp4.so
libtool: install: /usr/bin/install -c mp4/.libs/mp4.lai /usr/local/lib/lightmediascanner/plugins/mp4.la
libtool: warning: relinking 'id3/id3.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o id3/id3.la -rpath /usr/local/lib/lightmediascanner/plugins id3/id3.lo id3/id3v1_genres.lo ../../src/lib/liblightmediascanner.la )
libtool: install: /usr/bin/install -c id3/.libs/id3.soT /usr/local/lib/lightmediascanner/plugins/id3.so
libtool: install: /usr/bin/install -c id3/.libs/id3.lai /usr/local/lib/lightmediascanner/plugins/id3.la
libtool: warning: relinking 'flac/flac.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o flac/flac.la -rpath /usr/local/lib/lightmediascanner/plugins flac/flac.lo ../../src/lib/liblightmediascanner.la -lFLAC )
libtool: install: /usr/bin/install -c flac/.libs/flac.soT /usr/local/lib/lightmediascanner/plugins/flac.so
libtool: install: /usr/bin/install -c flac/.libs/flac.lai /usr/local/lib/lightmediascanner/plugins/flac.la
libtool: warning: relinking 'wave/wave.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o wave/wave.la -rpath /usr/local/lib/lightmediascanner/plugins wave/wave.lo ../../src/lib/liblightmediascanner.la -lFLAC )
libtool: install: /usr/bin/install -c wave/.libs/wave.soT /usr/local/lib/lightmediascanner/plugins/wave.so
libtool: install: /usr/bin/install -c wave/.libs/wave.lai /usr/local/lib/lightmediascanner/plugins/wave.la
libtool: warning: relinking 'generic/generic.la'
libtool: install: (cd /home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins; /bin/bash "/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/libtool"  --silent --tag CC --mode=relink gcc -fvisibility=hidden -pipe -DANOTHER_BRICK_IN_THE -Wall -W -Wextra -Wno-inline -Wvla -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wnested-externs -Wchar-subscripts -Wtype-limits -Wuninitialized -fno-common -fdiagnostics-show-option -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -module -avoid-version -shared -Wl,--as-needed -Wl,--gc-sections -o generic/generic.la -rpath /usr/local/lib/lightmediascanner/plugins generic/generic.lo ../../src/lib/liblightmediascanner.la -lavcodec-ffmpeg -lavformat-ffmpeg )
libtool: install: /usr/bin/install -c generic/.libs/generic.soT /usr/local/lib/lightmediascanner/plugins/generic.so
libtool: install: /usr/bin/install -c generic/.libs/generic.lai /usr/local/lib/lightmediascanner/plugins/generic.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib/lightmediascanner/plugins
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib/lightmediascanner/plugins

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[5]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins' 나감
make[4]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins' 나감
make[3]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins' 나감
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src/plugins' 나감
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src' 들어감
make[3]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src' 들어감
make[3]: 'install-exec-am'을(를) 위해 할 일이 없습니다.
make[3]: 'install-data-am'을(를) 위해 할 일이 없습니다.
make[3]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src' 나감
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src' 나감
make[1]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/src' 나감
Making install in m4
make[1]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/m4' 들어감
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/m4' 들어감
make[2]: 'install-exec-am'을(를) 위해 할 일이 없습니다.
make[2]: 'install-data-am'을(를) 위해 할 일이 없습니다.
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/m4' 나감
make[1]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner/m4' 나감
make[1]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner' 들어감
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner' 들어감
make[2]: 'install-exec-am'을(를) 위해 할 일이 없습니다.
 /bin/mkdir -p '/usr/local/lib/pkgconfig'
 /usr/bin/install -c -m 644 lightmediascanner.pc '/usr/local/lib/pkgconfig'
 /bin/mkdir -p '/usr/local/share/dbus-1/services'
 /usr/bin/install -c -m 644 org.lightmediascanner.service '/usr/local/share/dbus-1/services'
make[2]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner' 나감
make[1]: 디렉터리 '/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner' 나감

 

 

설치 한 폴더

/home/agl/project/KJ/multimedia/lightmediascanner/0.5.1+gitAUTOINC+adfddb3486-r0/teset/lightmediascanner


 

 

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

[AGL] afb_binding  (0) 2018.10.19
[AGL] config.xml 설정파일  (1) 2018.10.16
[AGL]smack  (0) 2018.10.10
[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10

 

관련 링크 : Configuration file - config.xml

 

 Widgets 들은 'W3C' 기술방식으로 쓰기를 추천한다.

 

Packaged Web Apps (Widgets) and XML Digital Signatures for Widgets that specifies the configuration file config.xml.

 

사이트를 다 읽기는 어려우므로 우선적으로 AutomotiveLinux 에 정의된 내용을 정리해 본다.

 

 

 

개요

 config.xml 파일은 프레임워크에 대한 응용프로그램의 중요한 정보를 설명한다.

  • 응용프로그램의 고유 식별자
  • 응용프로그램의 이름
  • 응용프로그램의 타입
  • 응용프로그램에 연결된 사용 권한
  • 응용프로그램간의 의존성 과 서비스

 파일은 위젯의 루트에 있어야 하며 대소문자를 구별한다. config,xml 은 widgets 문서에서 설명하는 XML 파일이다.

 

다음은 QML 어플리케이션 SmartHome 에 대한 예제이다.

 

 

 

 <?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" id="smarthome" version="0.1">
  <name>SmartHome</name>
  <icon src="smarthome.png"/>
  <content src="qml/smarthome/smarthome.qml" type="text/vnd.qt.qml"/>
  <description>This is the Smarthome QML demo application. It shows some user interfaces for controlling an
automated house. The user interface is completely done with QML.</description>
  <author>Qt team</author>
  <license>GPL</license>
</widget>

 

가장 중요한 항목은 다음과 같다.

  • <widget id="....."> : 고유한 위젯 아이디를 주어야 한다.
  • <widget version="......"> : 위젯 에 대한 버전을 설정한다ㅏ.
  • <icon src="..."> :  응용프로그램에 대한 아이콘경로를 설정한다. ( 다른크기로 반복 될수 있음 ?)
  • <content src="..." type="..."> : 엔트리 포인트와 타입을 가르킨다.  소스경로?

 

표준 요소 "config.xml"

 

 widget 의 요소

1. 위젯의 속성 ID

 

 

 

 

 

 

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

[AGL] afb_binding  (0) 2018.10.19
lightmediascanner  (0) 2018.10.18
[AGL]smack  (0) 2018.10.10
[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10

sudo apt-get install autoconf


 git clone https://github.com/smack-team/smack.git

autogen.sh


설치하기위함 security-manager

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

lightmediascanner  (0) 2018.10.18
[AGL] config.xml 설정파일  (1) 2018.10.16
[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10
[AGL] security-manager  (0) 2018.10.10

공식 홈페이지 : http://docs.automotivelinux.org/docs/apis_services/en/dev/reference/af-main/0-introduction.html


소개

 - Tizen 의 보안모델을 AGL (Automotive Grade Linux) 배포판에 통합을 수행하였다.  필요사항은 아래와 같다.

  • platform/appfw/app-installers
  • platform/core/security/cert-svc
  • platform/core/appfw/ail
  • platform/core/appfw/aul-1
  • platform/core/appfw/libslp-db-util
  • platform/core/appfw/pkgmgr-info
  • platform/core/appfw/slp-pkgmgr

 많은 의존성들이 감춰줘 있기 때문에 목록이 정확하지 않다. 

  • iniparser
  • bundle
  • dlog,
  • libtzplatform-config
  • db-util
  • vconf-buxton
  • ...

Tizen 의 보안프레임 워크의 핵심구성요소는 의존성이 가볍다는것을 보여주었다.
해당 구성요소는 다음과 같다.
  • cynara
  • security-manager
  • D-Bus aware of cynara
다행이도 Tizen 의 보안 컴포넌트는 meta-intel-iot-security 를 통해 제공된다. 아래와 같은 3 레이어를 제공한다.

  • Implementing Smack LSM
  • Implementing Integrity Measurement Architecture
  • Implementing Tizen Security Framework

위 구성은 AGL에서  두개의 컴포넌트로 분리하였다.

  • afm-system-daemon
  • afm-user-daemon
 두개의 컴포넌트는 다중사용자 보안 환경에서 응용프로그램을 설치, 제거, 실행, 종료, 정지,재시작 하기위한 기능을 제공한다.
 세번쨰 구성요소는 프레임워크, 바인더 afb-daemon 에 있다. 바인더는 모든계층의 보안 API 를 쉽운방법으로 제공한다. 

이문서는 Tizen Application Framework 를 변경하여 IoT.bzh 에서 만든 프레임워크에 대해 설명한다.


아래 그림은 프레임워크의 주요 구성요소와 시나리오의 상호 작용을 보여준다.



1. Application 은 바인더를 호출하여 다른 응용프로그램을 설치한다.

2. 바인더의 바인딩 afm-main-binding 은 D-Bus 시스템을 통해 , 다른 응용프로그램을 설치하는 시스템 데몬을 호출한다.

3. 시스템 D-Bus 는 CYNARA 에게 응용프로그램을 설치할 권한이 있는지 여부를 확인한다.

4. 시스템 D-Bus 는 요청을 afm-system-daemon 으로 전송한다.

   afm-system-daemon 은 서명과 권한을 확인하고 응용프로그램을 설치한다.

5.  afm-system-daemon 은 설치된 응용프로그램의 보안컨텍스트를 충족시키기 위해 Security-Manager 를 호출한다.

6. Security-Manager 는 CYNARA 에게 응용프로그램의 초기 사용권한을 설치하도록 요청한다.

7. 어플리케이션은 바인더를 호출하여 설치된 응용프로그램을 시작하도록 한다.

8. 바인더의 바인딩 afm-main-binding 은 D-Bus 세션을 통해 다른응용프로그램 을 시작하는 사용자 데몬을 호출한다.

9. 세션 D-Bus 는 CYNARA 에게 어플리케이션을 시작할 수 있는 권한지 있는지 확인한다.

10. 세션 D-Bus 는 afm-user-daemon 에게 전송하도록 요청한다. 

11. afm-user-daemon 은 CYNARA 에게를  다른어플리케이션을 시작하도록 허가했는지 여부를 확인한다.

12. afm-user-daemon 은 Security-manager 기능을 사용하여 다른 응용프로그램의 보안 컨텍스트를 설정한다.

13. afm-user-daemon 은 다른 응용프로그램을 시작한다.


구성요소들은 다음과 같다.



단어 


isolated : 단하나의, 고립된




  • Security-Manager : Smack 컨텍스트 및 규칙 설정, 그룹 설정, 응용프로그램에 대한 CYNARA 규칙 초기내용 작성
  • CYNARA : 사용자 및 어플리케이션별로 API 접근 권한을 관리한다.
  • D-Bus : 메시지 보안 검사담당, 일반적인 보안규칙은 CYNARA 규칙에 따른다.
  • afm-system-daemon :  응용프로그램 설치, 및 제거를 담당한다.
  • afm-user-daemon : 응용프로그램 목록, 세부사항조회, 시작, 정지 ,중지, 다시시작을 담당한다.
  • afb-binder : HTTP 인터페이스를 통해 자원 및 기능을 제공하는 역할을 담당한다.
  • afm-main-binding : 응용프로그램이 AGL 프레임워크 API 를 사용할 수 있도록 한다. 


Links between the "Security framework" and the "Application"


보안 프레임워크는 보안 모델을 사용하기 위한 보안 모델과 해당 모델을 구현하기위해 제공되는 도구를 나타낸다.

 보안모델은 DAC( Discretionary Access Control) , MAC (Mandatory Access Control) , 기능 보안 및 개인정보를 위해 시스템에서 사용되는 방법을 나타낸다.

또한 감시 기능을 사용하여 보고하고 로그 및 경고를 관리하는 기능을 포함한다.


기능 : 설치/ 제거/ 시작/ 정지/ 목록


응용프로그램의 보안과 개인정보를 보장한다.

응용프로그램 프레임워크는 기본보안 모델/프레임워크와 호환되어야 한다. 그러나 응용프로그램에 숨겨야 한다.




The security framework


 구현된 보안모델은 Tizen3 이다.  Tizen3 에서 가져왔지만 meta-intel 을 통해서 제공된다.

항목은 아래와 같다.

  • Security-Manager
  • Cynara
  • Cynara 를 준수하는 D-Bus
두개의 패치가 보안관리자에 적용된다. 이 패치의 목적은 AGL 에 필요하지 않은 Tizen 패키지의 특정 종속성을 제거하기 위함이다. 이 패치들은 동작을 추가하거나 제거하지 않는다.
Tizen 의 보안프레임워킄는 로그파일을 검사하고 감시를 분석하는 훌륭한 기능을 제공하지만, 이 구성요소는 아직 개발중이다. 




The Application Framework


보안 프레임 워크 위에 있는 응용프로그램 프레임 워크는 응용프로그램을 설치, 제거하고 보안환경에서 실행하기 위한 구송요소를 제공한다.

목표는 응용프로그램을 관리하고 보안프레임워크의 세부정보를 응용프로그램에 숨기는 것이다.


응용프로그램은 위젯(웹 응용프로그램)의 사양과 일치해야하는 디지털 서명 컨테이너에 배포된다. 이것은 W3 컨소시엄의 기술 권장 widgets과 widgets-digsig에 의해 설명된다.





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

[AGL] config.xml 설정파일  (1) 2018.10.16
[AGL]smack  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10
[AGL] security-manager  (0) 2018.10.10
[AGL] app-framework-binder  (0) 2018.10.10


agl_spec_v1.0_final.pdf

AGL-Developer-Guides


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

[AGL]smack  (0) 2018.10.10
[AGL] Application FrameWork  (0) 2018.10.10
[AGL] security-manager  (0) 2018.10.10
[AGL] app-framework-binder  (0) 2018.10.10
[rpi] AGL Build  (0) 2018.10.08

afm-main 을 설치하기 위해 필요함


의존성 : libsqlite3-dev , smack , boost 


 sudo apt-get install libboost-program-options1.58-dev

 sudo apt-get install libcap-dev

sudo apt-get install sqlite3 libsqlite3-dev

sudo apt-get install systemd-journal-remote





./meta-agl/meta-security/recipes-security/security-manager/security-manager_git.bb

./meta-agl/meta-security/recipes-security/security-manager/security-manager.inc



./meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend

./meta-agl/meta-app-framework/recipes-security/security-manager/security-manager_git.bbappend


의존성 : attr boost cynara icu libcap smack sqlite3 sqlite3-native systemd 


git clone git://github.com/Samsung/security-manager.git


mater 

commit 10b062f317d5d5a7b88ed13242540e9034fd019f

Author: Piotr Sawicki <p.sawicki2@partner.samsung.com>

Date:   Fri Jun 30 12:02:34 2017 +0200


yocto 버전 860305a595d681d650024ad07b3b0977e1fcb0a6

패치적용

file://systemd-stop-using-compat-libs.patch \
file://security-manager-policy-reload-do-not-depend-on-GNU-.patch \
file://0001-Smack-rules-create-two-new-functions.patch \
file://0002-app-install-implement-multiple-set-of-smack-rules.patch \
file://c-11-replace-depracated-auto_ptr.patch \
file://socket-manager-removes-tizen-specific-call.patch \
file://Removing-tizen-platform-config.patch \
file://removes-dependency-to-libslp-db-utils.patch \

//libcap-without-pkgconfig.patch

//include-linux-xattr.patch



./meta-agl/meta-app-framework/recipes-core/security-manager/security-manager_%.bbappend


 패치 추가  

file://0001-Adapt-rules-to-AGL.patch \

 file://init-security-manager-db.service \

 file://init-security-manager-db.sh \

 file://0001-Fix-gcc6-build.patch \

 file://0001-Fix-Cmake-conf-for-gcc6-build.patch \

 file://0001-gcc-7-requires-include-functional-for-std-function.patch





/init-security-manager-db.sh 추가


init-security-manager-db.service 서비스 추가


init-security-manager-db.service



./sys/fs/cgroup/unified/system.slice/security-manager.service



cmake -DCMAKE_VERBOSE_MAKEFILE=ON \

-DSYSTEMD_INSTALL_DIR= /home/linux/AGL/Install/service/systemd \

-DBIN_INSTALL_DIR=${bindir} \

-DCMAKE_INSTALL_PREFIX=${datadir} \

../




cmake -DCMAKE_INSTALL_PREFIX=/home/linux/AGL/Install/ ../


Error 

 

- Checking for modules 'libsystemd-journal;libsmack;db-util;cynara-admin;cynara-client'

--   No package 'libsystemd-journal' found

--   No package 'libsmack' found

--   No package 'db-util' found


$ sudo apt-get install sqlite3

$ sudo apt-get install systemd-journal-remote



cmake -DCMAKE_INSTALL_PREFIX=~/AGL/Install/ -DSYSTEMD_INSTALL_DIR=/home/linux/AGL/Install/service/systemd -DDB_INSTALL_DIR=/home/linux/AGL/Install/db -DSHARE_INSTALL_PREFIX=/home/linux/AGL/Install -DINCLUDE_INSTALL_DIR=/home/linux/AGL/Install/ -DBIN_INSTALL_DIR=/home/linux/AGL/Install/bin -DLIB_INSTALL_DIR=/home/linux/AGL/Install/lib -DVERSION=1.0.2  -DCMAKE_VERBOSE_MAKEFILE=ON ../


cmake -DCMAKE_INSTALL_PREFIX=/opt/libraryAGL -DSYSTEMD_INSTALL_DIR=/opt/libraryAGL/systemd -DDB_INSTALL_DIR=/opt/libraryAGL/db -DSHARE_INSTALL_PREFIX=/opt/libraryAGL/lib -DINCLUDE_INSTALL_DIR=/opt/libraryAGL/include -DBIN_INSTALL_DIR=/opt/libraryAGL/bin -DLIB_INSTALL_DIR=/opt/libraryAGL/lib -DVERSION=1.0.2  -DCMAKE_VERBOSE_MAKEFILE=ON ../

error getenv 

In file included from /home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/src/binary_queue.cpp:23:0:
/home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/include/dpl/binary_queue.h:36:14: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
 typedef std::unique_ptr<BinaryQueue> BinaryQueueAutoPtr;
              ^
/home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/include/dpl/binary_queue.h:288:13: error: ‘BinaryQueueAutoPtr’ does not name a type
     virtual BinaryQueueAutoPtr Read(size_t size);
             ^
/home/linux/AGL/app/framework/afm-main/security-manager/src/dpl/core/src/binary_queue.cpp:289:1: error: ‘BinaryQueueAutoPtr’ does not name a type
 BinaryQueueAutoPtr BinaryQueue::Read(size_t size)

gcc 버전을 변경하여 빌드성공 -링크 github jlbancoc/Intall_gcc7_ubuntu_16.04.md

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gccg++ point to the newer version:

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
                         --slave /usr/bin/g++ g++ /usr/bin/g++-7 
sudo update-alternatives --config gcc
gcc --version
g++ --version

db 관련 빌드 에러시 build/db 안에 db.sql 파일 복사및 해당 폴더에서 make 실행

Install the project...

/usr/bin/cmake -P cmake_install.cmake

-- Install configuration: ""

-- Up-to-date: /opt/libraryAGL/include/security-manager/security-manager.h

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-commons.so.1.0.2

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-commons.so.1

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-commons.so

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-client.so.1.0.2

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-client.so.1

-- Up-to-date: /opt/libraryAGL/lib/libsecurity-manager-client.so

-- Up-to-date: /opt/libraryAGL/bin/security-manager

-- Up-to-date: /opt/libraryAGL/bin/security-manager-cmd

-- Installing: /etc/gumd/useradd.d/50_security-manager-add.post

-- Installing: /etc/gumd/userdel.d/50_security-manager-remove.pre

-- Installing: /opt/libraryAGL/lib/pkgconfig/security-manager.pc

-- Installing: /opt/libraryAGL/systemd/security-manager.service

-- Installing: /opt/libraryAGL/systemd/security-manager.socket

-- Installing: /opt/libraryAGL/db/.security-manager.db

-- Installing: /opt/libraryAGL/db/.security-manager.db-journal

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-normal.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-system.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-admin.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/usertype-guest.profile

-- Installing: /opt/libraryAGL/lib/security-manager/policy/app-rules-template.smack

-- Installing: /opt/libraryAGL/lib/security-manager/policy/privilege-group.list

-- Installing: /opt/libraryAGL/bin/security-manager-policy-reload 




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

[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10
[AGL] app-framework-binder  (0) 2018.10.10
[rpi] AGL Build  (0) 2018.10.08
[AGL] cynara  (0) 2018.08.14

AGL Framework Binder

 This project provides



git clone https://gerrit.automotivelinux.org/gerrit/src/app-framework-binder


최신 소스 : 40fa7ea26a59f10d8036d89399f42a4e9d26a58a

 2018-10-04 06:44:46


라이센스 정보 : Apache-2.0

의존성  

 * libmagic ("libmagic-dev" under Ubuntu, "file-devel" under Fedora);

 * libmicrohttpd >= 0.9.55  (fetch and build from "http://ftp.gnu.org/gnu/libmicrohttpd");

 * json-c ("libjson-c-dev/devel");

 * uuid ("uuid-dev/libuuid-devel");

 * openssl ("libssl-dev/openssl-devel");

 * systemd >= 222 ("libsystemd-dev/systemd-devel");




* cynara (https://github.com/Samsung/cynara) 먼저 설치


  • Ubuntu 설치
$ sudo apt-get install libmagic-dev libjson-c-dev uuid-dev libsystemd-dev libssl-dev gcc make pkg-config cmake
$ sudo apt-get install libmicrohttpd-dev



  • app-framework-binder 설치
        $ git clone https://git.automotivelinux.org/src/app-framework-binder
        $ cd app-framework-binder
        $ mkdir build
        $ cd build
        $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..
        $ make install

mkdir build
cmake -DCMAKE_INSTALL_PREFIX=/home/linux/AGL/afm -DAGL_DEVEL=true -DINCLUDE_MONITORING=true ../

-- Checking for module 'cynara-client'

--   No package 'cynara-client' found

CMake Warning at CMakeLists.txt:117 (MESSAGE):

  Dependency to 'libmicrohttpd' is missing


-- The C compiler identification is GNU 5.4.0

-- The CXX compiler identification is GNU 5.4.0

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Detecting C compile features

-- Detecting C compile features - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Detecting CXX compile features

-- Detecting CXX compile features - done

-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 

-- Looking for pthread.h

-- Looking for pthread.h - found

-- Looking for pthread_create

-- Looking for pthread_create - not found

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - not found

-- Looking for pthread_create in pthread

-- Looking for pthread_create in pthread - found

-- Found Threads: TRUE  

-- Checking for module 'json-c'

--   Found json-c, version 0.11.99

-- Looking for include file magic.h

-- Looking for include file magic.h - found

-- Looking for magic_load in magic

-- Looking for magic_load in magic - found

-- Checking for module 'libsystemd>=222'

--   Found libsystemd, version 229

-- Checking for module 'libmicrohttpd>=0.9.55'

--   

-- Checking for module 'openssl'

--   Found openssl, version 1.0.2g

-- Checking for module 'uuid'

--   Found uuid, version 2.27.0

-- Checking for module 'cynara-client'

--   Found cynara-client, version 0.14.10

CMake Warning at CMakeLists.txt:117 (MESSAGE):

  Dependency to 'libmicrohttpd' is missing



CMake Error at CMakeLists.txt:126 (MESSAGE):

  Can't compile the binder, either define ONLY_DEVTOOLS or install

  dependencies

 


libmicrohttpd : http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.59.tar.gz

http://ftp.gnu.org/gnu/libmicrohttpd/


./configure --prefix ~/AGL/Install/

make -j8

make install

 



cmake -DCMAKE_INSTALL_PREFIX=/home/linux/AGL/Install -DAGL_DEVEL=true -DINCLUDE_MONITORING=true ../

-- Checking for module 'libmicrohttpd>=0.9.55'

--   Found libmicrohttpd, version 0.9.59

-- Checking for module 'check'

--   No package 'check' found

CMake Warning at src/tests/CMakeLists.txt:29 (MESSAGE):

  check not found! no test!



-- Configuring done

-- Generating done

-- Build files have been written to: /home/linux/AGL/app/framework/app-framework-binder/build


sudo apt-get install check





app-framework-main 설치


sudo apt-get install libxmlsec1-dev


-- Checking for module 'security-manager'

--   No package 'security-manager' found

설치 필요


cmake -DCMAKE_INSTALL_PREFIX=/ .

make

sudo make install



-- Up-to-date: /opt/libraryAGL/lib/pkgconfig/afm-main.pc

-- Up-to-date: /opt/libraryAGL/bin/wgtpkg-sign

-- Up-to-date: /opt/libraryAGL/bin/wgtpkg-pack

-- Up-to-date: /opt/libraryAGL/bin/wgtpkg-info

-- Up-to-date: /opt/libraryAGL/bin/wgtpkg-installer

-- Up-to-date: /opt/libraryAGL/bin/afm-user-daemon

-- Up-to-date: /opt/libraryAGL/libexec/afm/afm-binding.so

-- Up-to-date: /opt/libraryAGL/bin/afm-user-session

-- Installing: /etc/opt/libraryAGL/afm/unit.env.d

-- Installing: /etc/opt/libraryAGL/afm/afm-unit.conf

-- Installing: /opt/libraryAGL/etc/dbus-1/system.d/afm-system-daemon.conf

-- Installing: /opt/libraryAGL/etc/pam.d/afm-user-session

-- Installing: /opt/libraryAGL/lib/systemd/system/afm-api-afm-main@.service

-- Installing: /opt/libraryAGL/lib/systemd/system/afm-system-daemon.service

-- Installing: /opt/libraryAGL/lib/systemd/system/afm-system-daemon.socket

-- Installing: /opt/libraryAGL/lib/systemd/system/afm-system-setup.service

-- Installing: /opt/libraryAGL/lib/systemd/system/afm-user-session@.service

-- Installing: /opt/libraryAGL/lib/systemd/system/afm-user-session@.target

-- Installing: /opt/libraryAGL/lib/systemd/system/afm-user-setup@.service

-- Installing: /opt/libraryAGL/etc/dbus-1/session.d/afm-user-daemon.conf

-- Installing: /opt/libraryAGL/lib/systemd/user/afm-user-daemon.service

-- Installing: /opt/libraryAGL/bin/afm-util

-- Installing: /opt/libraryAGL/bin/afm-install

-- Installing: /etc/opt/libraryAGL/afm/certs/developer.cert.pem

-- Installing: /etc/opt/libraryAGL/afm/certs/partner.cert.pem

-- Installing: /etc/opt/libraryAGL/afm/certs/platform.cert.pem

-- Installing: /etc/opt/libraryAGL/afm/certs/public.cert.pem

-- Installing: /etc/opt/libraryAGL/afm/certs/root.cert.pem

 




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

[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10
[AGL] security-manager  (0) 2018.10.10
[rpi] AGL Build  (0) 2018.10.08
[AGL] cynara  (0) 2018.08.14

공식사이트


Download Master Branch


 $ repo init -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo

 $ repo sync


source meta-agl/scripts/aglsetup.sh -m raspberrypi3 agl-demo agl-netboot agl-appfw-smack


agl-demo agl-netboot agl-appfw-smack

------------ aglsetup.sh: Starting

Generating configuration files:

   Build dir: /home/kj/AGL/rpi_agl/build

   Machine: raspberrypi3

   Features: agl-appfw-smack agl-audio-4a-framework agl-demo agl-hmi-framework agl-netboot agl-profile-graphical agl-profile-graphical-qt5 agl-pulseaudio

   Running /home/kj/AGL/rpi_agl/poky/oe-init-build-env

   Templates dir: /home/kj/AGL/rpi_agl/meta-agl/templates/base

   Config: /home/kj/AGL/rpi_agl/build/conf/bblayers.conf

   Config: /home/kj/AGL/rpi_agl/build/conf/local.conf

   Setup script: /home/kj/AGL/rpi_agl/build/conf/setup.sh

   Executing setup script ... --- beginning of setup script

--- fragment /home/kj/AGL/rpi_agl/meta-agl/templates/base/01_setup_EULAfunc.sh

--- fragment /home/kj/AGL/rpi_agl/meta-agl/templates/base/01_setup_pkg_revision.sh

--- fragment /home/kj/AGL/rpi_agl/meta-agl/templates/base/99_setup_EULAconf.sh

--- end of setup script

OK

Generating setup file: /home/kj/AGL/rpi_agl/build/agl-init-build-env ... OK

------------ aglsetup.sh: Done

Common targets are:

  - meta-agl:          (core system)

    agl-image-minimal

    agl-image-minimal-qa


    agl-image-ivi

    agl-image-ivi-qa

    agl-image-ivi-crosssdk


    agl-image-weston


  - meta-agl-demo:     (demo with UI)

    agl-demo-platform  (* default demo target)

    agl-demo-platform-qa

    agl-demo-platform-crosssdk


    agl-demo-platform-html5



local.conㄹ 추가

BB_NUMBER_THREADS = "10"

PARALLEL_MAKE = "-j 8"


bitbake agl-demo-platform

NOTE: Resolving any missing task queue dependencies


Build Configuration:

BB_VERSION           = "1.36.0"

BUILD_SYS            = "x86_64-linux"

NATIVELSBSTRING      = "ubuntu-16.04"

TARGET_SYS           = "arm-agl-linux-gnueabi"

MACHINE              = "raspberrypi3"

DISTRO               = "poky-agl"

DISTRO_VERSION       = "6.90.0+snapshot-20181008"

TUNE_FEATURES        = "arm armv7ve vfp thumb neon vfpv4 callconvention-hard"

TARGET_FPU           = "hard"

meta-raspberrypi     = "HEAD:8e4c537d84fdde8e3b4642d0dda2c0f4af76d52f"

meta-agl-profile-graphical = "HEAD:24ca2ee061ee6f57c3a9e6238b3828f30238b6af"

meta-qt5             = "HEAD:682ad61c071a9710e9f9d8a32ab1b5f3c14953d1"

meta-agl-profile-graphical-qt5

meta-netboot         = "HEAD:24ca2ee061ee6f57c3a9e6238b3828f30238b6af"

meta-hmi-framework

meta-audio-4a-framework = "HEAD:3b2111ffe4a7a004479445f857e0b4cf09694c7a"

meta-agl-demo        = "HEAD:c9539d423beabc75245ae8f6eeadb2d18ad834c0"

meta-oe

meta-multimedia

meta-networking

meta-python

meta-filesystems     = "HEAD:352531015014d1957d6444d114f4451e241c4d23"

meta-agl-profile-core

meta-agl-distro

meta-agl-bsp         = "HEAD:24ca2ee061ee6f57c3a9e6238b3828f30238b6af"

meta-security        = "HEAD:8f6969a775fa6afbf553e72ba83e71197780b2d8"

meta-perl            = "HEAD:352531015014d1957d6444d114f4451e241c4d23"

meta-security

meta-app-framework   = "HEAD:24ca2ee061ee6f57c3a9e6238b3828f30238b6af"

meta

meta-poky            = "HEAD:7e7ee662f5dea4d090293045f7498093322802cc"



./meta-agl-profile-core/recipes-platform/images/agl-image-ivi-crosssdk.bb

agl-image-minimal-crosssdk.bb


SUMMARY = "An AGL small image just capable of allowing a device to boot."


require agl-image-minimal.inc


LICENSE = "MIT"


IMAGE_INSTALL_append = "\

    packagegroup-agl-image-minimal \

    " 



IMAGE_LINGUAS = " "


inherit core-image


IMAGE_INSTALL = "${CORE_IMAGE_EXTRA_INSTALL}"


IMAGE_ROOTFS_SIZE ?= "8192"


# Allow extra IMAGE_FSTYPES to be added by boards configs

IMAGE_FSTYPES += "${AGL_EXTRA_IMAGE_FSTYPES}"



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

[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10
[AGL] security-manager  (0) 2018.10.10
[AGL] app-framework-binder  (0) 2018.10.10
[AGL] cynara  (0) 2018.08.14


REAME 파일 : https://github.com/Samsung/cynara




cynara 는 빠르고 간단하며 안전한 정책검사기 서비스이다. 





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

[AGL] Application FrameWork  (0) 2018.10.10
[AGL] 링크 통합  (0) 2018.10.10
[AGL] security-manager  (0) 2018.10.10
[AGL] app-framework-binder  (0) 2018.10.10
[rpi] AGL Build  (0) 2018.10.08

+ Recent posts