[MERGED] osmo-tetra[master]: Update the Codec Download instructions and include a shell s...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Dec 18 16:20:45 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: Update the Codec Download instructions and include a shell script
......................................................................


Update the Codec Download instructions and include a shell script

Change-Id: Ia943a38e422e23e70f73d9672554633c014f6da7
---
M etsi_codec-patches/README
A etsi_codec-patches/download_and_patch.sh
2 files changed, 71 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/etsi_codec-patches/README b/etsi_codec-patches/README
index 7206947..1c95c83 100644
--- a/etsi_codec-patches/README
+++ b/etsi_codec-patches/README
@@ -2,5 +2,36 @@
 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.
diff --git a/etsi_codec-patches/download_and_patch.sh b/etsi_codec-patches/download_and_patch.sh
new file mode 100755
index 0000000..d9e9674
--- /dev/null
+++ b/etsi_codec-patches/download_and_patch.sh
@@ -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!

-- 
To view, visit https://gerrit.osmocom.org/1448
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia943a38e422e23e70f73d9672554633c014f6da7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-tetra
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list