From 2b3379dfc2bbbb18267c606c59e26d5924804b2a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 2 Apr 2017 15:49:51 +0200 Subject: [PATCH 1/3] lcr: Fix compilation with new versions of gcc --- .../files/0001-Fixed-compiler-warnings.patch | 167 ++++++++++++++++++ recipes-isdn/lcr/lcr_git.bb | 1 + 2 files changed, 168 insertions(+) create mode 100644 recipes-isdn/lcr/files/0001-Fixed-compiler-warnings.patch diff --git a/recipes-isdn/lcr/files/0001-Fixed-compiler-warnings.patch b/recipes-isdn/lcr/files/0001-Fixed-compiler-warnings.patch new file mode 100644 index 0000000000..dcb99ae454 --- /dev/null +++ b/recipes-isdn/lcr/files/0001-Fixed-compiler-warnings.patch @@ -0,0 +1,167 @@ +From 2aac6a668be131c610b6705a99817e6baf10599f Mon Sep 17 00:00:00 2001 +From: Andreas Eversberg +Date: Tue, 15 Dec 2015 20:49:18 +0100 +Subject: [PATCH] Fixed compiler warnings + +--- + alawulaw.c | 18 +++++++++--------- + gentones.c | 8 ++++---- + genwave.c | 10 +++++----- + 3 files changed, 18 insertions(+), 18 deletions(-) + +diff --git a/alawulaw.c b/alawulaw.c +index cafe1af..f38fa46 100644 +--- a/alawulaw.c ++++ b/alawulaw.c +@@ -13,7 +13,7 @@ signed int *audio_law_to_s32; + unsigned char silence; + + /* ulaw -> signed 16-bit */ +-static signed int audio_ulaw_to_s32[] = ++static unsigned int audio_ulaw_to_s32[] = + { + 0xffff8284, 0xffff8684, 0xffff8a84, 0xffff8e84, + 0xffff9284, 0xffff9684, 0xffff9a84, 0xffff9e84, +@@ -82,7 +82,7 @@ static signed int audio_ulaw_to_s32[] = + }; + + /* alaw -> signed 16-bit */ +-static signed int audio_alaw_to_s32[] = ++static unsigned int audio_alaw_to_s32[] = + { + 0x000013fc, 0xffffec04, 0x00000144, 0xfffffebc, + 0x0000517c, 0xffffae84, 0x0000051c, 0xfffffae4, +@@ -155,7 +155,7 @@ unsigned char audio_s16_to_law[65536]; + + + /* table is used to generate s16_to_alaw */ +-static short audio_alaw_relations[] = ++static unsigned short audio_alaw_relations[] = + { + 0x8684, 0x55, 0x8a84, 0xd5, 0x8e84, 0x15, 0x9284, 0x95, + 0x9684, 0x75, 0x9a84, 0xf5, 0x9e84, 0x35, 0xa284, 0xb5, +@@ -231,32 +231,32 @@ void generate_tables(char law) + + if (law == 'a') { + silence = 0x2a; +- audio_law_to_s32=audio_alaw_to_s32; ++ audio_law_to_s32 = (signed int *)audio_alaw_to_s32; + /* generating alaw-table */ + i = j = 0; + while(i < 65536) { +- if (i-32768 > audio_alaw_relations[j<<1]) ++ if (i-32768 > (signed short)audio_alaw_relations[j<<1]) + j++; + if (j>255) + j=255; + audio_s16_to_law[(i-32768) & 0xffff] +- = audio_alaw_relations[(j<<1)|1]; ++ = (signed short)audio_alaw_relations[(j<<1)|1]; + i++; + } + } else { + silence = 0xff; +- audio_law_to_s32=audio_ulaw_to_s32; ++ audio_law_to_s32 = (signed int *)audio_ulaw_to_s32; + /* generating ulaw-table */ + i = j = 0; + while(i < 32768) { +- if (i-32768 > audio_ulaw_to_s32[j]) ++ if (i-32768 > (signed int)audio_ulaw_to_s32[j]) + j++; + audio_s16_to_law[(i-32768) & 0xffff] = j; + i++; + } + j = 255; + while(i < 65536) { +- if (i-0x32768 > audio_ulaw_to_s32[j]) ++ if (i-0x32768 > (signed int)audio_ulaw_to_s32[j]) + j--; + audio_s16_to_law[(i-32768) & 0xffff] = j; + i++; +diff --git a/gentones.c b/gentones.c +index aaac659..a712f1a 100644 +--- a/gentones.c ++++ b/gentones.c +@@ -10,7 +10,7 @@ + + + /* ulaw -> signed 16-bit */ +-static short isdn_audio_ulaw_to_s16[] = ++static unsigned short isdn_audio_ulaw_to_s16[] = + { + 0x8284, 0x8684, 0x8a84, 0x8e84, 0x9284, 0x9684, 0x9a84, 0x9e84, + 0xa284, 0xa684, 0xaa84, 0xae84, 0xb284, 0xb684, 0xba84, 0xbe84, +@@ -47,7 +47,7 @@ static short isdn_audio_ulaw_to_s16[] = + }; + + /* alaw -> signed 16-bit */ +-static short isdn_audio_alaw_to_s16[] = ++static unsigned short isdn_audio_alaw_to_s16[] = + { + 0x13fc, 0xec04, 0x0144, 0xfebc, 0x517c, 0xae84, 0x051c, 0xfae4, + 0x0a3c, 0xf5c4, 0x0048, 0xffb8, 0x287c, 0xd784, 0x028c, 0xfd74, +@@ -92,7 +92,7 @@ unsigned char encode_isdn(short sample, char law) + + i=0; + while(i<256) { +- diff = (law=='u')?isdn_audio_ulaw_to_s16[i]:isdn_audio_alaw_to_s16[i]-sample; ++ diff = (law=='u')?((signed short)isdn_audio_ulaw_to_s16[i]):((signed short)isdn_audio_alaw_to_s16[i])-sample; + //printf("s16=%d sample%d diff=%d\n",isdn_audio_to_s16[i],sample,diff); + if (diff<0) + diff=0-diff; +@@ -150,7 +150,7 @@ void write_wav(FILE *fp, char *wav, char law) + short sample, sample2; + signed int size, chunk; + int gotfmt = 0, gotdata = 0; +- int ret; ++ int __attribute__((__unused__)) ret; + + if ((wfp=fopen(wav,"r"))) { + ret=fread(buffer,8,1,wfp); +diff --git a/genwave.c b/genwave.c +index 685b5fa..fe74658 100644 +--- a/genwave.c ++++ b/genwave.c +@@ -9,7 +9,7 @@ + + + /* ulaw -> signed 16-bit */ +-static short isdn_audio_ulaw_to_s16[] = ++static unsigned short isdn_audio_ulaw_to_s16[] = + { + 0x8284, 0x8684, 0x8a84, 0x8e84, 0x9284, 0x9684, 0x9a84, 0x9e84, + 0xa284, 0xa684, 0xaa84, 0xae84, 0xb284, 0xb684, 0xba84, 0xbe84, +@@ -46,7 +46,7 @@ static short isdn_audio_ulaw_to_s16[] = + }; + + /* alaw -> signed 16-bit */ +-static short isdn_audio_alaw_to_s16[] = ++static unsigned short isdn_audio_alaw_to_s16[] = + { + 0x13fc, 0xec04, 0x0144, 0xfebc, 0x517c, 0xae84, 0x051c, 0xfae4, + 0x0a3c, 0xf5c4, 0x0048, 0xffb8, 0x287c, 0xd784, 0x028c, 0xfd74, +@@ -100,7 +100,7 @@ void write_law(FILE *fp, char *name, char law) + unsigned int i; + short sample; + unsigned int size, wsize; +- int ret; ++ int __attribute__((__unused__)) ret; + + if ((lfp=fopen(name,"r"))) { + /* get size */ +@@ -134,9 +134,9 @@ void write_law(FILE *fp, char *name, char law) + while(i < size) { + ret = fread(buffer, 1, 1, lfp); + if (law == 'a') +- sample = isdn_audio_alaw_to_s16[*buffer]; ++ sample = (signed short)isdn_audio_alaw_to_s16[*buffer]; + else +- sample = isdn_audio_ulaw_to_s16[*buffer]; ++ sample = (signed short)isdn_audio_ulaw_to_s16[*buffer]; + ret = fwrite(&sample, 2, 1, fp); + i+=2; + } +-- +1.9.1 + diff --git a/recipes-isdn/lcr/lcr_git.bb b/recipes-isdn/lcr/lcr_git.bb index d08dbf11a4..5858c895a4 100644 --- a/recipes-isdn/lcr/lcr_git.bb +++ b/recipes-isdn/lcr/lcr_git.bb @@ -10,6 +10,7 @@ PR = "r4" SRCREV = "38fce218f8897d120aeba56e811ef7dada898c2c" SRC_URI = "git://git.misdn.eu/lcr.git \ file://lcr-disable-gsmfr.diff \ + file://0001-Fixed-compiler-warnings.patch \ file://lcr.init " S = "${WORKDIR}/git" From 0319396ca8a31ff7245b1fa73d7eddfc4da4249e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 5 Apr 2017 09:41:20 +0200 Subject: [PATCH 2/3] meta-toolchain-osmo: Attempt to fix it for master For master we need to change to SDKDEPLOYDIR to add the symlink we want. Try to keep it working for dora. --- recipes-osmocom/meta/meta-toolchain-osmo.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes-osmocom/meta/meta-toolchain-osmo.bb b/recipes-osmocom/meta/meta-toolchain-osmo.bb index e8746f876d..0350005ee0 100644 --- a/recipes-osmocom/meta/meta-toolchain-osmo.bb +++ b/recipes-osmocom/meta/meta-toolchain-osmo.bb @@ -13,7 +13,13 @@ do_populate_sdk_append() { create_symlink() { - cd ${SDK_DEPLOY}/ + # master or dora? + if [ -e ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.sh ]; then + cd ${SDKDEPLOYDIR}/ + else + cd ${SDK_DEPLOY}/ + fi + rm -f ${TOOLCHAIN_OUTPUT_BASENAME}.sh ln -s ${TOOLCHAIN_OUTPUTNAME}.sh ${TOOLCHAIN_OUTPUT_BASENAME}.sh } From 3b2076a5563a27e114b02a1e41cf4f62330e9575 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 2 May 2017 11:22:31 +0200 Subject: [PATCH 3/3] openbsc: Fix build failure Add explicit reference to osmo-gbproxy.service to fix build issue. ERROR: QA Issue: openbsc: Files/directories were installed but not shipped /lib/systemd/system/osmo-gbproxy.service ERROR: QA run found fatal errors. Please consider fixing them. --- recipes-osmocom/openbsc/openbsc.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc index b8eaca58cd..a965040333 100644 --- a/recipes-osmocom/openbsc/openbsc.inc +++ b/recipes-osmocom/openbsc/openbsc.inc @@ -93,6 +93,8 @@ FILES_osmo-sgsn = " ${bindir}/osmo-sgsn \ FILES_ipaccess-utils = " ${bindir}/ipaccess-find ${bindir}/ipaccess-config ${bindir}/ipaccess-proxy " FILES_osmo-bsc-nat = " ${bindir}/osmo-bsc_nat " -FILES_osmo-gbproxy = " ${bindir}/osmo-gbproxy " +FILES_osmo-gbproxy = " ${bindir}/osmo-gbproxy \ + ${systemd_unitdir}/system/osmo-gbproxy.service \ + " FILES_osmo-gbproxy-dbg = " ${bindir}/.debug/osmo-gbproxy "