Re: rtems-tools elftoolchain update

2018-04-30 Thread Chris Johns
On 30/04/2018 16:19, Sebastian Huber wrote:
> 
> it builds on Linux (GCC 7.3.0) with the following warnings:
> 

Does this fix it?

 
https://git.rtems.org/rtems-tools/commit/?id=e0a52a4fe49da602245f6b306a7d7c7c8db9aa32

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: rtems-tools elftoolchain update

2018-04-30 Thread Sebastian Huber

On 30/04/18 09:30, Chris Johns wrote:

On 30/04/2018 16:19, Sebastian Huber wrote:

it builds on Linux (GCC 7.3.0) with the following warnings:


Does this fix it?

  
https://git.rtems.org/rtems-tools/commit/?id=e0a52a4fe49da602245f6b306a7d7c7c8db9aa32


I used this commit. The warnings are in different lines.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Source File Permissions

2018-04-30 Thread Christian Mauderer
Am 29.04.2018 um 23:08 schrieb Joel Sherrill:
> 
> 
> On Sun, Apr 29, 2018, 3:32 PM Christian Mauderer  > wrote:
> 
> Am 28.04.2018 um 21:45 schrieb Gedare Bloom:
> > On Thu, Apr 26, 2018 at 7:52 PM, Joel Sherrill  > wrote:
> >> Hi
> >>
> >> Teaching the class this week, i have noticed that randomly some
> >> files are executable. I was going to change this but then realized
> >> that we should all agree on what the permissions on the files and
> >> directories in the tree(s) should be.
> >>
> >> I lean to either:
> >>
> >> + 664 for files and 775 for directories
> >>
> >> But could be talked into tighter permissions for group and world.
> >> Whatever we do, it should be consistent and added to the Coding
> >> Conventions.
> >>
> >
> > Your proposal is sensible to me.
> 
> Hello Joel,
> 
> I wouldn't really have a problem with these. But I think the more usual
> ones would be 644 and 755.
> 
> If I create a new file using `touch somefile` in a directory with 775, I
> still get a 644 file (at least on my Linux machine - I'm not sure
> whether it is configuration dependant). I think that we will get a lot
> of patches with "wrong" permissions if we use 664 and 775. So maybe it
> would be good to have some reasons for using these wider group
> permissions.
> 
> 
> The command you are thinking of is umask to set your default file
> permissions. 
> 

I knew I have seen a setting sometimes. You are right: I have though of
umask. I only don't need it often enough to remember ;-)

> 
> The only setup that I could think of where such rights might could be
> useful is one where one user updates the code while some other user (for
> example a build bot) has to run a bootstrap to build the tree. But I'm
> quite sure that even for that case, there are some better solutions
> (e.g. one working tree that only pushes to a build bot tree).
> 
> 
> If all commits go through a git or patch tester server, i would assume
> that we are getting the permissions set by the patch submitter.
> 
> I suspect (no investigation) that we could have a git check that ensures
> specific permissions based on the file extension.
> 

That would be great.

> 
> Any special reasons, use cases or experiences where the 664 and 775
> would be superior to 644 and 755?
> 
> 
> No. I just remember historically using those on real multi-user devel
> machines so everyone on a team could share source.
> 
> I think we all agree it should be standardized. That's a good step.
> 
> I will look at git, GNU recommendations and a few packages to see what
> they do. Then make a proposal which might include ways to try to keep
> this standardized.
> 

Maybe it's already decided by git:

I did a quick test: I initialized an empty repository (called test) and
created the following files there:

-rw-r--r-- 1 christian users 0 30. Apr 10:05 644
-rw-rw-r-- 1 christian users 0 30. Apr 10:05 664
-rw-rw-rw- 1 christian users 0 30. Apr 10:05 666
-rwxr-xr-x 1 christian users 0 30. Apr 10:04 755
-rwxrwxr-x 1 christian users 0 30. Apr 10:05 775
-rwxrwxrwx 1 christian users 0 30. Apr 10:05 777

Then I did a `git add .` and commited it. If I clone that repository
with `git clone test test2` my test2 folder contains the following files:

-rw-r--r-- 1 christian users 0 30. Apr 10:07 644
-rw-r--r-- 1 christian users 0 30. Apr 10:07 664
-rw-r--r-- 1 christian users 0 30. Apr 10:07 666
-rwxr-xr-x 1 christian users 0 30. Apr 10:07 755
-rwxr-xr-x 1 christian users 0 30. Apr 10:07 775
-rwxr-xr-x 1 christian users 0 30. Apr 10:07 777

If I re-set the permissions, that is not shown as a change. Only the
executable bit seems to be saved. All other permissions are not saved in
my test setup.

Best regards

Christian

> 
> Best regards
> 
> Christian Mauderer
> 
> >
> >> Thoughts
> >>
> >> ___
> >> devel mailing list
> >> devel@rtems.org 
> >> http://lists.rtems.org/mailman/listinfo/devel
> > ___
> > devel mailing list
> > devel@rtems.org 
> > http://lists.rtems.org/mailman/listinfo/devel
> >
> 

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: rtems-tools elftoolchain update

2018-04-30 Thread Chris Johns
On 30/4/18 5:34 pm, Sebastian Huber wrote:
> On 30/04/18 09:30, Chris Johns wrote:
>> On 30/04/2018 16:19, Sebastian Huber wrote:
>>> it builds on Linux (GCC 7.3.0) with the following warnings:
>>>
>> Does this fix it?
>>
>>  
>> https://git.rtems.org/rtems-tools/commit/?id=e0a52a4fe49da602245f6b306a7d7c7c8db9aa32
>>
> 
> I used this commit. The warnings are in different lines.
> 

It seems like support varies depending on the version of gcc.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: rtems-tools elftoolchain update

2018-04-30 Thread Sebastian Huber

On 30/04/18 10:47, Chris Johns wrote:

On 30/4/18 5:34 pm, Sebastian Huber wrote:

On 30/04/18 09:30, Chris Johns wrote:

On 30/04/2018 16:19, Sebastian Huber wrote:

it builds on Linux (GCC 7.3.0) with the following warnings:


Does this fix it?

  
https://git.rtems.org/rtems-tools/commit/?id=e0a52a4fe49da602245f6b306a7d7c7c8db9aa32



I used this commit. The warnings are in different lines.


It seems like support varies depending on the version of gcc.


Yes, this fall through warning stuff is quite new.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 3/9] ftpfs: Always build FTP client

2018-04-30 Thread Sebastian Huber
Move FTP client filesystem to separate library libftpfs.a.

Update #3419.
---
 cpukit/headers.am   | 1 +
 cpukit/{libnetworking => include}/rtems/ftpfs.h | 0
 cpukit/libnetworking/Makefile.am| 8 +++-
 cpukit/libnetworking/headers.am | 1 -
 testsuites/libtests/Makefile.am | 2 +-
 5 files changed, 9 insertions(+), 3 deletions(-)
 rename cpukit/{libnetworking => include}/rtems/ftpfs.h (100%)

diff --git a/cpukit/headers.am b/cpukit/headers.am
index 048cef6d83..66efcb5c58 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -124,6 +124,7 @@ include_rtems_HEADERS += include/rtems/framebuffer.h
 include_rtems_HEADERS += include/rtems/fs.h
 include_rtems_HEADERS += include/rtems/fsmount.h
 include_rtems_HEADERS += include/rtems/ftpd.h
+include_rtems_HEADERS += include/rtems/ftpfs.h
 include_rtems_HEADERS += include/rtems/gxx_wrappers.h
 include_rtems_HEADERS += include/rtems/ide_part_table.h
 include_rtems_HEADERS += include/rtems/imfs.h
diff --git a/cpukit/libnetworking/rtems/ftpfs.h b/cpukit/include/rtems/ftpfs.h
similarity index 100%
rename from cpukit/libnetworking/rtems/ftpfs.h
rename to cpukit/include/rtems/ftpfs.h
diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index 1f6be15312..372f642610 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -4,6 +4,12 @@ include $(top_srcdir)/automake/compile.am
 project_lib_LIBRARIES =
 TMPINSTALL_FILES =
 
+project_lib_LIBRARIES += libftpfs.a
+libftpfs_a_SOURCES = lib/ftpfs.c
+$(PROJECT_LIB)/libftpfs.a: libftpfs.a
+   $(INSTALL_DATA) $< $(PROJECT_LIB)/libftpfs.a
+TMPINSTALL_FILES += $(PROJECT_LIB)/libftpfs.a
+
 project_lib_LIBRARIES += libtftpfs.a
 libtftpfs_a_SOURCES = lib/tftpDriver.c
 $(PROJECT_LIB)/libtftpfs.a: libtftpfs.a
@@ -134,7 +140,7 @@ lib_CPPFLAGS = -DNOPOLL -DNOSELECT
 noinst_LIBRARIES += lib.a
 lib_a_CPPFLAGS = $(AM_CPPFLAGS) $(lib_CPPFLAGS) -D__BSD_VISIBLE
 
-lib_a_SOURCES = lib/getprotoby.c lib/rtems_bsdnet_ntp.c lib/ftpfs.c \
+lib_a_SOURCES = lib/getprotoby.c lib/rtems_bsdnet_ntp.c \
 lib/syslog.c
 lib_a_SOURCES += rtems/rtems_syscall_api.c
 endif
diff --git a/cpukit/libnetworking/headers.am b/cpukit/libnetworking/headers.am
index ce4c7c77e0..93dce6ef8f 100644
--- a/cpukit/libnetworking/headers.am
+++ b/cpukit/libnetworking/headers.am
@@ -106,7 +106,6 @@ include_rtemsdir = $(includedir)/rtems
 include_rtems_HEADERS =
 include_rtems_HEADERS += rtems/bootp.h
 include_rtems_HEADERS += rtems/dhcp.h
-include_rtems_HEADERS += rtems/ftpfs.h
 include_rtems_HEADERS += rtems/mkrootfs.h
 include_rtems_HEADERS += rtems/rtems_bsdnet.h
 include_rtems_HEADERS += rtems/rtems_bsdnet_internal.h
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index 68ff80a585..36f7a2f84c 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -582,7 +582,7 @@ lib_docs += ftp01/ftp01.doc
 ftp01_SOURCES = ftp01/init.c
 ftp01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_ftp01) \
$(support_includes) -I$(RTEMS_SOURCE_ROOT)/cpukit/libnetworking
-ftp01_LDADD = -lftpd
+ftp01_LDADD = -lftpd -lftpfs
 endif
 endif
 
-- 
2.12.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 8/9] telnetd: Always build telnet daemon

2018-04-30 Thread Sebastian Huber
Add support for libbsd initialization.

Update #3419.
---
 cpukit/include/rtems/telnetd.h |  5 +++
 cpukit/telnetd/Makefile.am |  5 +--
 cpukit/telnetd/telnetd-init.c  | 18 ++
 cpukit/telnetd/telnetd.c   | 79 +++---
 4 files changed, 76 insertions(+), 31 deletions(-)
 create mode 100644 cpukit/telnetd/telnetd-init.c

diff --git a/cpukit/include/rtems/telnetd.h b/cpukit/include/rtems/telnetd.h
index a5c8a187e3..19512fbe9c 100644
--- a/cpukit/include/rtems/telnetd.h
+++ b/cpukit/include/rtems/telnetd.h
@@ -88,6 +88,11 @@ typedef struct {
 } rtems_telnetd_config_table;
 
 /**
+ * @brief Start the Telnet subsystem with the provided configuration.
+ */
+rtems_status_code rtems_telnetd_start(const rtems_telnetd_config_table 
*config);
+
+/**
  * @brief Telnet configuration.
  *
  * The application must provide this configuration table.  It is used by
diff --git a/cpukit/telnetd/Makefile.am b/cpukit/telnetd/Makefile.am
index cc0ad1d9ba..7051b368c3 100644
--- a/cpukit/telnetd/Makefile.am
+++ b/cpukit/telnetd/Makefile.am
@@ -1,6 +1,5 @@
 include $(top_srcdir)/automake/compile.am
 
-if LIBNETWORKING
 if LIBSHELL
 project_lib_LIBRARIES = libtelnetd.a
 
@@ -8,10 +7,8 @@ $(PROJECT_LIB)/libtelnetd.a: libtelnetd.a
$(INSTALL_DATA) $< $(PROJECT_LIB)/libtelnetd.a
 TMPINSTALL_FILES = $(PROJECT_LIB)/libtelnetd.a
 
-libtelnetd_a_SOURCES = check_passwd.c des.c pty.c telnetd.c
+libtelnetd_a_SOURCES = check_passwd.c des.c pty.c telnetd.c telnetd-init.c
 libtelnetd_a_CPPFLAGS = $(AM_CPPFLAGS)
 endif
-endif
-
 
 include $(top_srcdir)/automake/local.am
diff --git a/cpukit/telnetd/telnetd-init.c b/cpukit/telnetd/telnetd-init.c
new file mode 100644
index 00..760db41fcc
--- /dev/null
+++ b/cpukit/telnetd/telnetd-init.c
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2018 embedded brains GmbH.  All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+
+int rtems_initialize_telnetd( void )
+{
+  return rtems_telnetd_start( &rtems_telnetd_config );
+}
diff --git a/cpukit/telnetd/telnetd.c b/cpukit/telnetd/telnetd.c
index 195ec979c3..43e00365b5 100644
--- a/cpukit/telnetd/telnetd.c
+++ b/cpukit/telnetd/telnetd.c
@@ -57,7 +57,10 @@
 
 #include 
 #include 
+
+#ifdef RTEMS_NETWORKING
 #include 
+#endif
 
 #define PARANOIA
 
@@ -87,9 +90,16 @@ rtems_id telnetd_dflt_spawn(
 );
 
 /***/
-static rtems_id telnetd_task_id = RTEMS_ID_NONE;
+static rtems_telnetd_config_table *telnetd_config;
+static rtems_idtelnetd_task_id;
 
-rtems_id (*telnetd_spawn_task)(
+/*
+ * chrisj: this variable was global and with no declared interface in a header
+ * file and with no means to set it so I have stopped it being global;
+ * if this breaks any user they will have be to provide a formal
+ * interface to get this change reverted.
+ */
+static const rtems_id (*telnetd_spawn_task)(
   const char *,
   unsigned,
   unsigned,
@@ -207,24 +217,24 @@ rtems_task_telnetd(void *task_argument)
   };
 
   /* we don't redirect stdio as this probably
-   * was started from the console anyways..
+   * was started from the console anyway ..
*/
   do {
-if (rtems_telnetd_config.keep_stdio) {
+if (telnetd_config->keep_stdio) {
   bool start = true;
   char device_name [32];
 
   ttyname_r( 1, device_name, sizeof( device_name));
-  if (rtems_telnetd_config.login_check != NULL) {
+  if (telnetd_config->login_check != NULL) {
 start = rtems_shell_login_prompt(
   stdin,
   stderr,
   device_name,
-  rtems_telnetd_config.login_check
+  telnetd_config->login_check
 );
   }
   if (start) {
-rtems_telnetd_config.command( device_name, arg->arg);
+telnetd_config->command( device_name, arg->arg);
   } else {
 syslog(
   LOG_AUTHPRIV | LOG_WARNING,
@@ -244,13 +254,13 @@ rtems_task_telnetd(void *task_argument)
   arg = malloc( sizeof(*arg) );
 
   arg->devname = devname;
-  arg->arg = rtems_telnetd_config.arg;
+  arg->arg = telnetd_config->arg;
   strncpy(arg->peername, peername, sizeof(arg->peername));
 
   telnetd_task_id = telnetd_spawn_task(
 devname,
-rtems_telnetd_config.priority,
-rtems_telnetd_config.stack_size,
+telnetd_config->priority,
+telnetd_config->stack_size,
 spawned_shell,
 arg
   );
@@ -287,55 +297,70 @@ rtems_task_telnetd(void *task_argument)
   telnetd_task_id = RTEMS_ID_NONE;
 }
 
-rtems_status_code rtems_telnetd_initialize( void)
+rtems_status_code rtems_telnetd_start(const rtems_telnetd_config_table* config)
 {
-  if (telnetd_task_id != RTEMS_ID_NONE) {
+  if (telnetd_config != NULL) {
 fprintf(stderr, "

[PATCH 2/9] tftpfs: Always build TFTP client

2018-04-30 Thread Sebastian Huber
Move TFTP client filesystem to separate library libtftpfs.a.
Conditionally use legacy network stack features, e.g. BOOTP support.

Update #3419.
---
 cpukit/headers.am  |  1 +
 cpukit/{libnetworking => include}/rtems/tftp.h |  0
 cpukit/libnetworking/Makefile.am   | 10 +-
 cpukit/libnetworking/headers.am|  1 -
 cpukit/libnetworking/lib/tftpDriver.c  | 18 ++
 5 files changed, 24 insertions(+), 6 deletions(-)
 rename cpukit/{libnetworking => include}/rtems/tftp.h (100%)

diff --git a/cpukit/headers.am b/cpukit/headers.am
index dbd1273095..048cef6d83 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -190,6 +190,7 @@ include_rtems_HEADERS += include/rtems/termios_printk.h
 include_rtems_HEADERS += include/rtems/termios_printk_cnf.h
 include_rtems_HEADERS += include/rtems/termiostypes.h
 include_rtems_HEADERS += include/rtems/test.h
+include_rtems_HEADERS += include/rtems/tftp.h
 include_rtems_HEADERS += include/rtems/thread.h
 include_rtems_HEADERS += include/rtems/timecounter.h
 include_rtems_HEADERS += include/rtems/timespec.h
diff --git a/cpukit/libnetworking/rtems/tftp.h b/cpukit/include/rtems/tftp.h
similarity index 100%
rename from cpukit/libnetworking/rtems/tftp.h
rename to cpukit/include/rtems/tftp.h
diff --git a/cpukit/libnetworking/Makefile.am b/cpukit/libnetworking/Makefile.am
index 3ab9a274e6..1f6be15312 100644
--- a/cpukit/libnetworking/Makefile.am
+++ b/cpukit/libnetworking/Makefile.am
@@ -1,6 +1,14 @@
 include $(top_srcdir)/automake/multilib.am
 include $(top_srcdir)/automake/compile.am
 
+project_lib_LIBRARIES =
+TMPINSTALL_FILES =
+
+project_lib_LIBRARIES += libtftpfs.a
+libtftpfs_a_SOURCES = lib/tftpDriver.c
+$(PROJECT_LIB)/libtftpfs.a: libtftpfs.a
+   $(INSTALL_DATA) $< $(PROJECT_LIB)/libtftpfs.a
+TMPINSTALL_FILES += $(PROJECT_LIB)/libtftpfs.a
 
 # poll is not supported
 UNUSED_FILES = poll.h
@@ -127,7 +135,7 @@ noinst_LIBRARIES += lib.a
 lib_a_CPPFLAGS = $(AM_CPPFLAGS) $(lib_CPPFLAGS) -D__BSD_VISIBLE
 
 lib_a_SOURCES = lib/getprotoby.c lib/rtems_bsdnet_ntp.c lib/ftpfs.c \
-lib/syslog.c lib/tftpDriver.c
+lib/syslog.c
 lib_a_SOURCES += rtems/rtems_syscall_api.c
 endif
 
diff --git a/cpukit/libnetworking/headers.am b/cpukit/libnetworking/headers.am
index b4532e4089..ce4c7c77e0 100644
--- a/cpukit/libnetworking/headers.am
+++ b/cpukit/libnetworking/headers.am
@@ -115,7 +115,6 @@ include_rtems_HEADERS += rtems/rtems_mii_ioctl.h
 include_rtems_HEADERS += rtems/rtems_netdb.h
 include_rtems_HEADERS += rtems/rtems_netinet_in.h
 include_rtems_HEADERS += rtems/rtems_syscall.h
-include_rtems_HEADERS += rtems/tftp.h
 
 include_rtems_bsdnetdir = $(includedir)/rtems/bsdnet
 include_rtems_bsdnet_HEADERS =
diff --git a/cpukit/libnetworking/lib/tftpDriver.c 
b/cpukit/libnetworking/lib/tftpDriver.c
index 97c9998aec..514f931b13 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -37,6 +36,10 @@
 #include 
 #include 
 
+#ifdef RTEMS_NETWORKING
+#include 
+#endif
+
 #ifdef RTEMS_TFTP_DRIVER_DEBUG
 int rtems_tftp_driver_debug = 1;
 #endif
@@ -537,9 +540,11 @@ static int rtems_tftp_open_worker(
  */
 hostname = full_path_name;
 cp1 = strchr (full_path_name, ':');
-if (!cp1)
+if (!cp1) {
+#ifdef RTEMS_NETWORKING
 hostname = "BOOTP_HOST";
-else {
+#endif
+} else {
 *cp1 = '\0';
 ++cp1;
 }
@@ -547,9 +552,12 @@ static int rtems_tftp_open_worker(
 /*
  * Convert hostname to Internet address
  */
+#ifdef RTEMS_NETWORKING
 if (strcmp (hostname, "BOOTP_HOST") == 0)
 farAddress = rtems_bsdnet_bootp_server_address;
-else if (inet_aton (hostname, &farAddress) == 0) {
+else
+#endif
+if (inet_aton (hostname, &farAddress) == 0) {
 struct hostent *he = gethostbyname(hostname);
 if (he == NULL)
 return ENOENT;
@@ -559,9 +567,11 @@ static int rtems_tftp_open_worker(
 /*
  * Extract file pathname component
  */
+#ifdef RTEMS_NETWORKING
 if (strcmp (cp1, "BOOTP_FILE") == 0) {
 cp1 = rtems_bsdnet_bootp_boot_file_name;
 }
+#endif
 if (*cp1 == '\0')
 return ENOENT;
 remoteFilename = cp1;
-- 
2.12.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 6/9] ftpd: Use floating-point tasks due to syslog()

2018-04-30 Thread Sebastian Huber
Update #3419.
---
 cpukit/ftpd/ftpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
index 3e0ff5d30a..098dd63652 100644
--- a/cpukit/ftpd/ftpd.c
+++ b/cpukit/ftpd/ftpd.c
@@ -2120,7 +2120,7 @@ rtems_initialize_ftpd(void)
 priority, RTEMS_MINIMUM_STACK_SIZE,
 RTEMS_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR |
 RTEMS_INTERRUPT_LEVEL(0),
-RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
+RTEMS_FLOATING_POINT | RTEMS_LOCAL,
 &tid);
 
   if (sc == RTEMS_SUCCESSFUL)
-- 
2.12.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 7/9] ftpd: Always build FTP daemon

2018-04-30 Thread Sebastian Huber
Add support for libbsd initialization.

Update #3419.
---
 cpukit/ftpd/Makefile.am |  4 +--
 cpukit/ftpd/ftpd-init.c | 19 
 cpukit/ftpd/ftpd.c  | 72 +
 cpukit/include/rtems/ftpd.h |  7 -
 4 files changed, 66 insertions(+), 36 deletions(-)
 create mode 100644 cpukit/ftpd/ftpd-init.c

diff --git a/cpukit/ftpd/Makefile.am b/cpukit/ftpd/Makefile.am
index fbb78650d6..dddf91935e 100644
--- a/cpukit/ftpd/Makefile.am
+++ b/cpukit/ftpd/Makefile.am
@@ -1,13 +1,11 @@
 include $(top_srcdir)/automake/compile.am
 
-if LIBNETWORKING
 project_lib_LIBRARIES = libftpd.a
 
 $(PROJECT_LIB)/libftpd.a: libftpd.a
$(INSTALL_DATA) $< $(PROJECT_LIB)/libftpd.a
 TMPINSTALL_FILES = $(PROJECT_LIB)/libftpd.a
 
-libftpd_a_SOURCES = ftpd.c ftpd.h
-endif
+libftpd_a_SOURCES = ftpd.c ftpd-init.c
 
 include $(top_srcdir)/automake/local.am
diff --git a/cpukit/ftpd/ftpd-init.c b/cpukit/ftpd/ftpd-init.c
new file mode 100644
index 00..35546ff553
--- /dev/null
+++ b/cpukit/ftpd/ftpd-init.c
@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2018 embedded brains GmbH.  All rights reserved.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+
+int rtems_initialize_ftpd( void )
+{
+  rtems_ftpd_configuration.verbose = true;
+  return rtems_ftpd_start( &rtems_ftpd_configuration );
+}
diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
index 098dd63652..2747268329 100644
--- a/cpukit/ftpd/ftpd.c
+++ b/cpukit/ftpd/ftpd.c
@@ -202,7 +202,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -243,7 +242,7 @@ enum
 };
 
 /* Configuration table */
-extern struct rtems_ftpd_configuration rtems_ftpd_configuration;
+static struct rtems_ftpd_configuration *ftpd_config;
 
 /* this is not prototyped in strict ansi mode */
 FILE *fdopen (int fildes, const char *mode);
@@ -934,7 +933,7 @@ command_store(FTPD_SessionInfo_t *info, char const 
*filename)
 wrt = &discard;
   }
 
-  if (!null && rtems_ftpd_configuration.hooks != NULL)
+  if (!null && ftpd_config->hooks != NULL)
   {
 
 /* Search our list of hooks to see if we need to do something special. */
@@ -942,7 +941,7 @@ command_store(FTPD_SessionInfo_t *info, char const 
*filename)
 int i;
 
 i = 0;
-hook = &rtems_ftpd_configuration.hooks[i++];
+hook = &ftpd_config->hooks[i++];
 while (hook->filename != NULL)
 {
   if (!strcmp(hook->filename, filename))
@@ -950,7 +949,7 @@ command_store(FTPD_SessionInfo_t *info, char const 
*filename)
 usehook = hook;
 break;
   }
-  hook = &rtems_ftpd_configuration.hooks[i++];
+  hook = &ftpd_config->hooks[i++];
 }
   }
 
@@ -963,8 +962,8 @@ command_store(FTPD_SessionInfo_t *info, char const 
*filename)
  * given name.
  */
 
-char*bigBufr;
-size_t filesize = rtems_ftpd_configuration.max_hook_filesize + 1;
+char   *bigBufr;
+size_t  filesize = ftpd_config->max_hook_filesize + 1;
 
 /*
  * Allocate space for our "file".
@@ -1747,8 +1746,8 @@ exec_command(FTPD_SessionInfo_t *info, char* cmd, char* 
args)
   free(info->pass);
 info->pass = NULL;
 info->user = strdup(fname);
-if (rtems_ftpd_configuration.login &&
-  !rtems_ftpd_configuration.login(info->user, NULL)) {
+if (ftpd_config->login &&
+  !ftpd_config->login(info->user, NULL)) {
   info->auth = false;
   send_reply(info, 331, "User name okay, need password.");
 } else {
@@ -1765,8 +1764,8 @@ exec_command(FTPD_SessionInfo_t *info, char* cmd, char* 
args)
 if (!info->user) {
   send_reply(info, 332, "Need account to log in");
 } else {
-  if (rtems_ftpd_configuration.login &&
-!rtems_ftpd_configuration.login(info->user, info->pass)) {
+  if (ftpd_config->login &&
+!ftpd_config->login(info->user, info->pass)) {
 info->auth = false;
 send_reply(info, 530, "Not logged in.");
   } else {
@@ -1990,7 +1989,7 @@ ftpd_daemon(rtems_task_argument args RTEMS_UNUSED)
 syslog(LOG_ERR, "ftpd: Error creating socket: %s", serr());
 
   addr.sin_family  = AF_INET;
-  addr.sin_port= htons(rtems_ftpd_configuration.port);
+  addr.sin_port= htons(ftpd_config->port);
   addr.sin_addr.s_addr = htonl(INADDR_ANY);
   memset(addr.sin_zero, 0, sizeof(addr.sin_zero));
 
@@ -2045,7 +2044,7 @@ ftpd_daemon(rtems_task_argument args RTEMS_UNUSED)
 info->idle = ftpd_timeout;
 info->user = NULL;
 info->pass = NULL;
-if (rtems_ftpd_configuration.login)
+if (ftpd_config->login)
   info->auth = false;
 else
   info->auth = true;
@@ -2069,46 +2068,54 @@ ftpd_daemon(rtems_task_argument args RTEMS_UNUSED)
  *
  *
  * Input parameters:
- *
+ *config: constant in

[PATCH 9/9] telnetd: Use syslog() instead of printk()

2018-04-30 Thread Sebastian Huber
Update #3419.
---
 cpukit/telnetd/pty.c  | 10 --
 cpukit/telnetd/telnetd-init.c |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c
index d41de97d85..14d688018f 100644
--- a/cpukit/telnetd/pty.c
+++ b/cpukit/telnetd/pty.c
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 /*-*/
 #define IAC_ESC255
@@ -453,8 +454,13 @@ rtems_device_driver my_pty_initialize(
 chmod(telnet_ptys[ndx].devname,0660);
 chown(telnet_ptys[ndx].devname,2,0); /* tty,root*/
   };
-  printk("Device: /dev/pty%X../dev/pty%X (%d)pseudo-terminals registered.\n",
-  0,rtems_telnetd_maximum_ptys-1,rtems_telnetd_maximum_ptys);
+  syslog(
+LOG_KERN | LOG_INFO,
+"/dev/pty%X../dev/pty%X (%d) pseudo-terminals registered.\n",
+0,
+rtems_telnetd_maximum_ptys - 1,
+rtems_telnetd_maximum_ptys
+  );
 
   return RTEMS_SUCCESSFUL;
 }
diff --git a/cpukit/telnetd/telnetd-init.c b/cpukit/telnetd/telnetd-init.c
index 760db41fcc..7762ad70ba 100644
--- a/cpukit/telnetd/telnetd-init.c
+++ b/cpukit/telnetd/telnetd-init.c
@@ -12,7 +12,7 @@
 
 #include 
 
-int rtems_initialize_telnetd( void )
+rtems_status_code rtems_telnetd_initialize( void )
 {
   return rtems_telnetd_start( &rtems_telnetd_config );
 }
-- 
2.12.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 5/9] ftpd: Fairplay with libbsd

2018-04-30 Thread Sebastian Huber
Update #3419.
---
 cpukit/ftpd/ftpd.c | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
index 0d4256bc23..3e0ff5d30a 100644
--- a/cpukit/ftpd/ftpd.c
+++ b/cpukit/ftpd/ftpd.c
@@ -199,6 +199,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -305,6 +306,19 @@ static int ftpd_timeout = 0;
  */
 static int ftpd_access = 0;
 
+static void
+yield(void)
+{
+/*
+ * If we build not for the legacy network stack, then we use the libbsd.  In
+ * the libbsd there is no global network stack semaphore which provides round
+ * robin fairness for threads of equal priority.
+ */
+#ifndef RTEMS_NETWORKING
+  yield();
+#endif
+}
+
 /*
  * serr
  *
@@ -786,6 +800,7 @@ command_retrieve(FTPD_SessionInfo_t  *info, char const 
*filename)
   {
 if(send(s, buf, n, 0) != n)
   break;
+yield();
   }
 }
 else if (info->xfer_mode == TYPE_A)
@@ -821,6 +836,7 @@ command_retrieve(FTPD_SessionInfo_t  *info, char const 
*filename)
   }
 }
 while((rest -= i) > 0);
+yield();
   }
 }
 
@@ -1014,6 +1030,7 @@ command_store(FTPD_SessionInfo_t *info, char const 
*filename)
   res = 0;
   break;
 }
+yield();
   }
 }
 else if(info->xfer_mode == TYPE_A)
@@ -1075,6 +1092,7 @@ command_store(FTPD_SessionInfo_t *info, char const 
*filename)
 res = 0;
 }
 while((rest -= i) > 0);
+yield();
   }
 }
 
-- 
2.12.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 4/9] network: Import latest from FreeBSD

2018-04-30 Thread Sebastian Huber
Update #3419.
---
 cpukit/headers.am|  4 
 cpukit/{libnetworking => include}/arpa/ftp.h | 12 ++--
 cpukit/libnetworking/headers.am  |  1 -
 3 files changed, 10 insertions(+), 7 deletions(-)
 rename cpukit/{libnetworking => include}/arpa/ftp.h (91%)

diff --git a/cpukit/headers.am b/cpukit/headers.am
index 66efcb5c58..2315db1e7d 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -22,6 +22,10 @@ include_HEADERS += include/xz.h
 include_HEADERS += include/zconf.h
 include_HEADERS += include/zlib.h
 
+include_arpadir = $(includedir)/arpa
+include_arpa_HEADERS =
+include_arpa_HEADERS += include/arpa/ftp.h
+
 include_dev_i2cdir = $(includedir)/dev/i2c
 include_dev_i2c_HEADERS =
 include_dev_i2c_HEADERS += include/dev/i2c/eeprom.h
diff --git a/cpukit/libnetworking/arpa/ftp.h b/cpukit/include/arpa/ftp.h
similarity index 91%
rename from cpukit/libnetworking/arpa/ftp.h
rename to cpukit/include/arpa/ftp.h
index 9a36488540..4f23e1ca40 100644
--- a/cpukit/libnetworking/arpa/ftp.h
+++ b/cpukit/include/arpa/ftp.h
@@ -1,4 +1,6 @@
-/*
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
  * Copyright (c) 1983, 1989, 1993
  * The Regents of the University of California.  All rights reserved.
  *
@@ -10,11 +12,7 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *may be used to endorse or promote products derived from this software
  *without specific prior written permission.
  *
@@ -31,6 +29,8 @@
  * SUCH DAMAGE.
  *
  * @(#)ftp.h   8.1 (Berkeley) 6/2/93
+ *
+ * $FreeBSD: head/include/arpa/ftp.h 326024 2017-11-20 19:45:28Z pfg $
  */
 
 #ifndef _ARPA_FTP_H_
diff --git a/cpukit/libnetworking/headers.am b/cpukit/libnetworking/headers.am
index 93dce6ef8f..b558d4b416 100644
--- a/cpukit/libnetworking/headers.am
+++ b/cpukit/libnetworking/headers.am
@@ -10,7 +10,6 @@ include_HEADERS += resolv.h
 
 include_arpadir = $(includedir)/arpa
 include_arpa_HEADERS =
-include_arpa_HEADERS += arpa/ftp.h
 include_arpa_HEADERS += arpa/nameser.h
 include_arpa_HEADERS += arpa/nameser_compat.h
 
-- 
2.12.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/9] libdebugger: Move to separate library

2018-04-30 Thread Sebastian Huber
Always build remote TCP support since it depends only on the POSIX
socket API.  It works with the legacy network stack and libbsd.  Move it
to a separate libdebugger.a library to allow an easy use with libbsd via
"-ldebugger -lbsd" otherwise we would have a cyclic dependency between
libbsd. and librtemscpu.a.

Update #3419.
---
 cpukit/headers.am  |  1 +
 .../{libdebugger => include/rtems}/rtems-debugger-remote-tcp.h |  3 +--
 cpukit/libdebugger/Makefile.am | 10 +-
 cpukit/libdebugger/rtems-debugger-remote-tcp.c |  6 +++---
 cpukit/wrapup/Makefile.am  |  4 
 testsuites/libtests/Makefile.am|  1 +
 6 files changed, 11 insertions(+), 14 deletions(-)
 rename cpukit/{libdebugger => include/rtems}/rtems-debugger-remote-tcp.h (95%)

diff --git a/cpukit/headers.am b/cpukit/headers.am
index 4939c5beed..dbd1273095 100644
--- a/cpukit/headers.am
+++ b/cpukit/headers.am
@@ -161,6 +161,7 @@ include_rtems_HEADERS += include/rtems/rbheap.h
 include_rtems_HEADERS += include/rtems/rbtree.h
 include_rtems_HEADERS += include/rtems/ringbuf.h
 include_rtems_HEADERS += include/rtems/rtc.h
+include_rtems_HEADERS += include/rtems/rtems-debugger-remote-tcp.h
 include_rtems_HEADERS += include/rtems/rtems-debugger.h
 include_rtems_HEADERS += include/rtems/rtems-fdt-shell.h
 include_rtems_HEADERS += include/rtems/rtems-fdt.h
diff --git a/cpukit/libdebugger/rtems-debugger-remote-tcp.h 
b/cpukit/include/rtems/rtems-debugger-remote-tcp.h
similarity index 95%
rename from cpukit/libdebugger/rtems-debugger-remote-tcp.h
rename to cpukit/include/rtems/rtems-debugger-remote-tcp.h
index 3d9dab9f45..d9d7feeb48 100644
--- a/cpukit/libdebugger/rtems-debugger-remote-tcp.h
+++ b/cpukit/include/rtems/rtems-debugger-remote-tcp.h
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2016 Chris Johns .
- * All rights reserved.
+ * Copyright (c) 2016 Chris Johns .  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
diff --git a/cpukit/libdebugger/Makefile.am b/cpukit/libdebugger/Makefile.am
index b202003e41..6ff35d197f 100644
--- a/cpukit/libdebugger/Makefile.am
+++ b/cpukit/libdebugger/Makefile.am
@@ -2,20 +2,20 @@ include $(top_srcdir)/automake/compile.am
 
 if LIBDEBUGGER
 
-noinst_LIBRARIES = libdebugger.a
+project_lib_LIBRARIES = libdebugger.a
 libdebugger_a_SOURCES = \
   rtems-debugger-block.c \
   rtems-debugger-cmd.c \
   rtems-debugger-remote.c \
   rtems-debugger-server.c \
   rtems-debugger-target.c \
+  rtems-debugger-remote-tcp.c \
   rtems-debugger-threads.c \
   rtems-debugger-@RTEMS_CPU@.c
 
-if LIBNETWORKING
-libdebugger_a_SOURCES += \
-  rtems-debugger-remote-tcp.c
-endif
+$(PROJECT_LIB)/libdebugger.a: libdebugger.a
+   $(INSTALL_DATA) $< $(PROJECT_LIB)/libdebugger.a
+TMPINSTALL_FILES = $(PROJECT_LIB)/libdebugger.a
 
 endif
 
diff --git a/cpukit/libdebugger/rtems-debugger-remote-tcp.c 
b/cpukit/libdebugger/rtems-debugger-remote-tcp.c
index b62f3a1f52..696e2deb8c 100644
--- a/cpukit/libdebugger/rtems-debugger-remote-tcp.c
+++ b/cpukit/libdebugger/rtems-debugger-remote-tcp.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (c) 2016 Chris Johns .
- * All rights reserved.
+ * Copyright (c) 2016 Chris Johns .  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +37,7 @@
 #include 
 #include 
 
-#include "rtems-debugger-remote-tcp.h"
+#include 
 
 /**
  * Debugger default server port. 'RT' as ASCII.
@@ -277,6 +276,7 @@ tcp_remote_disconnect(rtems_debugger_remote* remote)
 
   tcp = (rtems_debugger_remote_tcp*) remote->data;
   close(tcp->fd);
+  tcp->fd = -1;
 
   rtems_debugger_unlock();
 
diff --git a/cpukit/wrapup/Makefile.am b/cpukit/wrapup/Makefile.am
index 3bb9ca4983..fcca5604e2 100644
--- a/cpukit/wrapup/Makefile.am
+++ b/cpukit/wrapup/Makefile.am
@@ -98,10 +98,6 @@ if LIBDL
 TMP_LIBS += ../libdl/libdl.a
 endif
 
-if LIBDEBUGGER
-TMP_LIBS += ../libdebugger/libdebugger.a
-endif
-
 librtemscpu.a: $(TMP_LIBS)
$(AM_V_GEN)rm -f $@
$(AM_V_GEN)$(MKDIR_P) $(ARCH)
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index b786e73e89..68ff80a585 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -246,6 +246,7 @@ debugger01_SOURCES = debugger01/init.c debugger01/remote.c \
debugger01/system.h
 debugger01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_debugger01) \
$(support_includes)
+debugger01_LDADD = -ldebugger
 endif
 endif
 
-- 
2.12.3

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] no_cpu/no_bsp: Fix path to bspgetworkarea-default.c in Makefile

2018-04-30 Thread Amaan Cheval
---
 c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am 
b/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
index e4c11f6f5a..a9d69067b7 100644
--- a/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
+++ b/c/src/lib/libbsp/no_cpu/no_bsp/Makefile.am
@@ -14,7 +14,7 @@ librtemsbsp_a_SOURCES =
 
 # startup
 librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspfatal-default.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bspgetworkarea.c
+librtemsbsp_a_SOURCES += 
../../../../../../bsps/shared/start/bspgetworkarea-default.c
 librtemsbsp_a_SOURCES += ../../../../../../bsps/no_cpu/no_bsp/start/bspstart.c
 librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
 librtemsbsp_a_SOURCES += 
../../../../../../bsps/shared/dev/getentropy/getentropy-cpucounter.c
-- 
2.16.0.rc0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Misplaced Directories?

2018-04-30 Thread Joel Sherrill
 Hi

While teaching the class last week, I got the privilege of adapting on
the fly to the new layout. Mostly went well but I made some notes on
some directories in cpukit whose placement seems inconsistent with
other similar directories. I thought I would toss out my list and see
what others thought.

+ rhealstone not under benchmarks

+ libz is a top level directory but xz is under libmisc

+ libpci is not under dev

+ drvmgr is not under dev

+ libi2c (yes legacy) is not under dev

+ devnull is not under dev

+ fb is not under dev

+ mouse is not under dev

+ fsmount under libfs?

I think that's it from my notes. Any comments or thoughts?

Thanks.

--joel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 9/9] telnetd: Use syslog() instead of printk()

2018-04-30 Thread Joel Sherrill
Sorry to ask this but is there a syslog service that needs to be started
before
telnetd? Is there some dependency?

What's the rationale for this change?

On Mon, Apr 30, 2018 at 4:48 AM, Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> Update #3419.
> ---
>  cpukit/telnetd/pty.c  | 10 --
>  cpukit/telnetd/telnetd-init.c |  2 +-
>  2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c
> index d41de97d85..14d688018f 100644
> --- a/cpukit/telnetd/pty.c
> +++ b/cpukit/telnetd/pty.c
> @@ -42,6 +42,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  /*-*/
>  #define IAC_ESC255
> @@ -453,8 +454,13 @@ rtems_device_driver my_pty_initialize(
>  chmod(telnet_ptys[ndx].devname,0660);
>  chown(telnet_ptys[ndx].devname,2,0); /* tty,root*/
>};
> -  printk("Device: /dev/pty%X../dev/pty%X (%d)pseudo-terminals
> registered.\n",
> -  0,rtems_telnetd_maximum_ptys-1,rtems_telnetd_maximum_ptys);
> +  syslog(
> +LOG_KERN | LOG_INFO,
> +"/dev/pty%X../dev/pty%X (%d) pseudo-terminals registered.\n",
> +0,
> +rtems_telnetd_maximum_ptys - 1,
> +rtems_telnetd_maximum_ptys
> +  );
>
>return RTEMS_SUCCESSFUL;
>  }
> diff --git a/cpukit/telnetd/telnetd-init.c b/cpukit/telnetd/telnetd-init.c
> index 760db41fcc..7762ad70ba 100644
> --- a/cpukit/telnetd/telnetd-init.c
> +++ b/cpukit/telnetd/telnetd-init.c
> @@ -12,7 +12,7 @@
>
>  #include 
>
> -int rtems_initialize_telnetd( void )
> +rtems_status_code rtems_telnetd_initialize( void )
>  {
>return rtems_telnetd_start( &rtems_telnetd_config );
>  }
> --
> 2.12.3
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Source File Permissions

2018-04-30 Thread Joel Sherrill
On Mon, Apr 30, 2018 at 3:18 AM, Christian Mauderer 
wrote:

> Am 29.04.2018 um 23:08 schrieb Joel Sherrill:
> >
> >
> > On Sun, Apr 29, 2018, 3:32 PM Christian Mauderer  > > wrote:
> >
> > Am 28.04.2018 um 21:45 schrieb Gedare Bloom:
> > > On Thu, Apr 26, 2018 at 7:52 PM, Joel Sherrill  > > wrote:
> > >> Hi
> > >>
> > >> Teaching the class this week, i have noticed that randomly some
> > >> files are executable. I was going to change this but then realized
> > >> that we should all agree on what the permissions on the files and
> > >> directories in the tree(s) should be.
> > >>
> > >> I lean to either:
> > >>
> > >> + 664 for files and 775 for directories
> > >>
> > >> But could be talked into tighter permissions for group and world.
> > >> Whatever we do, it should be consistent and added to the Coding
> > >> Conventions.
> > >>
> > >
> > > Your proposal is sensible to me.
> >
> > Hello Joel,
> >
> > I wouldn't really have a problem with these. But I think the more
> usual
> > ones would be 644 and 755.
> >
> > If I create a new file using `touch somefile` in a directory with
> 775, I
> > still get a 644 file (at least on my Linux machine - I'm not sure
> > whether it is configuration dependant). I think that we will get a
> lot
> > of patches with "wrong" permissions if we use 664 and 775. So maybe
> it
> > would be good to have some reasons for using these wider group
> > permissions.
> >
> >
> > The command you are thinking of is umask to set your default file
> > permissions.
> >
>
> I knew I have seen a setting sometimes. You are right: I have though of
> umask. I only don't need it often enough to remember ;-)
>
> >
> > The only setup that I could think of where such rights might could be
> > useful is one where one user updates the code while some other user
> (for
> > example a build bot) has to run a bootstrap to build the tree. But
> I'm
> > quite sure that even for that case, there are some better solutions
> > (e.g. one working tree that only pushes to a build bot tree).
> >
> >
> > If all commits go through a git or patch tester server, i would assume
> > that we are getting the permissions set by the patch submitter.
> >
> > I suspect (no investigation) that we could have a git check that ensures
> > specific permissions based on the file extension.
> >
>
> That would be great.
>

Should we file that as an admin "wish list" item?

>
> >
> > Any special reasons, use cases or experiences where the 664 and 775
> > would be superior to 644 and 755?
> >
> >
> > No. I just remember historically using those on real multi-user devel
> > machines so everyone on a team could share source.
> >
> > I think we all agree it should be standardized. That's a good step.
> >
> > I will look at git, GNU recommendations and a few packages to see what
> > they do. Then make a proposal which might include ways to try to keep
> > this standardized.
> >
>
> Maybe it's already decided by git:
>
> I did a quick test: I initialized an empty repository (called test) and
> created the following files there:
>
> -rw-r--r-- 1 christian users 0 30. Apr 10:05 644
> -rw-rw-r-- 1 christian users 0 30. Apr 10:05 664
> -rw-rw-rw- 1 christian users 0 30. Apr 10:05 666
> -rwxr-xr-x 1 christian users 0 30. Apr 10:04 755
> -rwxrwxr-x 1 christian users 0 30. Apr 10:05 775
> -rwxrwxrwx 1 christian users 0 30. Apr 10:05 777
>
> Then I did a `git add .` and commited it. If I clone that repository
> with `git clone test test2` my test2 folder contains the following files:
>
> -rw-r--r-- 1 christian users 0 30. Apr 10:07 644
> -rw-r--r-- 1 christian users 0 30. Apr 10:07 664
> -rw-r--r-- 1 christian users 0 30. Apr 10:07 666
> -rwxr-xr-x 1 christian users 0 30. Apr 10:07 755
> -rwxr-xr-x 1 christian users 0 30. Apr 10:07 775
> -rwxr-xr-x 1 christian users 0 30. Apr 10:07 777
>
> If I re-set the permissions, that is not shown as a change. Only the
> executable bit seems to be saved. All other permissions are not saved in
> my test setup.
>

The reading I have done indicates that only the executable bit is
managed by git. The rest are from your umask (I thin).

find . -type f -executable | grep -v .git | grep -v configure

Turns up a number of source files which are executable. given that git
tracks that, I fixed those. That leaves these as executable. The worst
I see on this list is some that are likely obsolete. Do you see anything
else?

/compile
./cpukit/doxy-filter
./cpukit/sapi/vc-key.sh
./depcomp
./install-sh
./mdate-sh
./missing
./testsuites/fstests/fsdosfsname01/create_image.sh
./testsuites/smptests/smplock01/smplock01fair.py
./testsuites/smptests/smplock01/smplock01perf.py
./testsuites/sptests/sptimecounter02/sptimecounter02.py
./tools/build/cvsignore-add.sh
./tools/build/doxy-filter
./tools/build/multigen
./tools/build/rtems-test-check

[PATCH 1/3] tester/rtems/rtems-bsps-powerpc.ini: Fix typo

2018-04-30 Thread Joel Sherrill
---
 tester/rtems/rtems-bsps-powerpc.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tester/rtems/rtems-bsps-powerpc.ini 
b/tester/rtems/rtems-bsps-powerpc.ini
index a8e9991..21dc6b9 100644
--- a/tester/rtems/rtems-bsps-powerpc.ini
+++ b/tester/rtems/rtems-bsps-powerpc.ini
@@ -69,7 +69,7 @@ exclude-smp = beatnik,
   psim,
   qemuppc,
   qemuprep,
-  qemuprep_altivec,
+  qemuprep-altivec,
   qoriq_core_0, qoriq_core_1,
   ss555,
   t32mppc,
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 3/3] rtems-bsps-epiphany.ini: Correct spelling of ephiphany_sim

2018-04-30 Thread Joel Sherrill
---
 tester/rtems/rtems-bsps-epiphany.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tester/rtems/rtems-bsps-epiphany.ini 
b/tester/rtems/rtems-bsps-epiphany.ini
index f808e6a..4739698 100644
--- a/tester/rtems/rtems-bsps-epiphany.ini
+++ b/tester/rtems/rtems-bsps-epiphany.ini
@@ -21,5 +21,5 @@
 # Epiphany Architecture
 #
 [epiphany]
-bsps = epiphany-sim
+bsps = epiphany_sim
 exclude = smp
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 2/3] SPARC: ngmp replaced with specific CPU model BSPs

2018-04-30 Thread Joel Sherrill
---
 tester/rtems/rtems-bsps-sparc.ini | 4 ++--
 tester/rtems/rtems-bsps-tiers.ini | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tester/rtems/rtems-bsps-sparc.ini 
b/tester/rtems/rtems-bsps-sparc.ini
index 4691553..0e2d6fe 100644
--- a/tester/rtems/rtems-bsps-sparc.ini
+++ b/tester/rtems/rtems-bsps-sparc.ini
@@ -21,5 +21,5 @@
 # SPARC Architecture
 #
 [sparc]
-bsps = erc32, leon2, leon3, ngmp
-exclude-smp = erc32, leon2, ngmp
+bsps = erc32, leon2, at697f, gr712rc, ut699, ut700, leon3, gr740
+exclude-smp = erc32, leon2, at697f
diff --git a/tester/rtems/rtems-bsps-tiers.ini 
b/tester/rtems/rtems-bsps-tiers.ini
index 74360e1..5aba43a 100644
--- a/tester/rtems/rtems-bsps-tiers.ini
+++ b/tester/rtems/rtems-bsps-tiers.ini
@@ -110,7 +110,7 @@ bsps_powerpc = beatnik,
 tqm8xx_stk8xx,
 virtex, virtex4, virtex5
 bsps_sh = gensh1, gensh2, gensh4, simsh1, simsh2, simsh2e, simsh4
-bsps_sparc = erc32, leon2, leon3, ngmp
+bsps_sparc = erc32, leon2, at697f, gr712rc, ut699, ut700, leon3, gr740
 bsps_sparc64 = niagara, usiii
 bsps_v850 =  v850e1sim, v850e2sim, v850e2v3sim, v850esim, v850essim, v850sim
 
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/3] tester/rtems/rtems-bsps-powerpc.ini: Fix typo

2018-04-30 Thread Chris Johns
On 01/05/2018 09:13, Joel Sherrill wrote:
> ---
>  tester/rtems/rtems-bsps-powerpc.ini | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

All 3 patches are OK to push.

Thanks
Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/3] source-builder/config: Add couverture-qemu general config & build instructions.

2018-04-30 Thread Chris Johns
On 28/04/2018 20:18, Cillian O'Donnell wrote:
> ---
>  source-builder/config/couverture-qemu-2-1.cfg | 104 
> ++

Why a new file? Could the existing qemu config be used?

I would prefer to have as few of the global configs as possible and share them
as much as possible.

>  1 file changed, 104 insertions(+)
>  create mode 100644 source-builder/config/couverture-qemu-2-1.cfg
> 
> diff --git a/source-builder/config/couverture-qemu-2-1.cfg 
> b/source-builder/config/couverture-qemu-2-1.cfg
> new file mode 100644
> index 000..b0a31bb
> --- /dev/null
> +++ b/source-builder/config/couverture-qemu-2-1.cfg
> @@ -0,0 +1,104 @@
> +#
> +# This configuration file configure's, make's and install's Couverture-QEMU.
> +#
> +
> +%if %{release} == %{nil}
> +  %define release 1
> +%endif
> +
> +#
> +# The description.
> +#
> +Name:  couverture-qemu-%{qemu_version}-%{_host}-%{release}
> +Summary:   Couverture-Qemu is a processor simulator with extra trace ability.

I do not mind we have just the QEMU name and summary.

> +Version:   %{qemu_version}
> +Release:   %{release}
> +URL:https://github.com/AdaCore/qemu
> +BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
> +
> +#
> +# List of architectures to be built
> +#
> +%define qemu_archs arm-softmmu,i386-softmmu,lm32-softmmu,mips-softmmu
> +%define qemu_archs %{qemu_archs},ppc-softmmu,sparc-softmmu

Why limit the archs?

> +
> +#
> +# Prepare the source code.
> +#
> +%prep
> +  build_top=$(pwd)
> +
> +  source_dir_qemu="qemu-%{qemu_version}"
> +  %source setup qemu -n qemu-%{qemu_version}

Why remove the -q?

> +  %patch setup qemu -p1
> +
> +  cd ${build_top}
> +
> +%build
> +  build_top=$(pwd)
> +
> +  %{build_directory}
> +
> +  mkdir -p ${build_dir}
> +  cd ${build_dir}
> +
> +  %if %{pkgconfig check vdeplug}
> +VDE_CONFIG="--enable-vde"
> +VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
> +VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
> +  %endif
> +
> +  %{host_build_flags}
> +
> +  if test "%{_build}" != "%{_host}" ; then
> +CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
> +  fi
> +
> +  SYSROOT=$SB_TMPPREFIX
> +
> +  #
> +  # The --extra-cflags and --extra-ldflags do not work as expected.
> +  #
> +  # Hack warning: MSYS2 does not seem to convert the path to
> +  #   a shell path from Windows so we keep them
> +  #   separate and handle it in the pkgconfig tool.
> +  #
> +  PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
> +  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
> +  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
> +  %{_ld_library_path}=$SYSROOT/lib \
> +  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
> +  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
> +  ../${source_dir_qemu}/configure \
> +--prefix=%{_prefix} \
> +${CROSS_PREFIX_OPTION} \
> +--make=%{__make} \
> +--target-list=%{?with_qemu_archs:%{with_qemu_archs}}\
> +  %{!?with_qemu_archs:%{qemu_archs}} \
> +${VDE_CONFIG} \
> +--disable-smartcard-nss \
> +--disable-tools \ 
> +--disable-pie \ 
> +--disable-vnc \ 
> +--disable-sdl \ 
> +--disable-gtk \ 
> +--disable-opengl \ 
> +--disable-netmap \ 
> +--disable-werror \

Some of these lines have white space at the end which seems wrong.

> +--disable-virtfs \
> +--disable-docs

Does the standard qemu build with these added?

Chris

> +
> +  %{_ld_library_path}=$SYSROOT/lib \
> +  %{__make} %{?_smp_mflags} all
> +
> +  cd ${build_top}
> +
> +%install
> +  build_top=$(pwd)
> +
> +  %{__rmdir} $SB_BUILD_ROOT
> +
> +  cd ${build_dir}
> +  %{_ld_library_path}=$SYSROOT/lib \
> +  %{__make} DESTDIR=$SB_BUILD_ROOT install
> +  cd ${build_top}
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/3] source-builder/config: Add couverture-qemu general config & build instructions.

2018-04-30 Thread Chris Johns
On 01/05/2018 09:52, Chris Johns wrote:
> On 28/04/2018 20:18, Cillian O'Donnell wrote:
>> +#
>> +# List of architectures to be built
>> +#
>> +%define qemu_archs arm-softmmu,i386-softmmu,lm32-softmmu,mips-softmmu
>> +%define qemu_archs %{qemu_archs},ppc-softmmu,sparc-softmmu
> 
> Why limit the archs?

I see some in the Couverture QEMu do not build.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/3] source-builder/config: Add couverture-qemu general config & build instructions.

2018-04-30 Thread Chris Johns
On 28/04/2018 20:18, Cillian O'Donnell wrote:
> ---
>  source-builder/config/couverture-qemu-2-1.cfg | 104 
> ++

I have pushed changes based on these patches. The patch pushed:

1. Rename couverture-qemu files to qemu-couverture to group the files
   with qemu when listed.
2. Use the qemu-1-1.cfg config support so it is shared with a normal
   qemu build.
3. Added a hash for the QEMU-Couverture.
4. Moved the qemu arch and disables specific to Couverture to the
   the Couverture config file.
5. Updated qemu-1-1.cfg to support configurable the archs and disables

I have built qemu on FreeBSD. MacOS failed in pixman and I have a Windows
running now.

Many thanks for these patches, it made the task much simpler for me.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/3] source-builder/config: Add couverture-qemu general config & build instructions.

2018-04-30 Thread Cillian O'Donnell
On Tue, 1 May 2018, 00:52 Chris Johns,  wrote:

> On 28/04/2018 20:18, Cillian O'Donnell wrote:
> > ---
> >  source-builder/config/couverture-qemu-2-1.cfg | 104
> ++
>
> Why a new file? Could the existing qemu config be used?
>

We were thinking at the time that this would eventually replace the qemu
that's there so it was best if it was self contained. They are identical in
places so yes a lot of overlap.

>
> I would prefer to have as few of the global configs as possible and share
> them
> as much as possible.
>
> >  1 file changed, 104 insertions(+)
> >  create mode 100644 source-builder/config/couverture-qemu-2-1.cfg
> >
> > diff --git a/source-builder/config/couverture-qemu-2-1.cfg
> b/source-builder/config/couverture-qemu-2-1.cfg
> > new file mode 100644
> > index 000..b0a31bb
> > --- /dev/null
> > +++ b/source-builder/config/couverture-qemu-2-1.cfg
> > @@ -0,0 +1,104 @@
> > +#
> > +# This configuration file configure's, make's and install's
> Couverture-QEMU.
> > +#
> > +
> > +%if %{release} == %{nil}
> > +  %define release 1
> > +%endif
> > +
> > +#
> > +# The description.
> > +#
> > +Name:  couverture-qemu-%{qemu_version}-%{_host}-%{release}
> > +Summary:   Couverture-Qemu is a processor simulator with extra trace
> ability.
>
> I do not mind we have just the QEMU name and summary.
>
> > +Version:   %{qemu_version}
> > +Release:   %{release}
> > +URL:https://github.com/AdaCore/qemu
> > +BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
> > +
> > +#
> > +# List of architectures to be built
> > +#
> > +%define qemu_archs arm-softmmu,i386-softmmu,lm32-softmmu,mips-softmmu
> > +%define qemu_archs %{qemu_archs},ppc-softmmu,sparc-softmmu
>
> Why limit the archs?
>

These are the ones I tested that produced same results with rtems tester to
the existing qemu. I think there is also ones that aren't relevant to rtems.

>
> > +
> > +#
> > +# Prepare the source code.
> > +#
> > +%prep
> > +  build_top=$(pwd)
> > +
> > +  source_dir_qemu="qemu-%{qemu_version}"
> > +  %source setup qemu -n qemu-%{qemu_version}
>
> Why remove the -q?
>

>From our discussion last year
> 3. What does the -q option do in the %prep section of the build, this
> option shows up in examples in the docs but there is no description of
> what it does?
>
> %source setup qemu -q -n qemu-%{qemu_version}

It is a spec file compatible option that is not used. You can remove the -q.

>
> > +  %patch setup qemu -p1
> > +
> > +  cd ${build_top}
> > +
> > +%build
> > +  build_top=$(pwd)
> > +
> > +  %{build_directory}
> > +
> > +  mkdir -p ${build_dir}
> > +  cd ${build_dir}
> > +
> > +  %if %{pkgconfig check vdeplug}
> > +VDE_CONFIG="--enable-vde"
> > +VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
> > +VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
> > +  %endif
> > +
> > +  %{host_build_flags}
> > +
> > +  if test "%{_build}" != "%{_host}" ; then
> > +CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
> > +  fi
> > +
> > +  SYSROOT=$SB_TMPPREFIX
> > +
> > +  #
> > +  # The --extra-cflags and --extra-ldflags do not work as expected.
> > +  #
> > +  # Hack warning: MSYS2 does not seem to convert the path to
> > +  #   a shell path from Windows so we keep them
> > +  #   separate and handle it in the pkgconfig tool.
> > +  #
> > +  PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
> > +  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
> > +  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
> > +  %{_ld_library_path}=$SYSROOT/lib \
> > +  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
> > +  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
> > +  ../${source_dir_qemu}/configure \
> > +--prefix=%{_prefix} \
> > +${CROSS_PREFIX_OPTION} \
> > +--make=%{__make} \
> > +--target-list=%{?with_qemu_archs:%{with_qemu_archs}}\
> > +  %{!?with_qemu_archs:%{qemu_archs}} \
> > +${VDE_CONFIG} \
> > +--disable-smartcard-nss \
> > +--disable-tools \
> > +--disable-pie \
> > +--disable-vnc \
> > +--disable-sdl \
> > +--disable-gtk \
> > +--disable-opengl \
> > +--disable-netmap \
> > +--disable-werror \
>
> Some of these lines have white space at the end which seems wrong.
>
> > +--disable-virtfs \
> > +--disable-docs
>
> Does the standard qemu build with these added?
>

Not sure, didn't test that.

>
> Chris
>
> > +
> > +  %{_ld_library_path}=$SYSROOT/lib \
> > +  %{__make} %{?_smp_mflags} all
> > +
> > +  cd ${build_top}
> > +
> > +%install
> > +  build_top=$(pwd)
> > +
> > +  %{__rmdir} $SB_BUILD_ROOT
> > +
> > +  cd ${build_dir}
> > +  %{_ld_library_path}=$SYSROOT/lib \
> > +  %{__make} DESTDIR=$SB_BUILD_ROOT install
> > +  cd ${build_top}
> >
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 1/3] source-builder/config: Add couverture-qemu general config & build instructions.

2018-04-30 Thread Chris Johns
On 01/05/2018 16:31, Cillian O'Donnell wrote:
> 
> 
> On Tue, 1 May 2018, 00:52 Chris Johns,  > wrote:
> 
> On 28/04/2018 20:18, Cillian O'Donnell wrote:
> > ---
> >  source-builder/config/couverture-qemu-2-1.cfg | 104
> ++
> 
> Why a new file? Could the existing qemu config be used?
> 
> 
> We were thinking at the time that this would eventually replace the qemu 
> that's
> there so it was best if it was self contained. They are identical in places so
> yes a lot of overlap.
> 

Looking at the results so far this looks likely but it depends on what is in the
main QEMU repo for other targets we would like good simulation for.

> 
> I would prefer to have as few of the global configs as possible and share 
> them
> as much as possible.
> 
> >  1 file changed, 104 insertions(+)
> >  create mode 100644 source-builder/config/couverture-qemu-2-1.cfg
> >
> > diff --git a/source-builder/config/couverture-qemu-2-1.cfg
> b/source-builder/config/couverture-qemu-2-1.cfg
> > new file mode 100644
> > index 000..b0a31bb
> > --- /dev/null
> > +++ b/source-builder/config/couverture-qemu-2-1.cfg
> > @@ -0,0 +1,104 @@
> > +#
> > +# This configuration file configure's, make's and install's 
> Couverture-QEMU.
> > +#
> > +
> > +%if %{release} == %{nil}
> > +  %define release 1
> > +%endif
> > +
> > +#
> > +# The description.
> > +#
> > +Name:      couverture-qemu-%{qemu_version}-%{_host}-%{release}
> > +Summary:   Couverture-Qemu is a processor simulator with extra trace 
> ability.
> 
> I do not mind we have just the QEMU name and summary.
> 
> > +Version:   %{qemu_version}
> > +Release:   %{release}
> > +URL:            https://github.com/AdaCore/qemu
> > +BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
> > +
> > +#
> > +# List of architectures to be built
> > +#
> > +%define qemu_archs arm-softmmu,i386-softmmu,lm32-softmmu,mips-softmmu
> > +%define qemu_archs %{qemu_archs},ppc-softmmu,sparc-softmmu
> 
> Why limit the archs?
> 
> 
> These are the ones I tested that produced same results with rtems tester to 
> the
> existing qemu. I think there is also ones that aren't relevant to rtems.
> 

I have adopted these as well, it makes the build quicker. I found tricore did
not build.

> 
> > +
> > +#
> > +# Prepare the source code.
> > +#
> > +%prep
> > +  build_top=$(pwd)
> > +
> > +  source_dir_qemu="qemu-%{qemu_version}"
> > +  %source setup qemu -n qemu-%{qemu_version}
> 
> Why remove the -q?
> 
> 
> From our discussion last year
>>     3. What does the -q option do in the %prep section of the build, this
>>     option shows up in examples in the docs but there is no description of
>>     what it does?
>> 
>>     %source setup qemu -q -n qemu-%{qemu_version}
> 
> It is a spec file compatible option that is not used. You can remove the -q.
> 

Ah ok, thank you.

> 
> > +  %patch setup qemu -p1
> > +
> > +  cd ${build_top}
> > +
> > +%build
> > +  build_top=$(pwd)
> > +
> > +  %{build_directory}
> > +
> > +  mkdir -p ${build_dir}
> > +  cd ${build_dir}
> > +
> > +  %if %{pkgconfig check vdeplug}
> > +    VDE_CONFIG="--enable-vde"
> > +    VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
> > +    VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs 
> vdeplug}"
> > +  %endif
> > +
> > +  %{host_build_flags}
> > +
> > +  if test "%{_build}" != "%{_host}" ; then
> > +    CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
> > +  fi
> > +
> > +  SYSROOT=$SB_TMPPREFIX
> > +
> > +  #
> > +  # The --extra-cflags and --extra-ldflags do not work as expected.
> > +  #
> > +  # Hack warning: MSYS2 does not seem to convert the path to
> > +  #               a shell path from Windows so we keep them
> > +  #               separate and handle it in the pkgconfig tool.
> > +  #
> > +  PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
> > +  PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
> > +  PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
> > +  %{_ld_library_path}=$SYSROOT/lib \
> > +  LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
> > +  CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
> > +  ../${source_dir_qemu}/configure \
> > +    --prefix=%{_prefix} \
> > +    ${CROSS_PREFIX_OPTION} \
> > +    --make=%{__make} \
> > +    --target-list=%{?with_qemu_archs:%{with_qemu_archs}}\
> > +                  %{!?with_qemu_archs:%{qemu_archs}} \
> > +    ${VDE_CONFIG} \
> > +    --disable-smartcard-nss \
> > +    --disable-tools \
> > +    --disable-pie \
> > +    --disable-vnc \
> > +    --disable-sdl \
> > +    --disable-gtk \
> > +    --disable-opengl \
> > +    --disable-netmap \
> > +