blob: 19bc2222b41ed4b65e45e7df592d55baac90cc3e [file] [log] [blame]
Kévin Redon69b92d92019-01-24 16:39:20 +01001#!/bin/bash
2
Harald Welte271d4872019-06-13 18:15:38 +02003if ! [ -x "$(command -v osmo-deps.sh)" ]; then
4 echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
5 exit 2
6fi
7
8set -ex
9
Kévin Redon69b92d92019-01-24 16:39:20 +010010TOPDIR=`pwd`
11
Harald Welte271d4872019-06-13 18:15:38 +020012deps="$TOPDIR/deps"
13inst="$TOPDIR/install"
14export deps inst
15
16# adapted from
17echo
18echo "=============== libosmocore cross-build ==========="
19mkdir -p "$deps"
20cd "$deps"
21osmo-deps.sh libosmocore master
22cd libosmocore
23
24mkdir -p "$inst/stow"
25autoreconf --install --force
26./configure --enable-static --prefix="$inst/stow/libosmocore" --host=arm-none-eabi --enable-embedded --disable-doxygen --disable-shared --disable-pseudotalloc --enable-external-tests CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror -Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp -mthumb -Os -mlong-calls -g3 -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -I /home/laforge/projects/git/osmo-ccid-firmware/sysmoOCTSIM -Wno-error=format"
27make $PARALLEL_MAKE install
28make clean
29STOW_DIR="$inst/stow" stow --restow libosmocore
30
31export PKG_CONFIG_PATH="$inst/lib/pkgconfig"
32export LD_LIBRARY_PATH="$inst/lib"
Kévin Redon69b92d92019-01-24 16:39:20 +010033
34echo
35echo "=============== sysmoOCTSIM firmware build ==========="
36cd $TOPDIR/sysmoOCTSIM
37cd gcc
38make clean
Harald Welte271d4872019-06-13 18:15:38 +020039make SYSTEM_PREFIX="$inst" $PARALLEL_MAKE
Kévin Redon69b92d92019-01-24 16:39:20 +010040make clean