Commit 564fbb00 authored by jehan's avatar jehan Committed by jehan

Add Raspbian support

parent 2fc9c4bc
#################################################
# Makefile
#################################################
job-raspbian-makefile-gcc:
tags: [ "docker-centos7" ]
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-raspbian
extends: .linux-prepare
only:
variables:
- $NIGHTLY_MASTER
variables:
CMAKE_GENERATOR: Unix Makefiles
stage: build
script:
- mkdir -p build-raspberry
- cd build-raspberry
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Raspberry $DEFAULT_LINUX_CMAKE_OPTIONS $CMAKE_OPTIONS
- echo $CMAKE_GENERATOR
- echo $DEFAULT_LINUX_CMAKE_OPTIONS
- echo $CMAKE_OPTIONS
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS
- echo $ADDITIONAL_BUILD_OPTIONS
artifacts:
paths:
- build-raspberry/linphone-sdk/raspberry/bin/*
- build-raspberry/linphone-sdk/raspberry/lib/*
- build-raspberry/linphone-sdk/raspberry/lib64/*
- build-raspberry/linphone-sdk/raspberry/include/*
- build-raspberry/linphone-sdk/raspberry/share/*
- build-raspberry/WORK/raspberry/Build/bctoolbox/tester/*
- build-raspberry/WORK/raspberry/Build/bzrtp/test/*
#Lime data folder isn't installed at the right place !
#We have to find it and add it manually...
- lime/tester/*
- linphone/tester/*
expire_in: 1 week
......@@ -22,6 +22,7 @@ include:
- '.gitlab-ci-files/job-android.yml'
- '.gitlab-ci-files/job-ios.yml'
- '.gitlab-ci-files/job-linux-desktop.yml'
- '.gitlab-ci-files/job-raspbian.yml'
- '.gitlab-ci-files/job-linux-desktop-archlinux-latest.yml'
- '.gitlab-ci-files/job-linux-desktop-centos7.yml'
- '.gitlab-ci-files/job-linux-desktop-debian8.yml'
......
......@@ -82,7 +82,7 @@ Otherwise, you can use the `cmake-gui` or `ccmake` commands to configure all the
Some customization are particularly important:
1. `CMAKE_BUILD_TYPE`: By default it is set to `RelWithDebInfo` to build in release mode keeping the debug information. You might want to set it to `Debug` to ease the debugging. On Android, use `ASAN` to make a build linking with the Android Adress Sanitizer (https://github.com/google/sanitizers/wiki/AddressSanitizerOnAndroid).
2. `LINPHONESDK_PLATFORM`: The platform for which you want to build the Linphone SDK. It must be one of: `Android`, `IOS`.
2. `LINPHONESDK_PLATFORM`: The platform for which you want to build the Linphone SDK. It must be one of: `Android`, `IOS`, Raspberry or Desktop (default value).
3. `LINPHONESDK_ANDROID_ARCHS`: A comma-separated list of the architectures for which you want to build the Android Linphone SDK for.
4. `LINPHONESDK_IOS_ARCHS`: Same as `LINPHONESDK_ANDROID_ARCHS` but for an iOS build.
5. `LINPHONESDK_IOS_BASE_URL`: The base of the URL that will be used to download the zip file of the SDK.
......
Subproject commit f20bd431414b196ce414e2400a9d4b373d91add8
Subproject commit 0a72381dffd5546403a6e56d7c03d5293d70451a
############################################################################
# LinphoneSDKCheckBuildToolsAndroid.cmake
# Copyright (C) 2010-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
include(LinphoneSdkCheckBuildToolsCommon)
if(NOT UNIX)
message(FATAL_ERROR "You need to use a Linux or Mac OS X system to build for Android")
endif()
cmake_minimum_required(VERSION 3.10)
############################################################################
# LinphoneSdkPlatformDesktop.cmake
# Copyright (C) 2010-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
include(LinphoneSdkPlatformCommon)
include(LinphoneSdkCheckBuildToolsRaspberry)
set(_cmake_args
"-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/linphone-sdk/raspberry"
"-DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/linphone-sdk/raspberry"
"-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON"
"-DLINPHONE_BUILDER_WORK_DIR=${CMAKE_BINARY_DIR}/WORK/raspberry"
"-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=${CMAKE_SOURCE_DIR}"
"-DLINPHONE_BUILDER_CONFIG_FILE=configs/config-desktop-raspberry.cmake"
"-DCMAKE_TOOLCHAIN_FILE=toolchains/toolchain-raspberry.cmake"
)
linphone_sdk_get_inherited_cmake_args()
linphone_sdk_get_enable_cmake_args()
list(APPEND _cmake_args ${_enable_cmake_args})
if(LINPHONESDK_PREBUILD_DEPENDENCIES)
set(_ep_depends DEPENDS ${LINPHONESDK_PREBUILD_DEPENDENCIES})
endif()
set(_install_command "${CMAKE_SOURCE_DIR}/cmake/dummy.sh")
ExternalProject_Add(sdk
${_ep_depends}
SOURCE_DIR "${CMAKE_SOURCE_DIR}/cmake-builder"
BINARY_DIR "${CMAKE_BINARY_DIR}/raspberry"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS ${_cmake_args}
CMAKE_CACHE_ARGS ${_inherited_cmake_args}
INSTALL_COMMAND ${_install_command}
)
ExternalProject_Add_Step(sdk force_build
COMMENT "Forcing build for 'raspberry'"
DEPENDEES configure
DEPENDERS build
ALWAYS 1
)
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
USER root
RUN git clone --progress --verbose https://github.com/raspberrypi/tools.git --depth=1 /opt/raspberry-tools
RUN mkdir -p /opt
# with raspbian-rootfs a directory built from a runtime image of a raspbian. It can be extracted using rsync -r pi@my-raspberry-pi:/XXX raspbian-rootfs
COPY raspbian-rootfs /opt/raspbian-rootfs
USER bc
ENV RASPBIAN_ROOTFS=/opt/raspbian-rootfs
ENV PATH=/opt//raspberry-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin:${PATH}
ENV RASPBERRY_VERSION=2
Subproject commit b661d62e59da8d9d1a66dd6e9f84b9e81f9bd6bc
Subproject commit dae4cca2a6dea57eef61b1f4ccc58a979894dc6a
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment