All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] minicom: bump version
Date: Fri, 31 Aug 2018 14:13:32 +0200	[thread overview]
Message-ID: <20180831141332.2ceca29c@windsurf> (raw)
In-Reply-To: <20180831105600.70955-2-giulio.benetti@micronovasrl.com>

Hello Giulio,

On Fri, 31 Aug 2018 12:56:00 +0200, Giulio Benetti wrote:

> diff --git a/package/minicom/0001-sysdep.h-define-TIOCGRS485-and-TIOCSRS485-if-not-def.patch b/package/minicom/0001-sysdep.h-define-TIOCGRS485-and-TIOCSRS485-if-not-def.patch
> new file mode 100644
> index 0000000000..c4d881a8b5
> --- /dev/null
> +++ b/package/minicom/0001-sysdep.h-define-TIOCGRS485-and-TIOCSRS485-if-not-def.patch
> @@ -0,0 +1,39 @@
> +From b9d9a7c3bba81853f77c6789ab5b65925f9de067 Mon Sep 17 00:00:00 2001
> +From: Giulio Benetti <giulio.benetti@micronovasrl.com>
> +Date: Sun, 26 Aug 2018 11:26:11 +0200
> +Subject: [PATCH] sysdep.h: define TIOCGRS485 and TIOCSRS485 if not defined
> +
> +Depending on toolchain sometimes SER_RS485_ENABLED is defined but
> +TIOCGRS485 and TIOCSRS485 are not always found in included files.
> +They are contained in <asm-generic/ioctls.h> that should be included in
> +<asm/ioctls.h> then in <termios.h>, but this doesn't always happen.
> +This leads to build failure because TIOCGRS485 and TIOCSRS485 have not
> +been found.
> +
> +Define if not defined TIOCGRS485 and TIOCSRS485.
> +
> +Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
> +---
> + src/sysdep.h | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/src/sysdep.h b/src/sysdep.h
> +index a99c5ee..7b9665d 100644
> +--- a/src/sysdep.h
> ++++ b/src/sysdep.h
> +@@ -124,6 +124,12 @@
> + #ifndef CRTSCTS
> + #  define CRTSCTS 0
> + #endif
> ++#ifndef TIOCGRS485
> ++#  define TIOCGRS485 0x542E
> ++#endif
> ++#ifndef TIOCSRS485
> ++#  define TIOCSRS485 0x542F
> ++#endif

Are you sure they always have the same value on all architectures ? I'm
not so sure:

arch/alpha/include/uapi/asm/ioctls.h:#define TIOCGRS485 _IOR('T', 0x2E, struct serial_rs485)
arch/mips/include/uapi/asm/ioctls.h:#define TIOCGRS485  _IOR('T', 0x2E, struct serial_rs485)
arch/parisc/include/uapi/asm/ioctls.h:#define TIOCGRS485        _IOR('T', 0x2E, struct serial_rs485)
arch/powerpc/include/uapi/asm/ioctls.h:#define TIOCGRS485       0x542e
arch/sh/include/uapi/asm/ioctls.h:#define TIOCGRS485    _IOR('T', 46, struct serial_rs485)
arch/sparc/include/uapi/asm/ioctls.h:#define TIOCGRS485 _IOR('T', 0x41, struct serial_rs485)
arch/xtensa/include/uapi/asm/ioctls.h:#define TIOCGRS485        _IOR('T', 46, struct serial_rs485)
drivers/tty/serial/serial_core.c:       case TIOCGRS485:
fs/compat_ioctl.c:#ifdef TIOCGRS485
fs/compat_ioctl.c:COMPATIBLE_IOCTL(TIOCGRS485)
include/uapi/asm-generic/ioctls.h:#define TIOCGRS485    0x542E
include/uapi/linux/serial.h: * support. Set with TIOCSRS485 and get with TIOCGRS485 if supported by your
tools/include/uapi/asm-generic/ioctls.h:#define TIOCGRS485      0x542E

See how the definitions on SuperH, Sparc and PARisc are different than
the others ?

I believe it would be safer to disable RS485 support in minicom if
those definitions are not provided by the kernel headers.

> +ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
> +MINICOM_CONF_OPTS += --disable-nls
> +endif

This is not needed, the autotools-package infrastructure is already
passing --disable-nls. See package/pkg-autotools.mk and its use of the
NLS_OPTS variable.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-08-31 12:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 10:55 [Buildroot] [PATCH 1/2] minicom: add COPYING sha256 to hash Giulio Benetti
2018-08-31 10:56 ` [Buildroot] [PATCH 2/2] minicom: bump version Giulio Benetti
2018-08-31 12:13   ` Thomas Petazzoni [this message]
2018-08-31 13:32     ` Giulio Benetti
2018-08-31 13:38     ` [Buildroot] [PATCH v2 1/2] minicom: add COPYING sha256 to hash Giulio Benetti
2018-08-31 13:38       ` [Buildroot] [PATCH v2 2/2] minicom: bump version Giulio Benetti
2018-08-31 21:47         ` Thomas Petazzoni
2018-08-31 22:29           ` Giulio Benetti
2018-09-01  7:18             ` Thomas Petazzoni
2018-08-31 21:32       ` [Buildroot] [PATCH v2 1/2] minicom: add COPYING sha256 to hash Thomas Petazzoni
2018-09-27 20:28 ` [Buildroot] [PATCH " Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180831141332.2ceca29c@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.