Re: [PATCH] arm: Select the TLB invalidate based on the core's Id variant.

2019-06-26 Thread Chris Johns
On 26/6/19 3:53 pm, Sebastian Huber wrote:
> On 26/06/2019 00:22, Chris Johns wrote:
>> On 25/6/19 9:59 pm, Sebastian Huber wrote:
>>> Can't you use the
>>>
>>> B4.1.94 ID_PFR1, Processor Feature Register 1, VMSA
>>>
>>> and test for the Virtualization Extensions?
>>
>> This is a neater solution. Can I assume the ASID support part of the
>> virtualization extensions and op 3 is consistent?
> 
> I checked the manual again. We should use:
> 
> MPIDR, Multiprocessor Affinity Register
> 
> Configurations
> This register is not implemented in architecture versions before ARMv7.
> 
> U, bit[30], in an implementation that includes the Multiprocessing Extensions
> 
> Indicates a Uniprocessor system, as distinct from processor 0 in a
> multiprocessor system. The possible values of this bit are:
> > 0
>  Processor is part of a multiprocessor system.
> 1
>  Processor is part of a uniprocessor system.
> 
>>
>>>
>>> I am not sure if pre ARMv7-AR processors have this register.
>>>
>>
>> It indicates the ID-ISA should help but I cannot see how to determine R vs A
>> from them.
> 
> It must be placed under the #if defined(__ARM_ARCH_7A__) scope.
> 

To make sure I understand is what the code should be :

#if defined(__ARM_ARCH_7A__)
  if (MPIDR & (1 << 39) == 0) {
arm_cp15_tlb_invalidate_entry_all_asids(mva);
  }
  else
#endif
  {
arm_cp15_tlb_instruction_invalidate_entry(mva);
arm_cp15_tlb_data_invalidate_entry(mva);
  }

?

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

Re: stdatomic.h Use By RTEMS Questions

2019-06-26 Thread Sebastian Huber

Hello Joel,

the SMP support assumes a C11 memory model. The _Atomic_* API is also 
used in uniprocessor configurations. Here, interrupt disable/enable is 
used to ensure atomicity and memory barriers are replaced with compiler 
barriers.


--
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: [PATCH] arm: Select the TLB invalidate based on the core's Id variant.

2019-06-26 Thread Sebastian Huber



On 26/06/2019 09:07, Chris Johns wrote:

#if defined(__ARM_ARCH_7A__)
   if (MPIDR & (1 << 39) == 0) {


if ((MPIDR & (1 << 30)) == 0) {


 arm_cp15_tlb_invalidate_entry_all_asids(mva);
   }
   else
#endif
   {
 arm_cp15_tlb_instruction_invalidate_entry(mva);
 arm_cp15_tlb_data_invalidate_entry(mva);
   }

?


--
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: GSoC Project | Basic Support for Trace Compass

2019-06-26 Thread Ravindra Kumar Meena
>
> To be able to better reproduce issues, could you please:
>
> 1. record a raw record item stream produced by the Qemu target via the nc
> tool in a file (not more than 100KiB)
>
> 2. add this file to rtems-tools
>
Okay. Where do I have to add this file?

>
> 3. modify the record-client program to read from a file if a
> --input= command line option is given
>
Okay. Are you suggesting to add --input= flag to the following
command?

./build/misc/rtems-record -H 169.254.159.156 -p 1234 | head


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: GSoC Project | Basic Support for Trace Compass

2019-06-26 Thread Sebastian Huber



On 26/06/2019 12:55, Ravindra Kumar Meena wrote:

To be able to better reproduce issues, could you please:

1. record a raw record item stream produced by the Qemu target via
the nc tool in a file (not more than 100KiB)

2. add this file to rtems-tools

Okay. Where do I have to add this file?


Just add it to misc/record.




3. modify the record-client program to read from a file if a
--input= command line option is given

Okay. Are you suggesting to add --input= flag to the following 
command?


./build/misc/rtems-record -H 169.254.159.156 -p 1234 | head


The record client connects currently to the target via TCP. The 
--input= option should change this so that the record client reads 
the data from the specified file.


--
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 v2] port ndbm

2019-06-26 Thread Vaibhav Gupta
---
 newlib/libc/include/ndbm.h |  84 +
 newlib/libc/search/Makefile.am |   1 +
 newlib/libc/search/ndbm.c  | 215 +
 3 files changed, 300 insertions(+)
 create mode 100644 newlib/libc/include/ndbm.h
 create mode 100644 newlib/libc/search/ndbm.c

diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
new file mode 100644
index 0..3b42c60b0
--- /dev/null
+++ b/newlib/libc/include/ndbm.h
@@ -0,0 +1,84 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Margo Seltzer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 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. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)ndbm.h  8.1 (Berkeley) 6/2/93
+ * $FreeBSD$
+ */
+
+#ifndef _NDBM_H_
+#define_NDBM_H_
+
+#define __DBINTERFACE_PRIVATE
+
+/* Map dbm interface onto db(3). */
+#define DBM_RDONLY O_RDONLY
+
+/* Flags to dbm_store(). */
+#define DBM_INSERT  0
+#define DBM_REPLACE 1
+
+/*
+ * The db(3) support for ndbm always appends this suffix to the
+ * file name to avoid overwriting the user's original database.
+ */
+#defineDBM_SUFFIX  ".db"
+
+typedef struct {
+   void *dptr;
+   int dsize;  /* XXX Should be size_t according to 1003.1-2008. */
+} datum;
+
+struct __db;
+typedef struct __db DB;
+typedef DB DBM;
+#definedbm_pagfno(a)   DBM_PAGFNO_NOT_AVAILABLE
+
+__BEGIN_DECLS
+int dbm_clearerr(DBM *);
+voiddbm_close(DBM *);
+int dbm_delete(DBM *, datum);
+int dbm_error(DBM *);
+datum   dbm_fetch(DBM *, datum);
+datum   dbm_firstkey(DBM *);
+#if __BSD_VISIBLE
+longdbm_forder(DBM *, datum);
+#endif
+datum   dbm_nextkey(DBM *);
+DBM*dbm_open(const char *, int, mode_t);
+int dbm_store(DBM *, datum, datum, int);
+#if __BSD_VISIBLE
+int dbm_dirfno(DBM *);
+#endif
+__END_DECLS
+
+#endif /* !_NDBM_H_ */
diff --git a/newlib/libc/search/Makefile.am b/newlib/libc/search/Makefile.am
index 98920c3f4..a61107fb9 100644
--- a/newlib/libc/search/Makefile.am
+++ b/newlib/libc/search/Makefile.am
@@ -9,6 +9,7 @@ GENERAL_SOURCES = \
db_local.h \
extern.h \
hash.h \
+   ndbm.c \
page.h \
qsort.c
 
diff --git a/newlib/libc/search/ndbm.c b/newlib/libc/search/ndbm.c
new file mode 100644
index 0..8ac6d1f40
--- /dev/null
+++ b/newlib/libc/search/ndbm.c
@@ -0,0 +1,215 @@
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Margo Seltzer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 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. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ *

Re: [PATCH v2] port ndbm

2019-06-26 Thread Vaibhav Gupta
Hello,

Newlib is compiling successfully.
But when i applied patch to RSB. It is not generating ndbm.h inside
  rtems/5/sparc-rtem5/include this time.

I am following same steps again which I followed that day when ndbm.h was
successfully generated.
Below are the log files generated by rsb build.

On Wed, Jun 26, 2019 at 8:32 PM Vaibhav Gupta 
wrote:

> ---
>  newlib/libc/include/ndbm.h |  84 +
>  newlib/libc/search/Makefile.am |   1 +
>  newlib/libc/search/ndbm.c  | 215 +
>  3 files changed, 300 insertions(+)
>  create mode 100644 newlib/libc/include/ndbm.h
>  create mode 100644 newlib/libc/search/ndbm.c
>
> diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
> new file mode 100644
> index 0..3b42c60b0
> --- /dev/null
> +++ b/newlib/libc/include/ndbm.h
> @@ -0,0 +1,84 @@
> +/*-
> + * SPDX-License-Identifier: BSD-3-Clause
> + *
> + * Copyright (c) 1990, 1993
> + * The Regents of the University of California.  All rights reserved.
> + *
> + * This code is derived from software contributed to Berkeley by
> + * Margo Seltzer.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 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. 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.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
> LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
> STRICT
> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
> WAY
> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + *
> + * @(#)ndbm.h  8.1 (Berkeley) 6/2/93
> + * $FreeBSD$
> + */
> +
> +#ifndef _NDBM_H_
> +#define_NDBM_H_
> +
> +#define __DBINTERFACE_PRIVATE
> +
> +/* Map dbm interface onto db(3). */
> +#define DBM_RDONLY O_RDONLY
> +
> +/* Flags to dbm_store(). */
> +#define DBM_INSERT  0
> +#define DBM_REPLACE 1
> +
> +/*
> + * The db(3) support for ndbm always appends this suffix to the
> + * file name to avoid overwriting the user's original database.
> + */
> +#defineDBM_SUFFIX  ".db"
> +
> +typedef struct {
> +   void *dptr;
> +   int dsize;  /* XXX Should be size_t according to 1003.1-2008.
> */
> +} datum;
> +
> +struct __db;
> +typedef struct __db DB;
> +typedef DB DBM;
> +#definedbm_pagfno(a)   DBM_PAGFNO_NOT_AVAILABLE
> +
> +__BEGIN_DECLS
> +int dbm_clearerr(DBM *);
> +voiddbm_close(DBM *);
> +int dbm_delete(DBM *, datum);
> +int dbm_error(DBM *);
> +datum   dbm_fetch(DBM *, datum);
> +datum   dbm_firstkey(DBM *);
> +#if __BSD_VISIBLE
> +longdbm_forder(DBM *, datum);
> +#endif
> +datum   dbm_nextkey(DBM *);
> +DBM*dbm_open(const char *, int, mode_t);
> +int dbm_store(DBM *, datum, datum, int);
> +#if __BSD_VISIBLE
> +int dbm_dirfno(DBM *);
> +#endif
> +__END_DECLS
> +
> +#endif /* !_NDBM_H_ */
> diff --git a/newlib/libc/search/Makefile.am
> b/newlib/libc/search/Makefile.am
> index 98920c3f4..a61107fb9 100644
> --- a/newlib/libc/search/Makefile.am
> +++ b/newlib/libc/search/Makefile.am
> @@ -9,6 +9,7 @@ GENERAL_SOURCES = \
> db_local.h \
> extern.h \
> hash.h \
> +   ndbm.c \
> page.h \
> qsort.c
>
> diff --git a/newlib/libc/search/ndbm.c b/newlib/libc/search/ndbm.c
> new file mode 100644
> index 0..8ac6d1f40
> --- /dev/null
> +++ b/newlib/libc/search/ndbm.c
> @@ -0,0 +1,215 @@
> +/*-
> + * SPDX-License-Identifier: BSD-3-Clause
> + *
> + * Copyright (c) 1990, 1993
> + * The Regents of the University of California.  All rights reserved.
> + *
> + * This code is derived from software contributed to Berkeley by
> + * Margo Seltzer.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + * 1. Redis

Re: [PATCH v2] port ndbm

2019-06-26 Thread Vaibhav Gupta
On Wed, Jun 26, 2019 at 8:35 PM Vaibhav Gupta 
wrote:

> Hello,
>
> Newlib is compiling successfully.
> But when i applied patch to RSB. It is not generating ndbm.h
> inside   rtems/5/sparc-rtem5/include this time.
>
> I am following same steps again which I followed that day when ndbm.h was
> successfully generated.
> Below are the log files generated by rsb build.
>
Although, before testing, I update RSB today(git pull). I figured that
the configuration file, used by rsb for newlib, is now changed.
.
So i updated my steps accordingly. That is, I added the patch in that new
configuration file.
.
According to logs, patch is applied I guess, but it is not generating
ndbm.h   in include directory.

>
> On Wed, Jun 26, 2019 at 8:32 PM Vaibhav Gupta 
> wrote:
>
>> ---
>>  newlib/libc/include/ndbm.h |  84 +
>>  newlib/libc/search/Makefile.am |   1 +
>>  newlib/libc/search/ndbm.c  | 215 +
>>  3 files changed, 300 insertions(+)
>>  create mode 100644 newlib/libc/include/ndbm.h
>>  create mode 100644 newlib/libc/search/ndbm.c
>>
>> diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
>> new file mode 100644
>> index 0..3b42c60b0
>> --- /dev/null
>> +++ b/newlib/libc/include/ndbm.h
>> @@ -0,0 +1,84 @@
>> +/*-
>> + * SPDX-License-Identifier: BSD-3-Clause
>> + *
>> + * Copyright (c) 1990, 1993
>> + * The Regents of the University of California.  All rights reserved.
>> + *
>> + * This code is derived from software contributed to Berkeley by
>> + * Margo Seltzer.
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + * 1. Redistributions of source code must retain the above copyright
>> + *notice, this list of conditions and the following disclaimer.
>> + * 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. 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.
>> + *
>> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
>> AND
>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>> PURPOSE
>> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
>> LIABLE
>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>> CONSEQUENTIAL
>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
>> GOODS
>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
>> STRICT
>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
>> WAY
>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>> + * SUCH DAMAGE.
>> + *
>> + * @(#)ndbm.h  8.1 (Berkeley) 6/2/93
>> + * $FreeBSD$
>> + */
>> +
>> +#ifndef _NDBM_H_
>> +#define_NDBM_H_
>> +
>> +#define __DBINTERFACE_PRIVATE
>> +
>> +/* Map dbm interface onto db(3). */
>> +#define DBM_RDONLY O_RDONLY
>> +
>> +/* Flags to dbm_store(). */
>> +#define DBM_INSERT  0
>> +#define DBM_REPLACE 1
>> +
>> +/*
>> + * The db(3) support for ndbm always appends this suffix to the
>> + * file name to avoid overwriting the user's original database.
>> + */
>> +#defineDBM_SUFFIX  ".db"
>> +
>> +typedef struct {
>> +   void *dptr;
>> +   int dsize;  /* XXX Should be size_t according to 1003.1-2008.
>> */
>> +} datum;
>> +
>> +struct __db;
>> +typedef struct __db DB;
>> +typedef DB DBM;
>> +#definedbm_pagfno(a)   DBM_PAGFNO_NOT_AVAILABLE
>> +
>> +__BEGIN_DECLS
>> +int dbm_clearerr(DBM *);
>> +voiddbm_close(DBM *);
>> +int dbm_delete(DBM *, datum);
>> +int dbm_error(DBM *);
>> +datum   dbm_fetch(DBM *, datum);
>> +datum   dbm_firstkey(DBM *);
>> +#if __BSD_VISIBLE
>> +longdbm_forder(DBM *, datum);
>> +#endif
>> +datum   dbm_nextkey(DBM *);
>> +DBM*dbm_open(const char *, int, mode_t);
>> +int dbm_store(DBM *, datum, datum, int);
>> +#if __BSD_VISIBLE
>> +int dbm_dirfno(DBM *);
>> +#endif
>> +__END_DECLS
>> +
>> +#endif /* !_NDBM_H_ */
>> diff --git a/newlib/libc/search/Makefile.am
>> b/newlib/libc/search/Makefile.am
>> index 98920c3f4..a61107fb9 100644
>> --- a/newlib/libc/search/Makefile.am
>> +++ b/newlib/libc/search/Makefile.am
>> @@ -9,6 +9,7 @@ GENERAL_SOURCES = \
>> db_local.h \
>> extern.h \
>> hash.h \
>> +   ndbm.c \
>> page.h \
>> qsort.c
>>
>> diff --git a/newlib/libc/search/ndbm.c b/newlib/libc/search/ndbm.c
>> new file mode 1

Re: GSoC Project | Basic Support for Trace Compass

2019-06-26 Thread Ravindra Kumar Meena
26th June Work Summary:

Updated the file generation code in rtems-tools with required changes.
Improved the metadata for the same. I have squashed the commits.
https://github.com/rmeena840/rtems-tools/commit/c0035feab6d99b4aeecdd0d76b049f3e2c7aa9ef
https://github.com/rmeena840/rtems-tools/commit/f68b5031f4e6f847239effe677701635316b12fb

Attended the weekly meeting on Freenode.


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2] port ndbm

2019-06-26 Thread Vaibhav Gupta
Hello Gedare,
as you suggested, to use the group name of patch as 'newlib'.
I did that and then removed the line"%patch setup newlib -p1"
It has generated ndbm.h in include directory.

Vaibhav Gupta

On Wed, Jun 26, 2019 at 8:41 PM Vaibhav Gupta 
wrote:

>
>
> On Wed, Jun 26, 2019 at 8:35 PM Vaibhav Gupta 
> wrote:
>
>> Hello,
>>
>> Newlib is compiling successfully.
>> But when i applied patch to RSB. It is not generating ndbm.h
>> inside   rtems/5/sparc-rtem5/include this time.
>>
>> I am following same steps again which I followed that day when ndbm.h was
>> successfully generated.
>> Below are the log files generated by rsb build.
>>
> Although, before testing, I update RSB today(git pull). I figured that
> the configuration file, used by rsb for newlib, is now changed.
> .
> So i updated my steps accordingly. That is, I added the patch in that new
> configuration file.
> .
> According to logs, patch is applied I guess, but it is not generating
> ndbm.h   in include directory.
>
>>
>> On Wed, Jun 26, 2019 at 8:32 PM Vaibhav Gupta 
>> wrote:
>>
>>> ---
>>>  newlib/libc/include/ndbm.h |  84 +
>>>  newlib/libc/search/Makefile.am |   1 +
>>>  newlib/libc/search/ndbm.c  | 215 +
>>>  3 files changed, 300 insertions(+)
>>>  create mode 100644 newlib/libc/include/ndbm.h
>>>  create mode 100644 newlib/libc/search/ndbm.c
>>>
>>> diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
>>> new file mode 100644
>>> index 0..3b42c60b0
>>> --- /dev/null
>>> +++ b/newlib/libc/include/ndbm.h
>>> @@ -0,0 +1,84 @@
>>> +/*-
>>> + * SPDX-License-Identifier: BSD-3-Clause
>>> + *
>>> + * Copyright (c) 1990, 1993
>>> + * The Regents of the University of California.  All rights
>>> reserved.
>>> + *
>>> + * This code is derived from software contributed to Berkeley by
>>> + * Margo Seltzer.
>>> + *
>>> + * Redistribution and use in source and binary forms, with or without
>>> + * modification, are permitted provided that the following conditions
>>> + * are met:
>>> + * 1. Redistributions of source code must retain the above copyright
>>> + *notice, this list of conditions and the following disclaimer.
>>> + * 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. 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.
>>> + *
>>> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
>>> AND
>>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
>>> PURPOSE
>>> + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
>>> LIABLE
>>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>>> CONSEQUENTIAL
>>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
>>> GOODS
>>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
>>> STRICT
>>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
>>> ANY WAY
>>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
>>> OF
>>> + * SUCH DAMAGE.
>>> + *
>>> + * @(#)ndbm.h  8.1 (Berkeley) 6/2/93
>>> + * $FreeBSD$
>>> + */
>>> +
>>> +#ifndef _NDBM_H_
>>> +#define_NDBM_H_
>>> +
>>> +#define __DBINTERFACE_PRIVATE
>>> +
>>> +/* Map dbm interface onto db(3). */
>>> +#define DBM_RDONLY O_RDONLY
>>> +
>>> +/* Flags to dbm_store(). */
>>> +#define DBM_INSERT  0
>>> +#define DBM_REPLACE 1
>>> +
>>> +/*
>>> + * The db(3) support for ndbm always appends this suffix to the
>>> + * file name to avoid overwriting the user's original database.
>>> + */
>>> +#defineDBM_SUFFIX  ".db"
>>> +
>>> +typedef struct {
>>> +   void *dptr;
>>> +   int dsize;  /* XXX Should be size_t according to
>>> 1003.1-2008. */
>>> +} datum;
>>> +
>>> +struct __db;
>>> +typedef struct __db DB;
>>> +typedef DB DBM;
>>> +#definedbm_pagfno(a)   DBM_PAGFNO_NOT_AVAILABLE
>>> +
>>> +__BEGIN_DECLS
>>> +int dbm_clearerr(DBM *);
>>> +voiddbm_close(DBM *);
>>> +int dbm_delete(DBM *, datum);
>>> +int dbm_error(DBM *);
>>> +datum   dbm_fetch(DBM *, datum);
>>> +datum   dbm_firstkey(DBM *);
>>> +#if __BSD_VISIBLE
>>> +longdbm_forder(DBM *, datum);
>>> +#endif
>>> +datum   dbm_nextkey(DBM *);
>>> +DBM*dbm_open(const char *, int, mode_t);
>>> +int dbm_store(DBM *, datum, datum, int);
>>> +#if __BSD_VISIBLE
>>> +int dbm_dirfno(DBM *);
>>> +#endif
>>> +__END_DECLS
>>> +
>>> +#endif /* !_NDBM_H_ */
>>> diff --git a/newlib/libc/search

Re: [PATCH v2] port ndbm

2019-06-26 Thread Aditya Upadhyay
On Thu, Jun 27, 2019 at 2:11 AM Vaibhav Gupta  wrote:
>
> Hello Gedare,
> as you suggested, to use the group name of patch as 'newlib'.
> I did that and then removed the line"%patch setup newlib -p1"
> It has generated ndbm.h in include directory.
>

You are applying the patches to RSB just for testing purpose. It would
not show your contribution.
This will only help you to tests your methods what you will be going
to contribute to newlib.
So figuring out the solution of this old header replacement or
updating headers and submitting the patches to
the newlib is recommended.

I appreciate your effort. Have you figured out how would you be going
to write the test cases for ndbm and ftw methods?

> Vaibhav Gupta
>
> On Wed, Jun 26, 2019 at 8:41 PM Vaibhav Gupta  
> wrote:
>>
>>
>>
>> On Wed, Jun 26, 2019 at 8:35 PM Vaibhav Gupta  
>> wrote:
>>>
>>> Hello,
>>>
>>> Newlib is compiling successfully.
>>> But when i applied patch to RSB. It is not generating ndbm.h inside 
>>>   rtems/5/sparc-rtem5/include this time.
>>>
>>> I am following same steps again which I followed that day when ndbm.h was 
>>> successfully generated.
>>> Below are the log files generated by rsb build.
>>
>> Although, before testing, I update RSB today(git pull). I figured that 
>> the configuration file, used by rsb for newlib, is now changed.
>> .
>> So i updated my steps accordingly. That is, I added the patch in that new 
>> configuration file.
>> .
>> According to logs, patch is applied I guess, but it is not generating
>> ndbm.h   in include directory.
>>>
>>>
>>> On Wed, Jun 26, 2019 at 8:32 PM Vaibhav Gupta  
>>> wrote:

 ---
  newlib/libc/include/ndbm.h |  84 +
  newlib/libc/search/Makefile.am |   1 +
  newlib/libc/search/ndbm.c  | 215 +
  3 files changed, 300 insertions(+)
  create mode 100644 newlib/libc/include/ndbm.h
  create mode 100644 newlib/libc/search/ndbm.c

 diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
 new file mode 100644
 index 0..3b42c60b0
 --- /dev/null
 +++ b/newlib/libc/include/ndbm.h
 @@ -0,0 +1,84 @@
 +/*-
 + * SPDX-License-Identifier: BSD-3-Clause
 + *
 + * Copyright (c) 1990, 1993
 + * The Regents of the University of California.  All rights reserved.
 + *
 + * This code is derived from software contributed to Berkeley by
 + * Margo Seltzer.
 + *
 + * Redistribution and use in source and binary forms, with or without
 + * modification, are permitted provided that the following conditions
 + * are met:
 + * 1. Redistributions of source code must retain the above copyright
 + *notice, this list of conditions and the following disclaimer.
 + * 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. 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.
 + *
 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
 PURPOSE
 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 
 LIABLE
 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
 CONSEQUENTIAL
 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
 STRICT
 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY 
 WAY
 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 + * SUCH DAMAGE.
 + *
 + * @(#)ndbm.h  8.1 (Berkeley) 6/2/93
 + * $FreeBSD$
 + */
 +
 +#ifndef _NDBM_H_
 +#define_NDBM_H_
 +
 +#define __DBINTERFACE_PRIVATE
 +
 +/* Map dbm interface onto db(3). */
 +#define DBM_RDONLY O_RDONLY
 +
 +/* Flags to dbm_store(). */
 +#define DBM_INSERT  0
 +#define DBM_REPLACE 1
 +
 +/*
 + * The db(3) support for ndbm always appends this suffix to the
 + * file name to avoid overwriting the user's original database.
 + */
 +#defineDBM_SUFFIX  ".db"
 +
 +typedef struct {
 +   void *dptr;
 +   int dsize;  /* XXX Should be size_t according to 1003.1-2008. 
 */
 +} datum;
 +
 +struct __db;
 +typedef struct __db DB;
 +typedef DB DBM;
 +#define 

Re: GSoC Project | Basic Support for Trace Compass

2019-06-26 Thread Sebastian Huber

On 26/06/2019 17:58, Ravindra Kumar Meena wrote:

26th June Work Summary:

Updated the file generation code in rtems-tools with required changes. 
Improved the metadata for the same. I have squashed the commits.

https://github.com/rmeena840/rtems-tools/commit/c0035feab6d99b4aeecdd0d76b049f3e2c7aa9ef
https://github.com/rmeena840/rtems-tools/commit/f68b5031f4e6f847239effe677701635316b12fb

Attended the weekly meeting on Freenode.


Could you please start a new thread for each daily summary. Please also 
don't squash the commits in your development branch. The squashing makes 
it difficult to track your work. We can do a big squash before we 
integrate the stuff into the upstream rtems-tools.


How is the progress with this task:

https://lists.rtems.org/pipermail/devel/2019-June/026306.html

My time estimate for this is about one day for you. An experienced C 
developer can do this in less than 30 minutes.


--
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: [PATCH v2] port ndbm

2019-06-26 Thread Vaibhav Gupta
On Thu, Jun 27, 2019 at 10:08 AM Aditya Upadhyay 
wrote:

> On Thu, Jun 27, 2019 at 2:11 AM Vaibhav Gupta 
> wrote:
> >
> > Hello Gedare,
> > as you suggested, to use the group name of patch as 'newlib'.
> > I did that and then removed the line"%patch setup newlib -p1"
> > It has generated ndbm.h in include directory.
> >
>
> You are applying the patches to RSB just for testing purpose. It would
> not show your contribution.
> This will only help you to tests your methods what you will be going
> to contribute to newlib.
> So figuring out the solution of this old header replacement or
> updating headers and submitting the patches to
> the newlib is recommended.
>
Sure, I will complete the testsuite as soon as possible and then push the
patch to newlib.

>
> I appreciate your effort. Have you figured out how would you be going
> to write the test cases for ndbm and ftw methods?
>
I did tried to check for the ndbm using raw ndbm methods in
testsuites/samples/hello/init.c:
https://github.com/VARoDeK/rtems/blob/test_ndbm_presence/testsuites/samples/hello/init.c
.
It showing the error:
/home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
hello/hello-init.o: in function `Init':
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:41:
undefined reference to `dbm_open'
/home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:42:
undefined reference to `dbm_store'
/home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:45:
undefined reference to `dbm_fetch'
/home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:49:
undefined reference to `dbm_close'

>
> > Vaibhav Gupta
> >
> > On Wed, Jun 26, 2019 at 8:41 PM Vaibhav Gupta 
> wrote:
> >>
> >>
> >>
> >> On Wed, Jun 26, 2019 at 8:35 PM Vaibhav Gupta 
> wrote:
> >>>
> >>> Hello,
> >>>
> >>> Newlib is compiling successfully.
> >>> But when i applied patch to RSB. It is not generating ndbm.h
>  inside   rtems/5/sparc-rtem5/include this time.
> >>>
> >>> I am following same steps again which I followed that day when ndbm.h
> was successfully generated.
> >>> Below are the log files generated by rsb build.
> >>
> >> Although, before testing, I update RSB today(git pull). I figured
> that the configuration file, used by rsb for newlib, is now changed.
> >> .
> >> So i updated my steps accordingly. That is, I added the patch in that
> new configuration file.
> >> .
> >> According to logs, patch is applied I guess, but it is not generating
>   ndbm.h   in include directory.
> >>>
> >>>
> >>> On Wed, Jun 26, 2019 at 8:32 PM Vaibhav Gupta <
> vaibhavgupt...@gmail.com> wrote:
> 
>  ---
>   newlib/libc/include/ndbm.h |  84 +
>   newlib/libc/search/Makefile.am |   1 +
>   newlib/libc/search/ndbm.c  | 215
> +
>   3 files changed, 300 insertions(+)
>   create mode 100644 newlib/libc/include/ndbm.h
>   create mode 100644 newlib/libc/search/ndbm.c
> 
>  diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
>  new file mode 100644
>  index 0..3b42c60b0
>  --- /dev/null
>  +++ b/newlib/libc/include/ndbm.h
>  @@ -0,0 +1,84 @@
>  +/*-
>  + * SPDX-License-Identifier: BSD-3-Clause
>  + *
>  + * Copyright (c) 1990, 1993
>  + * The Regents of the University of California.  All rights
> reserved.
>  + *
>  + * This code is derived from software contributed to Berkeley by
>  + * Margo Seltzer.
>  + *
>  + * Redistribution and use in source and binary forms, with or without
>  + * modification, are permitted provided that the following conditions
>  + * are met:
>  + * 1. Redistributions of source code must retain the above copyright
>  + *notice, this list of conditions and the following disclaimer.
>  + * 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. 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.
>  + *
>  + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS
> IS'' AND
>  + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
> THE
>  + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
> PARTICULAR PURPOSE
> 

Re: [PATCH v2] port ndbm

2019-06-26 Thread Aditya Upadhyay
On Thu, Jun 27, 2019 at 11:14 AM Vaibhav Gupta  wrote:
>
>
>
> On Thu, Jun 27, 2019 at 10:08 AM Aditya Upadhyay  wrote:
>>
>> On Thu, Jun 27, 2019 at 2:11 AM Vaibhav Gupta  
>> wrote:
>> >
>> > Hello Gedare,
>> > as you suggested, to use the group name of patch as 'newlib'.
>> > I did that and then removed the line"%patch setup newlib -p1"
>> > It has generated ndbm.h in include directory.
>> >
>>
>> You are applying the patches to RSB just for testing purpose. It would
>> not show your contribution.
>> This will only help you to tests your methods what you will be going
>> to contribute to newlib.
>> So figuring out the solution of this old header replacement or
>> updating headers and submitting the patches to
>> the newlib is recommended.
>
> Sure, I will complete the testsuite as soon as possible and then push the 
> patch to newlib.
>>
First you will have to figure out the dependecies between headers,
only then you would be able to
send the right patches. Otherwise You have to make much changes in your patch.

>>
>> I appreciate your effort. Have you figured out how would you be going
>> to write the test cases for ndbm and ftw methods?
>
> I did tried to check for the ndbm using raw ndbm methods in
> testsuites/samples/hello/init.c: 
> https://github.com/VARoDeK/rtems/blob/test_ndbm_presence/testsuites/samples/hello/init.c
> .

You will have to write test cases in psxtests directory by following
this open group page:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html

> It showing the error:
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>  hello/hello-init.o: in function `Init':
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:41:
>  undefined reference to `dbm_open'
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>  
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:42:
>  undefined reference to `dbm_store'
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>  
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:45:
>  undefined reference to `dbm_fetch'
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>  
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:49:
>  undefined reference to `dbm_close'
>>
>>
Can you check whether function symbol is getting generated or not?
Like when you compile newlib, You can see that function symbol
using this command:

$sparc-rtems5-nm `find . -name lib_a-ndbm.o` This command will list
the function symbol.

>> > Vaibhav Gupta
>> >
>> > On Wed, Jun 26, 2019 at 8:41 PM Vaibhav Gupta  
>> > wrote:
>> >>
>> >>
>> >>
>> >> On Wed, Jun 26, 2019 at 8:35 PM Vaibhav Gupta  
>> >> wrote:
>> >>>
>> >>> Hello,
>> >>>
>> >>> Newlib is compiling successfully.
>> >>> But when i applied patch to RSB. It is not generating ndbm.h 
>> >>> inside   rtems/5/sparc-rtem5/include this time.
>> >>>
>> >>> I am following same steps again which I followed that day when ndbm.h 
>> >>> was successfully generated.
>> >>> Below are the log files generated by rsb build.
>> >>
>> >> Although, before testing, I update RSB today(git pull). I figured 
>> >> that the configuration file, used by rsb for newlib, is now changed.
>> >> .
>> >> So i updated my steps accordingly. That is, I added the patch in that new 
>> >> configuration file.
>> >> .
>> >> According to logs, patch is applied I guess, but it is not generating
>> >> ndbm.h   in include directory.
>> >>>
>> >>>
>> >>> On Wed, Jun 26, 2019 at 8:32 PM Vaibhav Gupta  
>> >>> wrote:
>> 
>>  ---
>>   newlib/libc/include/ndbm.h |  84 +
>>   newlib/libc/search/Makefile.am |   1 +
>>   newlib/libc/search/ndbm.c  | 215 +
>>   3 files changed, 300 insertions(+)
>>   create mode 100644 newlib/libc/include/ndbm.h
>>   create mode 100644 newlib/libc/search/ndbm.c
>> 
>>  diff --git a/newlib/libc/include/ndbm.h b/newlib/libc/include/ndbm.h
>>  new file mode 100644
>>  index 0..3b42c60b0
>>  --- /dev/null
>>  +++ b/newlib/libc/include/ndbm.h
>>  @@ -0,0 +1,84 @@
>>  +/*-
>>  + * SPDX-License-Identifier: BSD-3-Clause
>>  + *
>>  + * Copyright (c) 1990, 1993
>>  + * The Regents of the University of California.  All rights 
>>  reserved.
>>  + *
>>  + * This code is derived from software contributed to Berkeley by
>>  + * Margo Seltzer.
>>  + *
>>  + * Redistribution and use in source and binary forms, with or without
>>  + * modification, are permitted provided that the following conditions
>>  + * are met:
>>  + * 1. Redistributions of source code must retain the above copyright
>> >>>

Re: GSoC Project | Basic Support for Trace Compass

2019-06-26 Thread Ravindra Kumar Meena
On Thu, Jun 27, 2019 at 10:53 AM Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 26/06/2019 17:58, Ravindra Kumar Meena wrote:
> > 26th June Work Summary:
> >
> > Updated the file generation code in rtems-tools with required changes.
> > Improved the metadata for the same. I have squashed the commits.
> >
> https://github.com/rmeena840/rtems-tools/commit/c0035feab6d99b4aeecdd0d76b049f3e2c7aa9ef
> >
> https://github.com/rmeena840/rtems-tools/commit/f68b5031f4e6f847239effe677701635316b12fb
> >
> > Attended the weekly meeting on Freenode.
>
> Could you please start a new thread for each daily summary. Please also
> don't squash the commits in your development branch. The squashing makes
> it difficult to track your work. We can do a big squash before we
> integrate the stuff into the upstream rtems-tools.
>
> How is the progress with this task:
>
> https://lists.rtems.org/pipermail/devel/2019-June/026306.html
>
> My time estimate for this is about one day for you. An experienced C
> developer can do this in less than 30 minutes.
>
Is there a way to set the file size for which nc should output? I can get
around minimum 500KB of file.
I am following this
https://linux.die.net/man/1/nc


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Coverity Scan Configuration?

2019-06-26 Thread Sebastian Huber

Hello,

the RTEMS project uses Coverity Scan:

https://scan.coverity.com/projects/rtems?tab=overview

Can it be configured in the open source program variant? For example 
Coverity supports a couple of MISRA rules:


https://www.synopsys.com/content/dam/synopsys/sig-assets/datasheets/coverity-misra-standards-ds-ul.pdf

From the reported defects for RTEMS I guess these rules are not enabled 
currently. Would it be possible to enable a subset of these rules in our 
current setup?


--
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: GSoC Project | Basic Support for Trace Compass

2019-06-26 Thread Sebastian Huber

On 27/06/2019 08:15, Ravindra Kumar Meena wrote:



On Thu, Jun 27, 2019 at 10:53 AM Sebastian Huber 
> wrote:


On 26/06/2019 17:58, Ravindra Kumar Meena wrote:
 > 26th June Work Summary:
 >
 > Updated the file generation code in rtems-tools with required
changes.
 > Improved the metadata for the same. I have squashed the commits.
 >

https://github.com/rmeena840/rtems-tools/commit/c0035feab6d99b4aeecdd0d76b049f3e2c7aa9ef
 >

https://github.com/rmeena840/rtems-tools/commit/f68b5031f4e6f847239effe677701635316b12fb
 >
 > Attended the weekly meeting on Freenode.

Could you please start a new thread for each daily summary. Please also
don't squash the commits in your development branch. The squashing
makes
it difficult to track your work. We can do a big squash before we
integrate the stuff into the upstream rtems-tools.

How is the progress with this task:

https://lists.rtems.org/pipermail/devel/2019-June/026306.html

My time estimate for this is about one day for you. An experienced C
developer can do this in less than 30 minutes.

Is there a way to set the file size for which nc should output? I can 
get around minimum 500KB of file.

I am following this
https://linux.die.net/man/1/nc


You can use dd to reduce the file size, e.g.

dd if=input-file of=output-file count=131072

--
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: [PATCH v2] port ndbm

2019-06-26 Thread Vaibhav Gupta
On Thu, Jun 27, 2019 at 11:24 AM Aditya Upadhyay 
wrote:

> On Thu, Jun 27, 2019 at 11:14 AM Vaibhav Gupta 
> wrote:
> >
> >
> >
> > On Thu, Jun 27, 2019 at 10:08 AM Aditya Upadhyay 
> wrote:
> >>
> >> On Thu, Jun 27, 2019 at 2:11 AM Vaibhav Gupta 
> wrote:
> >> >
> >> > Hello Gedare,
> >> > as you suggested, to use the group name of patch as 'newlib'.
> >> > I did that and then removed the line"%patch setup newlib -p1"
> >> > It has generated ndbm.h in include directory.
> >> >
> >>
> >> You are applying the patches to RSB just for testing purpose. It would
> >> not show your contribution.
> >> This will only help you to tests your methods what you will be going
> >> to contribute to newlib.
> >> So figuring out the solution of this old header replacement or
> >> updating headers and submitting the patches to
> >> the newlib is recommended.
> >
> > Sure, I will complete the testsuite as soon as possible and then push
> the patch to newlib.
> >>
> First you will have to figure out the dependecies between headers,
> only then you would be able to
> send the right patches. Otherwise You have to make much changes in your
> patch.
>
> >>
> >> I appreciate your effort. Have you figured out how would you be going
> >> to write the test cases for ndbm and ftw methods?
> >
> > I did tried to check for the ndbm using raw ndbm methods in
> testsuites/samples/hello/init.c:
> https://github.com/VARoDeK/rtems/blob/test_ndbm_presence/testsuites/samples/hello/init.c
> > .
>
> You will have to write test cases in psxtests directory by following
> this open group page:
>
> https://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html
>
> > It showing the error:
> >
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
> hello/hello-init.o: in function `Init':
> >
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:41:
> undefined reference to `dbm_open'
> >
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:42:
> undefined reference to `dbm_store'
> >
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:45:
> undefined reference to `dbm_fetch'
> >
> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:49:
> undefined reference to `dbm_close'
> >>
> >>
> Can you check whether function symbol is getting generated or not?
> Like when you compile newlib, You can see that function symbol
> using this command:
>
> $sparc-rtems5-nm `find . -name lib_a-ndbm.o` This command will list
> the function symbol.
>
When I made changes in Newlib-cygwin, and compiled it in
b-sparc-rtems5-newlib.
I checked for function symbols using commnad :
$ cd
/home/varodek/development/newlib/b-sparc-rtems5-newlib/sparc-rtems5/newlib/libc/posix
$ nm -A ./*.o | grep dbm_close
output<< ./lib_a-ndbm.o: T dbm_close

>
> >> > Vaibhav Gupta
> >> >
> >> > On Wed, Jun 26, 2019 at 8:41 PM Vaibhav Gupta <
> vaibhavgupt...@gmail.com> wrote:
> >> >>
> >> >>
> >> >>
> >> >> On Wed, Jun 26, 2019 at 8:35 PM Vaibhav Gupta <
> vaibhavgupt...@gmail.com> wrote:
> >> >>>
> >> >>> Hello,
> >> >>>
> >> >>> Newlib is compiling successfully.
> >> >>> But when i applied patch to RSB. It is not generating ndbm.h
>  inside   rtems/5/sparc-rtem5/include this time.
> >> >>>
> >> >>> I am following same steps again which I followed that day when
> ndbm.h was successfully generated.
> >> >>> Below are the log files generated by rsb build.
> >> >>
> >> >> Although, before testing, I update RSB today(git pull). I
> figured that the configuration file, used by rsb for newlib, is now changed.
> >> >> .
> >> >> So i updated my steps accordingly. That is, I added the patch in
> that new configuration file.
> >> >> .
> >> >> According to logs, patch is applied I guess, but it is not
> generatingndbm.h   in include directory.
> >> >>>
> >> >>>
> >> >>> On Wed, Jun 26, 2019 at 8:32 PM Vaibhav Gupta <
> vaibhavgupt...@gmail.com> wrote:
> >> 
> >>  ---
> >>   newlib/libc/include/ndbm.h |  84 +
> >>   newlib/libc/search/Makefile.am |   1 +
> >>   newlib/libc/search/ndbm.c  | 215
> +
> >>   3 files changed, 300 insertions(+)
> >>   create mode 100644 newlib/libc/include/ndbm.h
> >>   create mode 100644 newlib/libc/search/ndbm.c
> >> 
> >>  diff --git a/newlib/libc/include/ndbm.h
> b/newlib/libc/include/ndbm.h
> >>  new file mode 100644
> >>  index 0..3b42c60b0
> >>  --- /dev/null
> >>  +++ b/newlib/libc/include/ndbm.h
> >>  @@ -0,0 +1,84 @@
> >>  +/*-
> >> >>>

Re: [PATCH v2] port ndbm

2019-06-26 Thread Vaibhav Gupta
I even tried:
$ cd
/home/varodek/development/newlib/b-sparc-rtems5-newlib/sparc-rtems5/newlib/libc/posix
$ sparc-rtems5-nm -A ./*.o | grep lib_a-ndbm.o
Output <<
./lib_a-ndbm.o: T dbm_clearerr
./lib_a-ndbm.o: T dbm_close
./lib_a-ndbm.o: T dbm_delete
./lib_a-ndbm.o: T dbm_dirfno
./lib_a-ndbm.o: T dbm_error
./lib_a-ndbm.o: T dbm_fetch
./lib_a-ndbm.o: T dbm_firstkey
./lib_a-ndbm.o: T dbm_nextkey
./lib_a-ndbm.o: T dbm_open
./lib_a-ndbm.o: T dbm_store
./lib_a-ndbm.o: U __errno
./lib_a-ndbm.o: U __hash_open
./lib_a-ndbm.o: U strcat
./lib_a-ndbm.o: U strcpy
./lib_a-ndbm.o: U strlen

On Thu, Jun 27, 2019 at 11:51 AM Vaibhav Gupta 
wrote:

>
>
> On Thu, Jun 27, 2019 at 11:24 AM Aditya Upadhyay 
> wrote:
>
>> On Thu, Jun 27, 2019 at 11:14 AM Vaibhav Gupta 
>> wrote:
>> >
>> >
>> >
>> > On Thu, Jun 27, 2019 at 10:08 AM Aditya Upadhyay 
>> wrote:
>> >>
>> >> On Thu, Jun 27, 2019 at 2:11 AM Vaibhav Gupta <
>> vaibhavgupt...@gmail.com> wrote:
>> >> >
>> >> > Hello Gedare,
>> >> > as you suggested, to use the group name of patch as 'newlib'.
>> >> > I did that and then removed the line"%patch setup newlib -p1"
>> >> > It has generated ndbm.h in include directory.
>> >> >
>> >>
>> >> You are applying the patches to RSB just for testing purpose. It would
>> >> not show your contribution.
>> >> This will only help you to tests your methods what you will be going
>> >> to contribute to newlib.
>> >> So figuring out the solution of this old header replacement or
>> >> updating headers and submitting the patches to
>> >> the newlib is recommended.
>> >
>> > Sure, I will complete the testsuite as soon as possible and then push
>> the patch to newlib.
>> >>
>> First you will have to figure out the dependecies between headers,
>> only then you would be able to
>> send the right patches. Otherwise You have to make much changes in your
>> patch.
>>
>> >>
>> >> I appreciate your effort. Have you figured out how would you be going
>> >> to write the test cases for ndbm and ftw methods?
>> >
>> > I did tried to check for the ndbm using raw ndbm methods in
>> testsuites/samples/hello/init.c:
>> https://github.com/VARoDeK/rtems/blob/test_ndbm_presence/testsuites/samples/hello/init.c
>> > .
>>
>> You will have to write test cases in psxtests directory by following
>> this open group page:
>>
>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html
>>
>> > It showing the error:
>> >
>> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>> hello/hello-init.o: in function `Init':
>> >
>> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:41:
>> undefined reference to `dbm_open'
>> >
>> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:42:
>> undefined reference to `dbm_store'
>> >
>> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:45:
>> undefined reference to `dbm_fetch'
>> >
>> /home/varodek/development/rtems/5/lib/gcc/sparc-rtems5/7.4.1/../../../../sparc-rtems5/bin/ld:
>> /home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/samples/hello/init.c:49:
>> undefined reference to `dbm_close'
>> >>
>> >>
>> Can you check whether function symbol is getting generated or not?
>> Like when you compile newlib, You can see that function symbol
>> using this command:
>>
>> $sparc-rtems5-nm `find . -name lib_a-ndbm.o` This command will list
>> the function symbol.
>>
> When I made changes in Newlib-cygwin, and compiled it in
> b-sparc-rtems5-newlib.
> I checked for function symbols using commnad :
> $ cd
> /home/varodek/development/newlib/b-sparc-rtems5-newlib/sparc-rtems5/newlib/libc/posix
> $ nm -A ./*.o | grep dbm_close
> output<< ./lib_a-ndbm.o: T dbm_close
>
>>
>> >> > Vaibhav Gupta
>> >> >
>> >> > On Wed, Jun 26, 2019 at 8:41 PM Vaibhav Gupta <
>> vaibhavgupt...@gmail.com> wrote:
>> >> >>
>> >> >>
>> >> >>
>> >> >> On Wed, Jun 26, 2019 at 8:35 PM Vaibhav Gupta <
>> vaibhavgupt...@gmail.com> wrote:
>> >> >>>
>> >> >>> Hello,
>> >> >>>
>> >> >>> Newlib is compiling successfully.
>> >> >>> But when i applied patch to RSB. It is not generating ndbm.h
>>inside   rtems/5/sparc-rtem5/include this time.
>> >> >>>
>> >> >>> I am following same steps again which I followed that day when
>> ndbm.h was successfully generated.
>> >> >>> Below are the log files generated by rsb build.
>> >> >>
>> >> >> Although, before testing, I update RSB today(git pull). I
>> figured that the configuration file, used by rsb for newlib, is now changed.
>> >> >> .
>> >> >> So i updated my steps accordingly. That is, I added the patch in
>> that 

Re: GSoC Project | Basic Support for Trace Compass

2019-06-26 Thread Ravindra Kumar Meena
>
>
> > Is there a way to set the file size for which nc should output? I can
> > get around minimum 500KB of file.
> > I am following this
> > https://linux.die.net/man/1/nc
>
> You can use dd to reduce the file size, e.g.
>
> dd if=input-file of=output-file count=131072
>
Okay. It worked. I have placed it in mis/record directory.

It is a binary file. So I directly made a push to my GitHub rtems-tools
repository workplace.
https://github.com/rmeena840/rtems-tools/commit/70d527dcf8ae8a5026dd1af79e4d27c5adcbdade

Have a look.


-- 
*Ravindra Kumar Meena*,
B. Tech. Computer Science and Engineering,
Indian Institute of Technology (Indian School of Mines)
, Dhanbad
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel