#!/usr/bin/env bash # jenkins build helper script for osmo-e1-hardware. This is how we build on jenkins.osmocom.org # # environment variables: # * WITH_MANUALS: build manual PDFs if set to "1" # * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1") if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" exit 2 fi set -e TOPDIR=`pwd` publish="$1" base="$PWD" deps="$base/deps" inst="$deps/install" export deps inst export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" export PATH="$inst/bin:$PATH" osmo-clean-workspace.sh mkdir "$deps" || true # we assume that PATH includes the path to the respective toolchain # firmware build FW_DIRS="firmware/ice40-riscv/e1-tracer firmware/ice40-riscv/icE1usb" for d in $FW_DIRS; do echo echo "=============== $d FIRMWARE ==============" make -C $d clean all done # The argument '--publish' is used to trigger publication/upload of firmware if [ "x$publish" = "x--publish" ]; then echo echo "=============== UPLOAD FIRMWARE ==============" cat > "/build/known_hosts" <