Update the Codec Download instructions and include a shell script

Change-Id: Ia943a38e422e23e70f73d9672554633c014f6da7
changes/48/1448/1
sq5bpf 8 years ago committed by Harald Welte
parent 871782e445
commit 44956fef8d
  1. 31
      etsi_codec-patches/README
  2. 40
      etsi_codec-patches/download_and_patch.sh

@ -2,5 +2,36 @@ This directory contains a series of patches against the TETRA codec reference
source code as published by the ETSI at in the file named
en_30039502v010301p0.zip
You can proceed two ways, a or b:
a) Using the download_and_patch.sh script
simply execute ./download_and_patch.sh which will download the
reference codec from the ETSI website and patch it accordingly.
b) Manually
Modified instructions as of 20141118 (differs from the osmocom description,
the ETSI site looks different now):
In order to obtain the codec, download it directly from
http://www.etsi.org/deliver/etsi_en/300300_300399/30039502/01.03.01_60/en_30039502v010301p0.zip
or use the following procedure:
* go to http://pda.etsi.org/
* enter "en 300 395-2" as search term
* execute the search, there should a result called "REN/TETRA-05059 "
* click on the 'Download icon' link (zip-vice symbol)
* you should now have a file called en_30039502v010301p0.zip
Please also see https://osmocom.org/projects/tetra/wiki/Speech_Codec
The en_30039502v010301p0.zip file has 361169 bytes, and has the md5sum:
a8115fe68ef8f8cc466f4192572a1e3e
Due to the use of uppercase file names in the zip file, you should use the "-L"
flag to the unzip program, which ensures all files are completely lower-case.
Please apply all of the patches foudn in this directory to the
resulting source code.

@ -0,0 +1,40 @@
#!/bin/sh
URL=http://www.etsi.org/deliver/etsi_en/300300_300399/30039502/01.03.01_60/en_30039502v010301p0.zip
MD5_EXP=a8115fe68ef8f8cc466f4192572a1e3e
LOCAL_FILE=etsi_tetra_codec.zip
PATCHDIR=`pwd`
CODECDIR=`pwd`/../codec
echo Deleting $CODECDIR ...
[ -e $CODECDIR ] && rm -rf $CODECDIR
echo Creating $CODECDIR ...
mkdir $CODECDIR
if [ ! -f $LOCAL_FILE ]; then
echo Downloading $URL ...
wget -O $LOCAL_FILE $URL
else
echo Skipping download, file $LOCAL_FILE exists
fi
MD5=`md5sum $LOCAL_FILE | awk '{ print $1 }'`
echo Checking MD5SUM ...
if [ $MD5 != $MD5_EXP ]; then
print "MD5sum of ETSI reference codec file doesn't match"
exit 1
fi
echo Unpacking ZIP ...
cd $CODECDIR
unzip -L $PATCHDIR/etsi_tetra_codec.zip
echo Applying Patches ...
for p in `cat "$PATCHDIR/series"`; do
echo "=> Applying patch '$p'..."
patch -p1 < "$PATCHDIR/$p"
done
echo Done!
Loading…
Cancel
Save