mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-18 06:08:31 +03:00
the reset/ATR handling has been heavily updated/fixed. instead of using the timer counter peripheral to handle the waiting time and corresponding timeout, the USART peripheral internal timeout mechanism is used. this is particularly important for the SIMtrace board since the clock signal is not connected to the timer counter. thus this change adds card emulation support for SIMtrace boards. Fi and Di have been properly rename to F and D since the "i" stands only for an "indicated" value, not the actual value. this does not change the USB protocol (the variable have just been renamed). additional variables store more information about the card capabilities NOTE: it has only be tested for the SIMtrace board Change-Id: Ibcb2c8cace9137695adf5fb3de43566f7cfb93b5
80 lines
2.4 KiB
Bash
Executable File
80 lines
2.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
TOPDIR=`pwd`
|
|
|
|
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
|
|
|
|
publish="$1"
|
|
base="$PWD"
|
|
deps="$base/deps"
|
|
inst="$deps/install"
|
|
export deps inst
|
|
|
|
osmo-clean-workspace.sh
|
|
|
|
mkdir "$deps" || true
|
|
|
|
osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls'
|
|
|
|
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
export LD_LIBRARY_PATH="$inst/lib"
|
|
|
|
BUILDS=""
|
|
BUILDS+="simtrace/dfu simtrace/trace simtrace/cardem "
|
|
BUILDS+="qmod/dfu qmod/cardem "
|
|
BUILDS+="owhw/dfu owhw/cardem "
|
|
|
|
cd $TOPDIR/firmware
|
|
for build in $BUILDS; do
|
|
board=`echo $build | cut -d "/" -f 1`
|
|
app=`echo $build | cut -d "/" -f 2`
|
|
echo
|
|
echo "=============== $board / $app START =============="
|
|
make BOARD="$board" APP="$app"
|
|
echo "=============== $board / $app RES:$? =============="
|
|
done
|
|
|
|
echo
|
|
echo "=============== FIRMWARE TESTS ==========="
|
|
cd $TOPDIR/firmware/test
|
|
make clean
|
|
make
|
|
./card_emu_test
|
|
make clean
|
|
|
|
echo
|
|
echo "=============== HOST START =============="
|
|
cd $TOPDIR/host
|
|
make clean
|
|
make
|
|
make clean
|
|
|
|
if [ "x$publish" = "x--publish" ]; then
|
|
echo
|
|
echo "=============== UPLOAD BUILD =============="
|
|
|
|
cat > "$WORKSPACE/known_hosts" <<EOF
|
|
[rita.osmocom.org]:48 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDgQ9HntlpWNmh953a2Gc8NysKE4orOatVT1wQkyzhARnfYUerRuwyNr1GqMyBKdSI9amYVBXJIOUFcpV81niA7zQRUs66bpIMkE9/rHxBd81SkorEPOIS84W4vm3SZtuNqa+fADcqe88Hcb0ZdTzjKILuwi19gzrQyME2knHY71EOETe9Yow5RD2hTIpB5ecNxI0LUKDq+Ii8HfBvndPBIr0BWYDugckQ3Bocf+yn/tn2/GZieFEyFpBGF/MnLbAAfUKIdeyFRX7ufaiWWz5yKAfEhtziqdAGZaXNaLG6gkpy3EixOAy6ZXuTAk3b3Y0FUmDjhOHllbPmTOcKMry9
|
|
[rita.osmocom.org]:48 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPdWn1kEousXuKsZ+qJEZTt/NSeASxCrUfNDW3LWtH+d8Ust7ZuKp/vuyG+5pe5pwpPOgFu7TjN+0lVjYJVXH54=
|
|
[rita.osmocom.org]:48 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8iivY70EiR5NiGChV39gRLjNpC8lvu1ZdHtdMw2zuX
|
|
EOF
|
|
SSH_COMMAND="ssh -o 'UserKnownHostsFile=$WORKSPACE/known_hosts' -p 48"
|
|
rsync -avz --delete -e "$SSH_COMMAND" $TOPDIR/firmware/bin/*.bin binaries@rita.osmocom.org:web-files/simtrace2/firmware/
|
|
fi
|
|
|
|
echo
|
|
echo "=============== FIRMWARE CLEAN =============="
|
|
cd $TOPDIR/firmware/
|
|
for build in $BUILDS; do
|
|
board=`echo $build | cut -d "/" -f 1`
|
|
app=`echo $build | cut -d "/" -f 2`
|
|
make BOARD="$board" APP="$app" clean
|
|
done
|
|
|
|
osmo-clean-workspace.sh
|