Re: [rtems commit] bsps/arm: Use ALIGN_WITH_INPUT

2013-12-18 Thread Sebastian Huber

On 2013-12-19 01:30, Chris Johns wrote:

On 17/12/2013 1:13 am, Sebastian Huber wrote:

Module:rtems
Branch:master
Commit:287bbb65afd24ffc6254ae5f328733213f184205
Changeset:
http://git.rtems.org/rtems/commit/?id=287bbb65afd24ffc6254ae5f328733213f184205

Author:Sebastian Huber 
Date:  Fri Aug 30 17:43:16 2013 +0200

bsps/arm: Use ALIGN_WITH_INPUT

This requires at least Binutils 2.24.

---

  .../lib/libbsp/arm/shared/include/linker-symbols.h |6 -
  c/src/lib/libbsp/arm/shared/include/start.h|7 -
  c/src/lib/libbsp/arm/shared/startup/linkcmds.base  |  194 +---


I will be reverting this change ...

/usr/home/chris/development/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.8.1/../../../../arm-rtems4.11/bin/ld:linkcmds.base:68:
syntax error

so I am broken and cannot commit the patches.


It would have been nice to wait some hours to give me a chance to comment on 
this.



I think you will need to find another way to integrate this change if it
depends on a specific binutils. Sure the RSB has the new binutils however this
needs to work through into the tool sets in use and that takes time.


The new Binutils are in the RPMs and the RSB.  Updating Binutils is not that 
time consuming.




Also please note the commit message states what the patch is not what is fixes
or provides. I have no idea what this patch addresses and what it attempts to
fix or provide.


Sorry about this, but my experience of the past is that nobody in the RTEMS 
project except me cares about the linker script copy and paste cleanup.  I sent 
several emails to the list and got no answers.


This ALIGN_WITH_INPUT is absolutely necessary to make this linker script 
reliable.  We talked about this issue several months ago.


https://sourceware.org/ml/binutils/2013-06/msg00246.html

https://sourceware.org/binutils/docs-2.24/ld/Forced-Output-Alignment.html#Forced-Output-Alignment

--
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.
___
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel


Add an --enable-httpd-websocket configure option to enable WebSocket in the Mongoose HTTP server

2013-12-18 Thread Nick Withers
Hi all,

The attached patch adds an "--enable-httpd-websocket" configure option
to enable WebSocket (see http://www.websocket.org ,
http://en.wikipedia.org/wiki/WebSocket ) in the Mongoose HTTP server.

This was my first-time "having fun" (*ahem*) with autotools, so
hopefully I haven't stuffed it up!
-- 
Nick Withers

Embedded Systems Programmer
Room 2.26, Building 57
Department of Nuclear Physics
Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)

eMail: nick.with...@anu.edu.au
Phone: +61 2 6125 2091
Mobile: +61 414 397 446
>From 00e483742d4c3d3d5da816b7af4ccc52eb52021d Mon Sep 17 00:00:00 2001
From: Nick Withers 
Date: Thu, 19 Dec 2013 15:31:51 +1100
Subject: [PATCH] Add an "--enable-httpd-websocket" option which, when
 specified, builds the Mongoose HTTP server with WebSocket support

---
 aclocal/enable-httpd-websocket.m4| 11 +++
 configure.ac |  1 +
 cpukit/aclocal/check-httpd-websocket.m4  | 18 ++
 cpukit/aclocal/enable-httpd-websocket.m4 | 10 ++
 cpukit/configure.ac  |  8 
 cpukit/mghttpd/Makefile.am   |  4 
 6 files changed, 52 insertions(+)
 create mode 100644 aclocal/enable-httpd-websocket.m4
 create mode 100644 cpukit/aclocal/check-httpd-websocket.m4
 create mode 100644 cpukit/aclocal/enable-httpd-websocket.m4

diff --git a/aclocal/enable-httpd-websocket.m4 b/aclocal/enable-httpd-websocket.m4
new file mode 100644
index 000..4cd5cc0
--- /dev/null
+++ b/aclocal/enable-httpd-websocket.m4
@@ -0,0 +1,11 @@
+AC_DEFUN([RTEMS_ENABLE_HTTPD_WEBSOCKET],
+[
+AC_ARG_ENABLE(httpd-websocket,
+[AS_HELP_STRING([--enable-httpd-websocket],[enable WebSocket for the HTTP server])],
+[case "${enableval}" in
+  yes) RTEMS_HAS_HTTPD_WEBSOCKET=yes ;;
+  no) RTEMS_HAS_HTTPD_WEBSOCKET=no ;;
+  *)  AC_MSG_ERROR(bad value ${enableval} for enable-httpd-websocket option) ;;
+esac],[RTEMS_HAS_HTTPD_WEBSOCKET=no])
+AC_SUBST(RTEMS_HAS_HTTPD_WEBSOCKET)dnl
+])
diff --git a/configure.ac b/configure.ac
index b6798f7..d719417 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,7 @@ AM_MAINTAINER_MODE
 RTEMS_ENABLE_MULTIPROCESSING
 RTEMS_ENABLE_POSIX
 RTEMS_ENABLE_NETWORKING
+RTEMS_ENABLE_HTTPD_WEBSOCKET
 RTEMS_ENABLE_CXX
 RTEMS_ENABLE_TESTS  
 RTEMS_ENABLE_RTEMS_DEBUG
diff --git a/cpukit/aclocal/check-httpd-websocket.m4 b/cpukit/aclocal/check-httpd-websocket.m4
new file mode 100644
index 000..8f66215
--- /dev/null
+++ b/cpukit/aclocal/check-httpd-websocket.m4
@@ -0,0 +1,18 @@
+dnl
+AC_DEFUN([RTEMS_CHECK_HTTPD_WEBSOCKET],
+[dnl
+AC_REQUIRE([RTEMS_ENABLE_HTTPD_WEBSOCKET])dnl
+
+AC_CACHE_CHECK([whether CPU supports HTTPd WebSocket],
+  rtems_cv_HAS_HTTPD_WEBSOCKET,
+  [dnl
+case "$RTEMS_CPU" in
+*)
+  if test "${RTEMS_HAS_HTTPD_WEBSOCKET}" = "yes"; then
+rtems_cv_HAS_HTTPD_WEBSOCKET="yes";
+  else
+rtems_cv_HAS_HTTPD_WEBSOCKET="no";
+  fi
+  ;;
+esac])
+])
diff --git a/cpukit/aclocal/enable-httpd-websocket.m4 b/cpukit/aclocal/enable-httpd-websocket.m4
new file mode 100644
index 000..eda6cce
--- /dev/null
+++ b/cpukit/aclocal/enable-httpd-websocket.m4
@@ -0,0 +1,10 @@
+AC_DEFUN([RTEMS_ENABLE_HTTPD_WEBSOCKET],
+[
+AC_ARG_ENABLE(httpd-websocket,
+AS_HELP_STRING(--enable-httpd-websocket,enable WebSocket for the HTTP server),
+[case "${enableval}" in
+  yes) RTEMS_HAS_HTTPD_WEBSOCKET=yes ;;
+  no) RTEMS_HAS_HTTPD_WEBSOCKET=no ;;
+  *)  AC_MSG_ERROR(bad value ${enableval} for enable-httpd-websocket option) ;;
+esac],[RTEMS_HAS_HTTPD_WEBSOCKET=no])
+])
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 211f527..837f043 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -15,6 +15,7 @@ RTEMS_ENABLE_MULTIPROCESSING
 RTEMS_ENABLE_POSIX
 RTEMS_ENABLE_RTEMS_DEBUG
 RTEMS_ENABLE_NETWORKING
+RTEMS_ENABLE_HTTPD_WEBSOCKET
 RTEMS_ENABLE_PARAVIRT
 
 RTEMS_ENV_RTEMSCPU
@@ -158,6 +159,7 @@ AC_CHECK_HEADER([signal.h],[
 RTEMS_CHECK_MULTIPROCESSING
 RTEMS_CHECK_POSIX_API
 RTEMS_CHECK_NETWORKING
+RTEMS_CHECK_HTTPD_WEBSOCKET
 RTEMS_CHECK_SMP
 RTEMS_CHECK_ATOMIC
 
@@ -202,6 +204,11 @@ RTEMS_CPUOPT([RTEMS_NETWORKING],
   [1],
   [if networking is enabled])
 
+RTEMS_CPUOPT([RTEMS_HTTPD_WEBSOCKET],
+  [test x"$rtems_cv_HAS_HTTPD_WEBSOCKET" = xyes],
+  [1],
+  [if HTTPd WebSocket is enabled])
+
 RTEMS_CPUOPT([RTEMS_ATOMIC],
   [test x"$rtems_cv_ATOMIC" = xyes],
   [1],
@@ -327,6 +334,7 @@ AM_CONDITIONAL(HAS_SMP,[test "$RTEMS_HAS_SMP" = "yes"])
 
 AM_CONDITIONAL(HAS_PTHREADS,test x"$rtems_cv_HAS_POSIX_API" = x"yes")
 AM_CONDITIONAL(LIBNETWORKING,test x"$rtems_cv_HAS_NETWORKING" = x"yes")
+AM_CONDITIONAL(HTTPD_WEBSOCKET,test x"$rtems_cv_HAS_HTTPD_WEBSOCKET" = x"yes")
 AM_CONDITIONAL([ATOMIC],[test x"$rtems_cv_ATOMIC" = x"yes"])
 
 AM_CONDITIONAL([LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
diff --git a/cpukit/mghttpd/Makefile.am b/cpukit/mghttpd/Makefile.am
index 78af78d..b500873 100644
--- a/cpukit/mghttpd/Makefile.am
+++ b/

Re: [rtems commit] bsps/arm: Use ALIGN_WITH_INPUT

2013-12-18 Thread Chris Johns

On 17/12/2013 1:13 am, Sebastian Huber wrote:

Module:rtems
Branch:master
Commit:287bbb65afd24ffc6254ae5f328733213f184205
Changeset: 
http://git.rtems.org/rtems/commit/?id=287bbb65afd24ffc6254ae5f328733213f184205

Author:Sebastian Huber 
Date:  Fri Aug 30 17:43:16 2013 +0200

bsps/arm: Use ALIGN_WITH_INPUT

This requires at least Binutils 2.24.

---

  .../lib/libbsp/arm/shared/include/linker-symbols.h |6 -
  c/src/lib/libbsp/arm/shared/include/start.h|7 -
  c/src/lib/libbsp/arm/shared/startup/linkcmds.base  |  194 +---


I will be reverting this change ...

/usr/home/chris/development/rtems/4.11/bin/../lib/gcc/arm-rtems4.11/4.8.1/../../../../arm-rtems4.11/bin/ld:linkcmds.base:68: 
syntax error


so I am broken and cannot commit the patches.

I think you will need to find another way to integrate this change if it 
depends on a specific binutils. Sure the RSB has the new binutils 
however this needs to work through into the tool sets in use and that 
takes time.


Also please note the commit message states what the patch is not what is 
fixes or provides. I have no idea what this patch addresses and what it 
attempts to fix or provide.


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


[PATCH] For PR 2162 - RFS File System - statvfs reports 1 block free

2013-12-18 Thread Alan Cudmore
This is for the RFS file system. The statvfs call reports 1 block free when the 
file system is full because it does not account for the superblock in its 
calculation of free blocks. 
This is a simple fix that adjusts the number of blocks reported to account for 
the superblock. We may want to wait for a more complete solution such as 
locating the superblock in each group.
---
 cpukit/libfs/src/rfs/rtems-rfs-rtems.c | 2 +-
 cpukit/libfs/src/rfs/rtems-rfs-shell.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c 
b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
index e199ffe..d95a0f5 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
@@ -753,7 +753,7 @@ rtems_rfs_rtems_statvfs (
   sb->f_bsize   = rtems_rfs_fs_block_size (fs);
   sb->f_frsize  = rtems_rfs_fs_media_block_size (fs);
   sb->f_blocks  = rtems_rfs_fs_media_blocks (fs);
-  sb->f_bfree   = rtems_rfs_fs_blocks (fs) - blocks;
+  sb->f_bfree   = rtems_rfs_fs_blocks (fs) - blocks - 1; /* do not count the 
superblock */
   sb->f_bavail  = sb->f_bfree;
   sb->f_files   = rtems_rfs_fs_inodes (fs);
   sb->f_ffree   = rtems_rfs_fs_inodes (fs) - inodes;
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-shell.c 
b/cpukit/libfs/src/rfs/rtems-rfs-shell.c
index 96c0c17..b92041a 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-shell.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-shell.c
@@ -149,7 +149,7 @@ rtems_rfs_shell_data (rtems_rfs_file_system* fs, int argc, 
char *argv[])
 
   rtems_rfs_shell_unlock_rfs (fs);
 
-  bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
+  bpcent = (blocks * 1000) / (rtems_rfs_fs_blocks (fs) - 1);
   ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
 
   printf ("   blocks used: %zd (%d.%d%%)\n",
-- 
1.8.3.2

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


[PATCH] For PR 2164 - RFS File System - fix bitmap_create_search loop bug

2013-12-18 Thread Alan Cudmore
This is for the RFS file system. There is a bug in the 
rtems_rfs_bitmap_create_search loop. It is supposed to iterate over the range 
of bits in a search element ( usually 32 bits ), so it should loop through bits 
0 through 31. Instead it loops through 0 - 32, causing some blocks not to be 
allocated. As in PR 2163, this depends on the block size and number of blocks 
in a file system. Block sizes and group sizes that are powers of 2 seem to work 
fine ( 512 byte blocks, 4096 block groups, etc ). When the block sizes are not 
powers of 2, then this loop error causes some of the blocks at the end of a 
group to be skipped, preventing 100% of the blocks from being used. A simple 
test for this and PR2163 is to create a RAM disk with block size 3900 and at 
least 1 full group ( 31200 blocks ). A file system with these sizes will not be 
able to allocate 100% of the blocks.
---
 cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c 
b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
index c4050b2..b8bd0b3 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
@@ -599,7 +599,8 @@ rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* 
control)
 
 size -= available;
 
-if (bit == rtems_rfs_bitmap_element_bits ())
+/* Iterate from 0 to 1 less than the number of bits in an element */
+if (bit == (rtems_rfs_bitmap_element_bits () - 1))
 {
   bit = 0;
   search_map++;
-- 
1.8.3.2

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


[PATCH] For PR 2163 - RFS File System - fix group search algorithm bug

2013-12-18 Thread Alan Cudmore
This is for the RFS file system. There is a bug in the group search algorithm 
where it will skip groups, causing blocks to remain unallocated. This is 
dependant on the size of the blocks and number of blocks in a group, so it does 
not always show up. The fix corrects the skipping of groups during the search, 
allowing all of the blocks to be found. 
---
 cpukit/libfs/src/rfs/rtems-rfs-group.c | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/cpukit/libfs/src/rfs/rtems-rfs-group.c 
b/cpukit/libfs/src/rfs/rtems-rfs-group.c
index b08e785..a3df955 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-group.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-group.c
@@ -232,10 +232,24 @@ rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system* fs,
   return 0;
 }
 
+/*
+ * If we are still looking back and forth around the 
+ * group_start, then alternate the direction and 
+ * increment the offset on every other iteration.
+ * Otherwise we are marching through the groups, so just
+ * increment the offset.
+ */  
 if (updown)
+{
   direction = direction > 0 ? -1 : 1;
+  if ( direction == -1 )
+offset++;
+} 
+else
+{
+   offset++;
+}
 
-offset++;
   }
 
   if (rtems_rfs_trace (RTEMS_RFS_TRACE_GROUP_BITMAPS))
-- 
1.8.3.2

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


[PATCH] Removed check for texinfo 5.x. Binutils 2.24 and gcc 4.8.2 build with GNU texinfo 5.1

2013-12-18 Thread Alan Cudmore
This is for RTEMS Source Builder. Binutils 2.23.x did not build on Ubuntu 13.10 
because of texinfo 5.1. The problem is fixed in Binutils 2.24, so the check for 
texinfo 5.x is no longer needed for this configuration.

---
 rtems/config/tools/rtems-gcc-4.8.2-newlib-cvs-1.cfg | 5 -
 1 file changed, 5 deletions(-)

diff --git a/rtems/config/tools/rtems-gcc-4.8.2-newlib-cvs-1.cfg 
b/rtems/config/tools/rtems-gcc-4.8.2-newlib-cvs-1.cfg
index 15942fc..4a5b642 100644
--- a/rtems/config/tools/rtems-gcc-4.8.2-newlib-cvs-1.cfg
+++ b/rtems/config/tools/rtems-gcc-4.8.2-newlib-cvs-1.cfg
@@ -19,11 +19,6 @@
 %define with_iconv 1
 %endif
 
-# Incompatible with Texinfo 5
-%if %{__makeinfo_ver} >= 5.0
- %error Incomaptible version of makeinfo found!
-%endif
-
 #
 # Newlib is from CVS.
 #
-- 
1.8.3.2

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