From version 37.1
edited by MatthieuTanon
on 2018/01/15 13:58
To version 38.1
edited by MatthieuTanon
on 2018/01/15 14:39
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Building Linphone with Yocto
1 +Building Linphone and Flexisip with Yocto
Content
... ... @@ -2,9 +2,9 @@
2 2  {{toc /}}
3 3  {{/box}}
4 4  
5 -= Build Linphone on Yocto =
5 += Build Linphone and Flexisip on Yocto =
6 6  
7 -This pages describes how to build Linphone on Yocto, on any hardware platform.
7 +This pages describes how to build Linphone and/or Flexisip on Yocto, on any hardware platform.
8 8  This is not a Yocto tutorial, and therefore this requires a little bit of first-hand Yocto experience.
9 9  A few leads and links are given for the installation of packages on the target machine, however it is mainly out of this wiki page's scope.
10 10  
... ... @@ -41,7 +41,6 @@
41 41  === Using cmake 3 with Fido ===
42 42  
43 43  {{info}}
44 -You only need to to this step if you are using new linphone recipes ( in the *.inc recipe files, look for "inherit cmake") . The older ones use the autotools and are working fine( in the *.inc recipe files, look for "inherit autotools").
45 45  You don't need this step if you are using Yocto Morty
46 46  {{/info}}
47 47  
... ... @@ -49,7 +49,7 @@
49 49  
50 50  Fortunately, a patch has been done to allow porting cmake 3.2.2 to Fido , the commit is here [[http:~~/~~/cgit.openembedded.org/openembedded-core/patch/?id=c171909352b5ed92166857b0bbcd901ae0f74996>>url:http://cgit.openembedded.org/openembedded-core/patch/?id=c171909352b5ed92166857b0bbcd901ae0f74996]] from [[http:~~/~~/cgit.openembedded.org/openembedded-core/commit/?id=c171909352b5ed92166857b0bbcd901ae0f74996>>url:http://cgit.openembedded.org/openembedded-core/commit/?id=c171909352b5ed92166857b0bbcd901ae0f74996]] . The following file contains the patch based on this commit [[cmake_upgrade_to_3.2.2.patch>>attach:cmake_upgrade_to_3.2.2.patch]]
51 51  
52 -If you put the file under the openembedded-core **(TBD)** directory, starting the patch from the same directory, the command would be:
51 +If you put the file under the **poky** directory, starting the patch from the same directory, the command would be:
53 53  
54 54  {{code}}
55 55  git apply cmake_ugrade_to_3.2.2.patch
... ... @@ -107,7 +107,7 @@
107 107  
108 108  === Add the linphone recipe to the layers ===
109 109  
110 -In the bblayers.conf file, under build/conf/ add the following line:
109 +In the **bblayers.conf** file, under build/conf/ add the following line:
111 111  
112 112  {{code}}
113 113  ${BSPDIR}/sources/meta-bc
... ... @@ -137,7 +137,7 @@
137 137  
138 138  === Add linphone to the image build ===
139 139  
140 -Once Linphone is built you can add it to the final image in local.conf using the following lines:
139 +Once Linphone is built you can add it to the final image in **local.conf** using the following lines:
141 141  
142 142  {{code}}
143 143  IMAGE_INSTALL_append = " linphone"
... ... @@ -145,7 +145,7 @@
145 145  
146 146  === Choose linphone version ===
147 147  
148 -Linphone can be built by Yocto as a stable version (equivalent to linphone-desktop revision) or as the latest version which provides the latest revision on submodules automatically, which can be unstable or at least unpredictable. By default the stable version is selected but if you want to use the latest version you need to add the following line in local.conf:
147 +Linphone can be built by Yocto as a stable version (equivalent to linphone-desktop revision) or as the latest version which provides the latest revision on submodules automatically, which can be unstable or at least unpredictable. By default the stable version is selected but if you want to use the latest version you need to add the following line in **local.conf**:
149 149  
150 150  {{code}}
151 151  LATEST_REVISIONS = "1"
... ... @@ -155,7 +155,7 @@
155 155  
156 156  This is useful for libav, otherwise the linphone build will fail.
157 157  
158 -In the local.conf file under build/conf/, add the following lines :
157 +In the **local.conf** file under build/conf/, add the following lines :
159 159  
160 160  {{code}}
161 161  LICENSE_FLAGS_WHITELIST = "commercial"
... ... @@ -169,29 +169,30 @@
169 169  
170 170  === Change the packaging option ===
171 171  
172 -In the file local.conf, under build/conf/, make sure the PACKAGE_CLASSES is set to package_ipk:
171 +In the file **local.conf**, under build/conf/, make sure the PACKAGE_CLASSES is set to package_ipk:
173 173  
174 174  {{code}}
175 175  PACKAGE_CLASSES ?= "package_ipk"
176 176  {{/code}}
177 177  
178 -=== Add liblinphone_tester ===
177 +=== Add liblinphone_tester or flexisip ===
179 179  
180 -If you want to add liblinphone_tester to the final image you can add the following line in local.conf:
179 +If you want to add liblinphone_tester and/or flexisip to the final image you can add the following line in **local.conf**:
181 181  
182 182  {{code}}
183 183  IMAGE_INSTALL_append = " linphone-tester"
183 +IMAGE_INSTALL_append = " flexisip"
184 184  {{/code}}
185 185  
186 186  === Disable the video options ===
187 187  
188 -If you don't need video support, add the following line in local.conf:
188 +If you don't need video support, add the following line in **local.conf**:
189 189  
190 190  {{code}}
191 191  DISTRO_FEATURES_remove = "x11 wayland"
192 192  {{/code}}
193 193  
194 -In the linphone.inc recipe file under /meta-bc/recipes-bc/linphone/linphone, remove the video with the following line :
194 +In the **linphone.inc** recipe file under /meta-bc/recipes-bc/linphone/linphone, remove the video with the following line :
195 195  
196 196  {{code}}
197 197  PACKAGECONFIG ??= "sqlite zlib video ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
... ... @@ -205,7 +205,7 @@
205 205  
206 206  === Select number of CPU cores used for the build ===
207 207  
208 -In the local.conf file under build/conf/, add the following line:
208 +In the **local.conf** file under build/conf/, add the following line:
209 209  
210 210  {{code}}
211 211  BB_NUMBER_THREADS ?= "X"
... ... @@ -215,7 +215,7 @@
215 215  
216 216  === Add networking packages if necessary ===
217 217  
218 -If you want to add networking packages to the core images, for example you can add the following lines to local.conf:
218 +If you want to add networking packages to the core images, for example you can add the following lines to **local.conf**:
219 219  
220 220  {{code}}
221 221  CORE_IMAGE_EXTRA_INSTALL += "dhcpcd"
... ... @@ -224,7 +224,7 @@
224 224  
225 225  === Save disk space during builds ===
226 226  
227 -You can save disk space during build by adding the following line to local.conf:
227 +You can save disk space during build by adding the following line to **local.conf**:
228 228  
229 229  {{code}}
230 230  INHERIT += "rm_work"
... ... @@ -232,7 +232,7 @@
232 232  
233 233  === Add ssh server if necessary ===
234 234  
235 -If you want to add an ssh server to the core images, you can modify the following line to local.conf:
235 +If you want to add an ssh server to the core images, you can modify the following line to **local.conf**:
236 236  
237 237  {{code}}
238 238  EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh"
... ... @@ -239,27 +239,30 @@
239 239  {{/code}}
240 240  
241 241  
242 -== Build Linphone and the final image ==
242 +== Build Linphone, Flexisip and the final image ==
243 243  
244 -Linphone must be built first before integrating it to the final image.
244 +Linphone and Flexisip must be built first before integrating them to the final image.
245 245  
246 246  === Build Linphone ===
247 247  
248 -Now that you're environment is all set up, run the following command to build the Linphone package:
248 +Now that you're environment is all set up, run the following commands to build the Linphone and/or the Flexisip packages:
249 249  
250 250  {{code}}
251 251  bitbake linphone
252 +bitbake flexisip
252 252  {{/code}}
253 253  
254 254  === Build the final image ===
255 255  
256 -Then you can build the image you want using the following example command:
257 +Then you can build the image you want using the following example command, which will use the configuration you specified in **local.conf**:
257 257  
258 258  {{code}}
259 259  bitbake core-image-minimal
260 260  {{/code}}
261 261  
263 +The Linphone package detailed here allows you to use linphone-daemon and linphonec, as well as liblinphone_tester if you added it in the configuration files.
262 262  
265 +
263 263  == Build for Wandboard Solo Freescale i.MX6 Cortex-A9 ==
264 264  
265 265  Example of a build for a specific hardware board with an ARMv7 architecture, which can be helpful to understand how to build for other hardware pieces.
... ... @@ -284,7 +284,7 @@
284 284  
285 285  === Add these layers to bblayers.conf ===
286 286  
287 -You can now add the layers to the bblayers.conf configuration file under /build/conf/, which should now be similar to this:
290 +You can now add the layers to the **bblayers.conf** configuration file under /build/conf/, which should now be similar to this:
288 288  
289 289  {{code}}
290 290  POKY_BBLAYERS_CONF_VERSION = "2"
... ... @@ -311,7 +311,7 @@
311 311  
312 312  === Change target machine to "wandboard" ===
313 313  
314 -In order to use the wandboard layers of metadata for the build you need to change to target machine in local.conf:
317 +In order to use the wandboard layers of metadata for the build you need to change to target machine in **local.conf**:
315 315  
316 316  {{code}}
317 317  MACHINE = "wandboard"
... ... @@ -319,7 +319,7 @@
319 319  
320 320  === Accept Freescale EULA ===
321 321  
322 -To accept the Freescale EULA you can add the following line to local.conf
325 +To accept the Freescale EULA you can add the following line to **local.conf**:
323 323  
324 324  {{code}}
325 325  ACCEPT_FSL_EULA = "1"
... ... @@ -351,6 +351,10 @@
351 351  
352 352  Then you can flash it on an sd card with the dd command. In this example the sd card device is called /dev/sdb.
353 353  
357 +{{info}}
358 +The following step is critical, be sure to target the correct device before executing the "dd" command. The "lsblk" command is very useful to determine to correct device.
359 +{{/info}}
360 +
354 354  {{code}}
355 355  sudo dd if=core-image-minimal-wandboard.wic of=/dev/sdb bs=1024
356 356  {{/code}}
... ... @@ -357,4 +357,4 @@
357 357  
358 358  === Start liblinphone_tester and linphone-daemon ===
359 359  
360 -Once the sd card is in the Wanboard you can boot with the default login "root". You can find liblinphone_tester and linphone-daemon under /usr/bin/.
367 +Once the sd card is in the Wanboard you can boot with the default login "root". You can find liblinphone_tester, linphone-daemon and linphonec under /usr/bin/.