From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 967 invoked by alias); 28 Mar 2011 12:16:59 -0000 Received: (qmail 915 invoked by uid 22791); 28 Mar 2011 12:16:54 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-bw0-f49.google.com (HELO mail-bw0-f49.google.com) (209.85.214.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Mar 2011 12:16:47 +0000 Received: by bwz1 with SMTP id 1so2831089bwz.36 for ; Mon, 28 Mar 2011 05:16:46 -0700 (PDT) Received: by 10.204.17.2 with SMTP id q2mr1693269bka.151.1301314605897; Mon, 28 Mar 2011 05:16:45 -0700 (PDT) Received: from sg-desktop.belvok.com ([86.57.137.251]) by mx.google.com with ESMTPS id w3sm2620233bkt.5.2011.03.28.05.16.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Mar 2011 05:16:44 -0700 (PDT) Date: Mon, 28 Mar 2011 12:16:00 -0000 From: Sergei Gavrikov To: Ilija Kocho cc: ecos-devel@ecos.sourceware.org Subject: Re: tty.cdl In-Reply-To: <4D9065F0.40201@siva.com.mk> Message-ID: References: <4D8DBE3F.2000708@siva.com.mk> <4D8F2207.7070701@siva.com.mk> <4D8F5BAD.6020708@siva.com.mk> <4D8F9147.10204@siva.com.mk> <4D8F963A.6050501@siva.com.mk> <4D9065F0.40201@siva.com.mk> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2011-03/txt/msg00039.txt.bz2 On Mon, 28 Mar 2011, Ilija Kocho wrote: > On 27.03.2011 23:11, Sergei Gavrikov wrote: > > On Sun, 27 Mar 2011, Ilija Kocho wrote: > > > >> Sergei, I started this discussion in order to discuss this issue before > >> I drop any code. Your proposal sounds rational. I shall open a Bug and > >> reference this discussion. > > Ilija and may be not :-) I've seen that io_serial.h has > > > > #ifdef CYGDAT_IO_SERIAL_DEVICE_HEADER > > # include CYGDAT_IO_SERIAL_DEVICE_HEADER > > #endif > > > > So, your issue can be managed on the target's side, as both and tty.c > > and termios.c include this header. You can add CDL component in your HAL > > config file which parent should be CYGPKG_IO_SERIAL_TTY and define extra > > devices (TTY4, TTY5, ...) there. Also define/set your own value for the > > CYGDAT_IO_SERIAL_DEVICE_HEADER in the HAL's config file. > > > Sergei, thanks for remark. I tried it but produced file is included to > early as table definitions such as > > DEVTAB_ENTRY(tty_io4, > "/dev/tty4", > CYGDAT_IO_SERIAL_TTY_TTY4_DEV, > &tty_devio, > tty_init, > tty_lookup, // Execute this when device is being looked up > &tty_private_info4); > > depend on definitions included afterwards. Also file io_serial.h is > included in serial.c where produces errors. Yep. Then I noticed this catch too. > However the TTYs provided by devicel driver / HAL may be included at > proper place in tty.c later in similar way: > > #ifdef CYGDAT_IO_SERIAL_TTY_ADD > # include CYGDAT_IO_SERIAL_TTY_ADD > #endif Exactly. > I think these would be all changes to tty.c and the same for termios.c. > Should I continue this way? IMO, it is good solution (please, submit a patch to eCos Bugzilla). Thank you, Sergei