Fix a spell miss of document.
[AGL/documentation.git] / docs / 3_Developer_Guides / 4_AFB_Helper_Guide / 1_Usage.md
1 ---
2 title: Usage
3 ---
4
5 ## Installation
6
7 The afb-helpers library is integrated by default in the AGL SDK since the Guppy
8 version (>=7) and is also available as a package for the AGL supported linux
9 distributions.
10
11 You could find the SDK build from Yocto which embed the afb-helpers library
12 here:
13
14 - **x86** : [qemux86-64](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemux86-64/deploy/sdk/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-corei7-64-qemux86-64-toolchain-10.90.0+snapshot.sh)
15
16 - **ARM 32 bit** : [qemuarm](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm/deploy/sdk/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-armv7vet2hf-neon-vfpv4-qemuarm-toolchain-10.90.0+snapshot.sh)
17
18 - **AARCH64 - ARM 64bit** : [qemuarm64](https://download.automotivelinux.org/AGL/snapshots/master/latest/qemuarm64/deploy/sdk/poky-agl-glibc-x86_64-agl-demo-platform-crosssdk-aarch64-qemuarm64-toolchain-10.90.0+snapshot.sh)
19
20 Then use your package manager to install the library.
21
22 ### OpenSuse
23
24 ```bash
25 sudo zypper ref
26 sudo zypper install agl-libafb-helpers-devel
27 ```
28
29 ### Fedora
30
31 ```bash
32 sudo dnf ref
33 sudo dnf install agl-libafb-helpers-devel
34 ```
35
36 ### Ubuntu/Debian
37
38 ```bash
39 sudo apt-get update
40 sudo apt-get install agl-libafb-helpers-dev
41 ```
42
43 ## (Optional) Remove the git submodule version
44
45 If you already use the afb-helpers component but using the submodule version
46 then you have to get rid of it to be sure to link and use the library version.
47 To do so, you have to do the following:
48
49 * Deinitialize the submodule using `git`
50
51 ```bash
52 # This example assumes that the git submodule is named app-afb-helpers-submodule
53 # and is located at your root project repository.
54 git submodule deinit app-afb-helpers-submodule
55 ```
56
57 * Remove the submodule relatives lines from the `.gitmodules` file
58
59 ```bash
60 vim .gitmodules
61 ```
62
63 * Remove the `afb-helpers` target link from any CMake target you specified.
64  Those lines look like:
65
66 ```bash
67 TARGET_LINK_LIBRARIES(${TARGET_NAME}
68     afb-helpers # REMOVE THIS LINE
69     ${link_libraries}
70     )
71 ```
72
73 ## Add the libafb-helpers as a static library to your binding
74
75 In your `config.cmake` file, add a dependency to the controller library, i.e:
76
77 ```cmake
78 set(PKG_REQUIRED_LIST
79         json-c
80         afb-daemon
81         afb-helpers --> this is the afb-helpers library dependency name.
82 )
83 ```