Add openembedded build

This commit is contained in:
Yann Diorcet 2012-03-26 12:56:06 +02:00
parent 0950feddf6
commit d76e2129eb
8 changed files with 269 additions and 0 deletions

51
build/openembedded/README Normal file
View file

@ -0,0 +1,51 @@
Recipes for open embedded: http://www.openembedded.org
Documentations:
http://docs.openembedded.org/usermanual/
http://bitbake.berlios.de/manual/
Instructions for compilation from sources: (requires 10 Go of free space)
- Choose a distribution and build it.
For example, to build Angstrom follow the guide at http://www.angstrom-distribution.org/building-angstrom
For IGEPv2 use environment variable MACHINE=igep0020
- Add recipes to the pool with an higher priority).
See http://bitbake.berlios.de/manual/ch04s02.html#id870544 Example 4.8. Using “bbfile collections”
Example:
BBFILES = "/Data/work/angstrom/angstrom-setup-scripts/sources/openembedded/recipes/*/*.bb /home/guillaume/dev/linphone-daemon/build/openembedded/*.bb"
BBFILE_COLLECTIONS = "upstream local"
BBFILE_PATTERN_upstream = "^/Data/"
BBFILE_PATTERN_local = "^/home/"
BBFILE_PRIORITY_upstream = "5"
BBFILE_PRIORITY_local = "10"
- Prepare compilation
Source appropriate environment with "~/.oe/enviro*"
Change directory to where you launched Angstrom install script.
- Compile linphone / linphonec
bitbake -c clean linphone
bitbake linphone
- Find the generated packages "*.ipk"
Example: /Data/work/angstrom/angstrom-setup-scripts/build/tmp-angstrom_2008_1/deploy/glibc/ipk/armv7a/
Installation
- check network connectivity
* ping linphone.org
* see "route -n"
* see "/etc/resolv.conf"
- update package list
* opkg update
- copy ipk files to install to /tmp
- eventually remove previously installed packages
- install with "opkg install libortp*.ipk libmediastreamer*.ipk liblinphone*.ipk linphonec*.ipk"

View file

@ -0,0 +1,13 @@
--- linphone/mediastreamer2/src/alsa.c_orig 2011-05-24 12:39:33.824600109 +0200
+++ linphone/mediastreamer2/src/alsa.c 2011-05-24 12:40:04.760407404 +0200
@@ -32,8 +32,8 @@
/*in case of troubles with a particular driver, try incrementing ALSA_PERIOD_SIZE
to 512, 1024, 2048, 4096...
then try incrementing the number of periods*/
-#define ALSA_PERIODS 8
-#define ALSA_PERIOD_SIZE 256
+#define ALSA_PERIODS 4
+#define ALSA_PERIOD_SIZE 512
/*uncomment the following line if you have problems with an alsa driver
having sound quality trouble:*/

View file

@ -0,0 +1,17 @@
DESCRIPTION = "High level Session Initiation Protocol (SIP) library"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "libosip2"
SRCNAME = "libeXosip2"
LEAD_SONAME = "libeXosip2"
PR = "r1"
SRC_URI = "http://download.savannah.nongnu.org/releases/exosip/${SRCNAME}-${PV}.tar.gz"
S = "${WORKDIR}/${SRCNAME}-${PV}"
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-josua"
DEFAULT_PREFERENCE = "3"
SRC_URI[md5sum] = "51e85725571870614e448f63c33c8996"
SRC_URI[sha256sum] = "46010e62a6f675df13e5be759d033b6bce1bd5882eebb4acd553f9dd3b461afc"

View file

@ -0,0 +1,74 @@
SECTION = "x11/network"
SECTION_liblinphone = "libs/network"
SECTION_libmediastreamer = "libs/network"
SECTION_libortp = "libs/network"
SECTION_linphonec = "console/network"
SRC_URI_append_igep0020 = " file://alsa_8khz.patch"
DEPENDS = "intltool readline libosip2 libexosip2 speex alsa-lib spandsp"
DEPENDS_append_video = " libxv ffmpeg libv4l"
DEPENDS_append_gtk = " gtk+"
DEPENDS_${PN} = "intltool liblinphone"
DEPENDS_${PN}_append_gtk = " gtk+"
DEPENDS_${PN}_append_video = " libxv"
DEPENDS_${PN}c = "liblinphone readline"
DEPENDS_liblinphone = "libmediastreamer libortp libosip2 libexosip2"
DEPENDS_libmediastreamer = "speex alsa-lib libortp"
DEPENDS_libmediastreamer_append_video = " ffmpeg libv4l"
PROVIDES = "linphonec liblinphone libmediastreamer libortp"
PROVIDES_gtk = "linphone linphonec liblinphone libmediastreamer libortp"
inherit autotools pkgconfig gettext
export PKG_CONFIG=${STAGING_BINDIR_NATIVE}/pkg-config
LINPHONE_OE_ENABLE_TESTS = "--disable-tests"
LINPHONE_OE_ENABLE_VIDEO = "--disable-video"
LINPHONE_OE_ENABLE_VIDEO_video = "--with-ffmpeg=${STAGING_DIR_HOST}${layout_exec_prefix} --enable-video"
LINPHONE_OE_ENABLE_CONSOLE_UI = "no"
LINPHONE_OE_ENABLE_CONSOLE_UI_console = "yes"
LINPHONE_OE_ENABLE_GTK_UI = "no"
LINPHONE_OE_ENABLE_GTK_UI_gtk = "yes"
do_install_append(){
install -d ${D}${bindir}
}
EXTRA_OECONF = " \
${LINPHONE_OE_ENABLE_TESTS} \
${LINPHONE_OE_ENABLE_VIDEO} \
--enable-alsa \
--with-osip=${STAGING_DIR_HOST}${layout_exec_prefix} \
--with-readline=${STAGING_DIR_HOST}${layout_exec_prefix} \
--with-speex=${STAGING_DIR_HOST}${layout_exec_prefix} \
--disable-manual --enable-tests=yes \
--enable-console_ui=${LINPHONE_OE_ENABLE_CONSOLE_UI} \
--enable-gtk_ui=${LINPHONE_OE_ENABLE_GTK_UI} \
--with-realprefix=/usr \
"
PACKAGES_gtk = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-locale ${PN}c linphone-rings liblinphone libmediastreamer-bin libmediastreamer libortp ${PN}-utils"
PACKAGES = "${PN}c linphone-rings liblinphone libmediastreamer-bin libmediastreamer libortp ${PN}-utils"
FILES_${PN} = " \
${bindir}/linphone \
${datadir}/linphone \
${datadir}/pixmaps \
${datadir}/applications \
${datadir}/gnome/apps \
${datadir}/sounds/linphone/hello8000.wav \
${datadir}/sounds/linphone/hello16000.wav \
${datadir}/images/nowebcamCIF.jpg \
"
FILES_${PN}c = "${bindir}/linphonec ${bindir}/linphone-daemon ${bindir}/linphone-daemon-pipetest ${bindir}/linphonecsh ${bindir}/sipomatic ${datadir}/sounds/linphone/ringback.wav"
FILES_${PN}-rings = "${datadir}/sounds/linphone/rings"
FILES_liblinphone = "${libdir}/liblinphone.so.*"
FILES_libmediastreamer-bin = "/usr/libexec/mediastream"
FILES_libmediastreamer = "${libdir}/libmediastreamer.so.*"
FILES_libortp = "${libdir}/libortp.so.*"
FILES_${PN}-dev += "${libdir}/*.a ${libdir}/*.la ${libdir}/pkgconfig ${includedir}"
FILES_${PN}-utils = "${bindir}/test_ecc ${bindir}/test_lsd"

View file

@ -0,0 +1,33 @@
SRCREV = "c65a7ee79d66ee2c0eb19cde129221be650c07ca"
L_GIT_SRC_URI = "gitosis@git.linphone.org:linphone-daemon"
PR_append = "+gitr${SRCREV}"
LINPHONE_TMP_DIR="${HOME}/LINPHONE_TMP_${SRCREV}"
SRC_URI = "file://${LINPHONE_TMP_DIR}/linphone.tar.gz"
S = "${WORKDIR}/linphone"
# bitbake git fetcher currently doesn't handle git submodules
# There is also a problem with autogen and AC_SUBST
do_fetch_prepend () {
import os,bb
bb.note("Hack preparing clone in %s" %"${LINPHONE_TMP_DIR}")
os.system("rm -rf ${LINPHONE_TMP_DIR}")
os.system("mkdir -p ${LINPHONE_TMP_DIR}")
bb.note("Hack cloning linphone !recursively")
os.system("cd ${LINPHONE_TMP_DIR}; git clone --depth 1 --recursive ${L_GIT_SRC_URI} linphone; tag=${SRCREV};")
bb.note("Hack launching autogen.sh manually")
os.system("cd ${LINPHONE_TMP_DIR}/linphone; ./autogen.sh")
bb.note("Hack preparing linphone.tar.gz")
os.system("cd ${LINPHONE_TMP_DIR}; tar czf linphone.tar.gz --exclude .git linphone")
}
require linphone-common.inc
#Required to avoid compile errors on May 2011.
EXTRA_OECONF +=" --disable-strict"

View file

@ -0,0 +1,13 @@
## THIS unusable work in progress ##
DESCRIPTION = "Audio/video SIP-based IP phone (console edition)"
HOMEPAGE = "http://www.linphone.org/?lang=us"
LICENSE = "GPLv2"
PR="r9"
DEFAULT_PREFERENCE = "3"
OVERRIDES_append = ":console"
#PARALLEL_MAKE="V=1"
require linphone-common_git.inc

View file

@ -0,0 +1,23 @@
PR = "r0"
SRC_URI = "http://www.soft-switch.org/downloads/spandsp/${PN}-0.0.6pre18.tgz"
S = "${WORKDIR}/spandsp-0.0.6"
# *cough*
do_configure_append() {
rm config.log
}
DESCRIPTION = "A library of many DSP functions for telephony."
HOMEPAGE = "http://www.soft-switch.org"
SECTION = "libs"
LICENSE = "LGPL"
DEPENDS = "tiff libxml2"
inherit autotools
PARALLEL_MAKE = ""
SRC_URI[md5sum] = "98330bc00a581ed8d71ebe34afabbcf9"
SRC_URI[sha256sum] = "835cd886105e4e39791f0e8cfe004c39b069f2e6dcb0795a68a6c79b5d14af2c"

View file

@ -0,0 +1,45 @@
DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech."
SECTION = "libs/multimedia"
LICENSE = "BSD"
HOMEPAGE = "http://www.speex.org"
DEPENDS = "libogg"
PV = "1.1+git"
PR = "r3"
SPEEX_TMP_DIR="${HOME}/SPEEX_TMP"
SRC_URI = "file://${SPEEX_TMP_DIR}/speex.tar.gz"
S = "${WORKDIR}/speex"
PARALLEL_MAKE = ""
inherit autotools pkgconfig
LEAD_SONAME = "libspeex.so"
#check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points
EXTRA_OECONF += "--enable-fixed-point --enable-armv7neon-asm"
do_fetch_prepend () {
import os,bb
bb.note("Hack preparing clone in %s" %"${SPEEX_TMP_DIR}")
os.system("rm -rf ${SPEEX_TMP_DIR}")
os.system("mkdir -p ${SPEEX_TMP_DIR}")
os.system("cd ${SPEEX_TMP_DIR}; git clone --depth 1 git://git.linphone.org/speex")
os.system("cd ${SPEEX_TMP_DIR}/speex; ./autogen.sh")
os.system("cd ${SPEEX_TMP_DIR}; tar czf speex.tar.gz --exclude .git speex")
}
do_configure_append() {
sed -i s/"^OGG_CFLAGS.*$"/"OGG_CFLAGS = "/g Makefile */Makefile */*/Makefile
sed -i s/"^OGG_LIBS.*$"/"OGG_LIBS = -logg"/g Makefile */Makefile */*/Makefile
find . -name "Makefile" -exec sed -i s,-I/usr/include,, {} \;
}
PACKAGES =+ "${PN}-utils ${PN}-dsp"
FILES_${PN}-utils = "${bindir}/speex*"
FILES_${PN}-dsp = "${libdir}/libspeexdsp.so.*"
FILES_${PN} = "${libdir}/libspeex.so.*"