blob: fb324ccffba28e0bd4b0aef095ce43ba72d3abd3 [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
Harald Welte6312b442019-10-09 14:30:41 +020016
17echo
18echo "=============== libosmocore hostt build ==========="
19osmo-build-dep.sh libosmocore "" --disable-doxygen
20export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
21export LD_LIBRARY_PATH="$inst/lib"
22export PATH="$inst/bin:$PATH"
23
24echo
25echo "=============== CCID usb_gadget build ==========="
26cd $TOPDIR/ccid_host
27make clean
28make $PARALLEL_MAKE
29make clean
30
Harald Welte271d4872019-06-13 18:15:38 +020031# adapted from
32echo
33echo "=============== libosmocore cross-build ==========="
34mkdir -p "$deps"
35cd "$deps"
36osmo-deps.sh libosmocore master
37cd libosmocore
38
39mkdir -p "$inst/stow"
40autoreconf --install --force
41./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"
42make $PARALLEL_MAKE install
43make clean
44STOW_DIR="$inst/stow" stow --restow libosmocore
45
46export PKG_CONFIG_PATH="$inst/lib/pkgconfig"
47export LD_LIBRARY_PATH="$inst/lib"
Kévin Redon69b92d92019-01-24 16:39:20 +010048
49echo
50echo "=============== sysmoOCTSIM firmware build ==========="
51cd $TOPDIR/sysmoOCTSIM
52cd gcc
53make clean
Harald Welte271d4872019-06-13 18:15:38 +020054make SYSTEM_PREFIX="$inst" $PARALLEL_MAKE
Kévin Redon69b92d92019-01-24 16:39:20 +010055make clean