Re: [PATCH] rtemstoolkit:libelf: sync _libelf_config.h with FreeBSD

2022-05-12 Thread Karel Gardas



Chris,

this is one patch for rtems-tools required for compilation on M1. It 
would be fantastic if you update the snapshot of tools and either let me 
know or make source-builder working with the new snapshot.


I'm going to submit few more patches for source-builder to fix various 
compilation issues on M1, but I think it would be silly if I provide a 
patch for rtems-tools to be included in source builder instead of 
directly fixing the issue in the git.


Thanks!
Karel

On 5/12/22 09:19, Karel Gardas wrote:

This fixes compilation issue on Apple M1.
---
  .../elftoolchain/libelf/_libelf_config.h  | 62 +++
  1 file changed, 21 insertions(+), 41 deletions(-)

diff --git a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h 
b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
index 102aa01..0f16f3a 100644
--- a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
+++ b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
@@ -23,28 +23,14 @@
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
- * $Id: _libelf_config.h 3566 2017-08-31 02:28:40Z emaste $
+ * $Id: _libelf_config.h 3764 2019-06-28 21:44:46Z emaste $
   */
  
-#if defined(__APPLE__) || defined(__DragonFly__)

-
-#ifdefined(__amd64__)
-#defineLIBELF_ARCH EM_X86_64
-#defineLIBELF_BYTEORDERELFDATA2LSB
-#defineLIBELF_CLASSELFCLASS64
-#elif  defined(__i386__)
-#defineLIBELF_ARCH EM_386
-#defineLIBELF_BYTEORDERELFDATA2LSB
-#defineLIBELF_CLASSELFCLASS32
-#endif
-
-#endif /* __DragonFly__ */
-
-#ifdef __FreeBSD__
+#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__)
  
  /*

   * Define LIBELF_{ARCH,BYTEORDER,CLASS} based on the machine architecture.
- * See also: .
+ * See also:  on FreeBSD.
   */
  
  #if	defined(__amd64__)

@@ -91,6 +77,16 @@
  #endif
  #define   LIBELF_CLASSELFCLASS32
  
+#elif	defined(__powerpc64__)

+
+#defineLIBELF_ARCH EM_PPC64
+#if__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#defineLIBELF_BYTEORDERELFDATA2LSB
+#else
+#defineLIBELF_BYTEORDERELFDATA2MSB
+#endif
+#defineLIBELF_CLASSELFCLASS64
+
  #elif defined(__powerpc__)
  
  #define	LIBELF_ARCH		EM_PPC

@@ -103,6 +99,12 @@
  #define   LIBELF_BYTEORDERELFDATA2LSB
  #define   LIBELF_CLASSELFCLASS64
  
+#elif	defined(__riscv64)

+
+#defineLIBELF_ARCH EM_RISCV
+#defineLIBELF_BYTEORDERELFDATA2LSB
+#defineLIBELF_CLASSELFCLASS64
+
  #elif defined(__sparc__)
  
  #define	LIBELF_ARCH		EM_SPARCV9

@@ -110,9 +112,9 @@
  #define   LIBELF_CLASSELFCLASS64
  
  #else

-#error Unknown FreeBSD architecture.
+#error Unknown architecture.
  #endif
-#endif  /* __FreeBSD__ */
+#endif  /*  defined(__APPLE__) || defined(__DragonFly__) || 
defined(__FreeBSD__) */
  
  /*

   * Definitions for Minix3.
@@ -187,25 +189,3 @@
  #endif
  
  #endif /* defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) */

-
-#if defined(__WIN32__) || defined(__CYGWIN__)
-
-#define LIBELF_VCSID(ID)
-
-#if defined(__amd64__)
-
-#define LIBELF_ARCH EM_X86_64
-#define LIBELF_BYTEORDERELFDATA2LSB
-#define LIBELF_CLASSELFCLASS64
-
-#elif   defined(__i386__)
-
-#define LIBELF_ARCH EM_386
-#define LIBELF_BYTEORDERELFDATA2LSB
-#define LIBELF_CLASSELFCLASS32
-
-#else
-#error  Unknown Windows architecture.
-#endif
-
-#endif  /* __WIN32__ || __CYGWIN__ */


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


Re: [PATCH rtems-lwip] lwip: Split sources into origin directories

2022-05-12 Thread Vijay Kumar Banerjee
On Sat, Apr 16, 2022 at 10:48 AM Pavel Pisa  wrote:
>
> Hello Joel,
>
> On Saturday 16 of April 2022 17:26:02 Joel Sherrill wrote:
> > On Sat, Apr 16, 2022, 9:54 AM Pavel Pisa  wrote:
> > > On Thursday 14 of April 2022 22:08:00 Vijay Kumar Banerjee wrote:
> > > >  rename {lwip => uLan}/ports/os/lwipopts.h (100%)
> > > >
> > > > >  rename {lwip => uLan}/ports/os/rtems/arch/cc.h (100%)
> > > > >  rename {lwip => uLan}/ports/os/rtems/arch/perf.h (100%)
> > > > >  rename {lwip => uLan}/ports/os/rtems/arch/sys_arch.c (100%)
> > > > >  rename {lwip => uLan}/ports/os/rtems/arch/sys_arch.h (100%)
> >
> > Ok. Any suggestions for a directory name? :)
>
> I am not in the full sync and I have lost the tracks where
> are all RTEMS LwIP repo copies.
>
> Do we speak about https://git.rtems.org/vijay/rtems-lwip.git ?
>

Yes

> If it is that way then LwIP uses practice to put integration
> stuff into "ports" directory so I would leave the structure
> under LwIP as it is
>
>   ports/os/rtems/arch/sys_arch.c
>
> Or if you want to somehow separate sources into more repos
> then possible but would complicate keep the drivers and targets
> in a sync in future.  I am losing tracks of the build tools etc...
> I hope that when it settles the simple instructions
> would be added on the integration page
>
>   https://devel.rtems.org/wiki/Packages/LWIP
>
> If you need to move ports/os/rtems/arch/sys_arch.c under some directory,
> then it should be something like
>
>   rtems-support/ports/os/rtems/arch/sys_arch.c
>
This would be a good idea. We can put all RTEMS-related ports into a
separate directory. If there's any driver-specific port, that can also
be added there and waf can be taught to pick up the right one
according to the target.

> if the code can be used over all RTEMS targets. Which should be
> a goal anyway and I have initiated it such way years ago.
> But I am not sure why to not let code in the actual
> lwip/ports/drivers together as well. I see that
> in devel branch is the most of our TMS570 code wiped
> out... hmm.. why. There is
>
>  lwip/ports/drivers/bbb
>
> this location seems to me as OK.
> In the suggested changes is
>
> {lwip/ports/drivers => uLan/ports/driver/tms570_emac}/phy_dp83848h.c
>
> I agree with move of all TMS570 specific code under
>
>   /ports/driver/tms570_emac
>

I agree with this approach, as it allows adding sources with
problematic license (like STM) into its own directory and a warning
can be added to waf while building those targets.

> Again if all these shuffles are done only for some license changes
> I would prefer to be noticed and I think that I would not be blocked
> by any of my former studnets nor the faculty to relicense code.
> I would inform the faculty (where I am only left from former group,
> where I have lead part of this development, part was at my company)
> as well as students.
>
> I would prefer if real developer names who invested time into work
> are included at least as Authors in the files but the copyright can
> be moved to RTEMS foundation or whatever.
>
> But as I have said I have lost track and hope that stuff will survive
> in some form till the time when I have some free time or studnet
> to work on the project as his/her theses, GSoC etc...
> I have used the code with external OMK make, I agree that this
> is not right way forward but I wait for outcome of these who
> have more experience with RSB and related tools and propose
> integration.
>
> Best wishes,
>
> Pavel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v1] score:fix smp priority affinity scheduler yeild problem

2022-05-12 Thread Sebastian Huber

Hello,

the patch didn't apply to the latest master so I slightly modified it. 
It would be nice to have a test case for the fixed problem.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] rtemstoolkit:libelf: sync _libelf_config.h with FreeBSD

2022-05-12 Thread Karel Gardas
This fixes compilation issue on Apple M1.
---
 .../elftoolchain/libelf/_libelf_config.h  | 62 +++
 1 file changed, 21 insertions(+), 41 deletions(-)

diff --git a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h 
b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
index 102aa01..0f16f3a 100644
--- a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
+++ b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
@@ -23,28 +23,14 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: _libelf_config.h 3566 2017-08-31 02:28:40Z emaste $
+ * $Id: _libelf_config.h 3764 2019-06-28 21:44:46Z emaste $
  */
 
-#if defined(__APPLE__) || defined(__DragonFly__)
-
-#ifdefined(__amd64__)
-#defineLIBELF_ARCH EM_X86_64
-#defineLIBELF_BYTEORDERELFDATA2LSB
-#defineLIBELF_CLASSELFCLASS64
-#elif  defined(__i386__)
-#defineLIBELF_ARCH EM_386
-#defineLIBELF_BYTEORDERELFDATA2LSB
-#defineLIBELF_CLASSELFCLASS32
-#endif
-
-#endif /* __DragonFly__ */
-
-#ifdef __FreeBSD__
+#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__)
 
 /*
  * Define LIBELF_{ARCH,BYTEORDER,CLASS} based on the machine architecture.
- * See also: .
+ * See also:  on FreeBSD.
  */
 
 #ifdefined(__amd64__)
@@ -91,6 +77,16 @@
 #endif
 #defineLIBELF_CLASSELFCLASS32
 
+#elif  defined(__powerpc64__)
+
+#defineLIBELF_ARCH EM_PPC64
+#if__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#defineLIBELF_BYTEORDERELFDATA2LSB
+#else
+#defineLIBELF_BYTEORDERELFDATA2MSB
+#endif
+#defineLIBELF_CLASSELFCLASS64
+
 #elif  defined(__powerpc__)
 
 #defineLIBELF_ARCH EM_PPC
@@ -103,6 +99,12 @@
 #defineLIBELF_BYTEORDERELFDATA2LSB
 #defineLIBELF_CLASSELFCLASS64
 
+#elif  defined(__riscv64)
+
+#defineLIBELF_ARCH EM_RISCV
+#defineLIBELF_BYTEORDERELFDATA2LSB
+#defineLIBELF_CLASSELFCLASS64
+
 #elif  defined(__sparc__)
 
 #defineLIBELF_ARCH EM_SPARCV9
@@ -110,9 +112,9 @@
 #defineLIBELF_CLASSELFCLASS64
 
 #else
-#error Unknown FreeBSD architecture.
+#error Unknown architecture.
 #endif
-#endif  /* __FreeBSD__ */
+#endif  /*  defined(__APPLE__) || defined(__DragonFly__) || 
defined(__FreeBSD__) */
 
 /*
  * Definitions for Minix3.
@@ -187,25 +189,3 @@
 #endif
 
 #endif /* defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) */
-
-#if defined(__WIN32__) || defined(__CYGWIN__)
-
-#define LIBELF_VCSID(ID)
-
-#if defined(__amd64__)
-
-#define LIBELF_ARCH EM_X86_64
-#define LIBELF_BYTEORDERELFDATA2LSB
-#define LIBELF_CLASSELFCLASS64
-
-#elif   defined(__i386__)
-
-#define LIBELF_ARCH EM_386
-#define LIBELF_BYTEORDERELFDATA2LSB
-#define LIBELF_CLASSELFCLASS32
-
-#else
-#error  Unknown Windows architecture.
-#endif
-
-#endif  /* __WIN32__ || __CYGWIN__ */
-- 
2.25.1

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