Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Harald Welte | 271d487 | 2019-06-13 18:15:38 +0200 | [diff] [blame] | 3 | if ! [ -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 |
| 6 | fi |
| 7 | |
| 8 | set -ex |
| 9 | |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 10 | TOPDIR=`pwd` |
| 11 | |
Harald Welte | 271d487 | 2019-06-13 18:15:38 +0200 | [diff] [blame] | 12 | deps="$TOPDIR/deps" |
| 13 | inst="$TOPDIR/install" |
| 14 | export deps inst |
| 15 | |
| 16 | # adapted from |
| 17 | echo |
| 18 | echo "=============== libosmocore cross-build ===========" |
| 19 | mkdir -p "$deps" |
| 20 | cd "$deps" |
| 21 | osmo-deps.sh libosmocore master |
| 22 | cd libosmocore |
| 23 | |
| 24 | mkdir -p "$inst/stow" |
| 25 | autoreconf --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" |
| 27 | make $PARALLEL_MAKE install |
| 28 | make clean |
| 29 | STOW_DIR="$inst/stow" stow --restow libosmocore |
| 30 | |
| 31 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig" |
| 32 | export LD_LIBRARY_PATH="$inst/lib" |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 33 | |
| 34 | echo |
| 35 | echo "=============== sysmoOCTSIM firmware build ===========" |
| 36 | cd $TOPDIR/sysmoOCTSIM |
| 37 | cd gcc |
| 38 | make clean |
Harald Welte | 271d487 | 2019-06-13 18:15:38 +0200 | [diff] [blame] | 39 | make SYSTEM_PREFIX="$inst" $PARALLEL_MAKE |
Kévin Redon | 69b92d9 | 2019-01-24 16:39:20 +0100 | [diff] [blame] | 40 | make clean |