Skip to contentSkip to conversation

package/socat: Fix TABDLY, CSIZE and CRDLY shifts for PowerPC

PATCH New Andrey Smirnov 3 participants 3 messages Jun 6, 2017 – Jun 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/socat: Fix TABDLY, CSIZE and CRDLY shifts for PowerPC

As can be seen in linux/arch/powerpc/include/uapi/asm/termbits.h are defined as (note that those are octal numbers):

\#define TABDLY 00006000
\#define CSIZE 00001400
\#define CRDLY 00030000

which gives shifts of 10, 8 and 12. Adjust socat.mk accordingly to reflect that difference.

---
 package/socat/socat.mk | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
package/socat/socat.mk +11 -2
index ba46263..b923cef 100644
@@ -9,11 +9,20 @@ SOCAT_SOURCE = socat-$(SOCAT_VERSION).tar.bz2
 SOCAT_SITE = http://www.dest-unreach.org/socat/download
 SOCAT_LICENSE = GPL-2.0
 SOCAT_LICENSE_FILES = COPYING
-SOCAT_CONF_ENV = \
-	sc_cv_termios_ispeed=no \
+
+SOCAT_CONF_ENV = sc_cv_termios_ispeed=no
+
+ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
+SOCAT_CONF_ENV += \
+	sc_cv_sys_crdly_shift=12 \
+	sc_cv_sys_tabdly_shift=10 \
+	sc_cv_sys_csize_shift=8
+else
+SOCAT_CONF_ENV += \
 	sc_cv_sys_crdly_shift=9 \
 	sc_cv_sys_tabdly_shift=11 \
 	sc_cv_sys_csize_shift=4
+endif
 
 # We need to run autoconf to regenerate the configure script, in order
 # to ensure that the test checking linux/ext2_fs.h works
Signature · 1 line
2.9.4
#1 lore raw

PATCH v2 1/1 package/socat: Fix TABDLY, CSIZE and CRDLY shifts for PowerPC

Hello,

Quoted 7 lines · Andrey Smirnov

As can be seen in linux/arch/powerpc/include/uapi/asm/termbits.h are defined as (note that those are octal numbers):

\#define TABDLY 00006000
\#define CSIZE 00001400
\#define CRDLY 00030000

Quoted 8 lines

which gives shifts of 10, 8 and 12. Adjust socat.mk accordingly to reflect that difference.

---
 package/socat/socat.mk | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Applied to master, thanks. Peter: I think we should apply for the LTS branch(es).

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 package/socat: Fix TABDLY, CSIZE and CRDLY shifts for PowerPC

Quoted 14 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,

Quoted 10 lines · Andrey Smirnov

As can be seen in linux/arch/powerpc/include/uapi/asm/termbits.h are defined as (note that those are octal numbers):

\#define TABDLY 00006000
\#define CSIZE 00001400
\#define CRDLY 00030000

which gives shifts of 10, 8 and 12. Adjust socat.mk accordingly to reflect that difference.

Quoted 8 lines
Quoted 5 lines

---
package/socat/socat.mk | 13 +++++++++++--

1 file changed, 11 insertions(+), 2 deletions(-)

Applied to master, thanks. Peter: I think we should apply for the LTS branch(es).

Agreed. Committed to 2017.02.x and 2017.05.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard