Re: [PATCH 2/2] includes: Update to use the latest networking headers

2023-03-21 Thread Chris Johns
On 22/3/2023 4:20 pm, Joel Sherrill wrote:
> On Tue, Mar 21, 2023, 9:32 PM Chris Johns  > wrote:
> 
> On 22/3/2023 3:29 pm, Gedare Bloom wrote:
> > These patches look ok for rtems-net-legacy.
> 
> Yes and again sorry for the wrong subject line.
> 
> > In general, net-legacy is ok for maintenance patches. Any new features
> > will be heavily scrutinized and need additional discussions.
> 
> Agreed. These are maintenance changes only and there is a ticket. I think 
> this
> repo needs tickets for changes so these release notes contain any changes.
> 
> 
> Is this easy to enforce with git rules?
> 

I do not know and I am not a fan of git hooks on our servers for security 
reasons.

Maybe gitlab with gitlab issues can do this? :)

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


Re: [PATCH 2/2] includes: Update to use the latest networking headers

2023-03-21 Thread Joel Sherrill
On Tue, Mar 21, 2023, 9:32 PM Chris Johns  wrote:

> On 22/3/2023 3:29 pm, Gedare Bloom wrote:
> > These patches look ok for rtems-net-legacy.
>
> Yes and again sorry for the wrong subject line.
>
> > In general, net-legacy is ok for maintenance patches. Any new features
> > will be heavily scrutinized and need additional discussions.
>
> Agreed. These are maintenance changes only and there is a ticket. I think
> this
> repo needs tickets for changes so these release notes contain any changes.
>

Is this easy to enforce with git rules?

>
> > Please run the python file through yapf consistent with
> > https://docs.rtems.org/branches/master/eng/python-devel.html
> > feel free to send the format fix separately. this should help reduce
> > whitespace changes in the future patches to net-legacy.
>
> Good idea. Hmmm there is a few changes so I will add this as a separate
> patch.
>
>
> Thanks for the prompt review. A v2 coming.
>
> Chris
> ___
> 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

[RTEMS-NET-LEGACY PATCH v2 2/3] includes: Update to use the latest networking headers

2023-03-21 Thread chrisj
From: Chris Johns 

- Add support for BSP configs and options if we need them

Closes #4882
---
 netlegacy.py | 11 +++
 wscript  | 11 ++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/netlegacy.py b/netlegacy.py
index ebab745..981fd4a 100644
--- a/netlegacy.py
+++ b/netlegacy.py
@@ -46,15 +46,25 @@ for root, dirs, files in os.walk("."):
 if ext == '.h' and name not in exclude_headers:
 include_files[root[2:]].append(os.path.join(root, name))
 
+
 def find_node(bld, *paths):
 path = os.path.join(*paths)
 return os.path.relpath(str(bld.path.find_node(path)))
 
+
 def install_file_list(*paths):
 path = os.path.join(*paths)
 file_list = [os.path.join(path, f) for f in os.listdir(path)]
 return file_list
 
+def options(opt):
+pass
+
+
+def bsp_configure(conf, arch_bsp, mandatory = True):
+pass
+
+
 def build(bld):
 include_path = []
 ip = ''
@@ -107,6 +117,7 @@ def build(bld):
 bld(target='network_objects',
 features='c',
 includes=ip,
+defines=['IN_HISTORICAL_NETS=1'],
 source=source_files)
 
 bld(target='networking',
diff --git a/wscript b/wscript
index 518108b..c790707 100644
--- a/wscript
+++ b/wscript
@@ -49,10 +49,19 @@ def init(ctx):
 
 def options(opt):
 rtems.options(opt)
+netlegacy.options(opt)
+
+def bsp_configure(conf, arch_bsp):
+env = conf.env.derive()
+ab = conf.env.RTEMS_ARCH_BSP
+conf.msg('Configure variant: ', ab)
+conf.setenv(ab, env)
+netlegacy.bsp_configure(conf, arch_bsp)
+conf.setenv(ab)
 
 
 def configure(conf):
-rtems.configure(conf)
+rtems.configure(conf, bsp_configure)
 
 
 def recurse(ctx):
-- 
2.37.1

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


[RTEMS-NET-LEGACY PATCH v2 1/3] score: Update to the latest score interface

2023-03-21 Thread chrisj
From: Chris Johns 

Updates #4882
---
 libtest/testbusy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libtest/testbusy.c b/libtest/testbusy.c
index c1d4427..51c6a71 100644
--- a/libtest/testbusy.c
+++ b/libtest/testbusy.c
@@ -28,10 +28,10 @@ void rtems_test_busy_cpu_usage( time_t seconds, long 
nanoseconds )
   Timestamp_Control  now;
 
   executing = _Thread_Get_executing();
-  _Thread_Get_CPU_time_used( executing,  );
+  start = _Thread_Get_CPU_time_used( executing );
   _Timestamp_Set( , seconds, nanoseconds );
 
   do {
-_Thread_Get_CPU_time_used( executing,  );
+now = _Thread_Get_CPU_time_used( executing );
   } while ( now - start < busy );
 }
-- 
2.37.1

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


[RTEMS-NET-LEGACY PATCH v2 3/3] waf: Reformat to the PEP 8 coding style

2023-03-21 Thread chrisj
From: Chris Johns 

---
 netlegacy.py | 54 
 wscript  |  1 +
 2 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/netlegacy.py b/netlegacy.py
index 981fd4a..b08ccad 100644
--- a/netlegacy.py
+++ b/netlegacy.py
@@ -32,7 +32,10 @@ import os
 
 source_files = []
 include_files = {}
-exclude_dirs = ['pppd', 'nfsclient', 'testsuites', os.path.join('librpc', 
'include'), 'bsps']
+exclude_dirs = [
+'pppd', 'nfsclient', 'testsuites',
+os.path.join('librpc', 'include'), 'bsps'
+]
 exclude_headers = ['rtems-bsd-user-space.h', 'rtems-bsd-kernel-space.h']
 
 for root, dirs, files in os.walk("."):
@@ -57,11 +60,12 @@ def install_file_list(*paths):
 file_list = [os.path.join(path, f) for f in os.listdir(path)]
 return file_list
 
+
 def options(opt):
 pass
 
 
-def bsp_configure(conf, arch_bsp, mandatory = True):
+def bsp_configure(conf, arch_bsp, mandatory=True):
 pass
 
 
@@ -69,9 +73,10 @@ def build(bld):
 include_path = []
 ip = ''
 bsp = bld.env.RTEMS_ARCH_BSP.split('-')[-1]
-pppd_source = [os.path.join('pppd', s)
-   for s in os.listdir('pppd')
-   if os.path.splitext(s)[1] == '.c']
+pppd_source = [
+os.path.join('pppd', s) for s in os.listdir('pppd')
+if os.path.splitext(s)[1] == '.c'
+]
 nfs_source = []
 for root, dirs, files in os.walk('nfsclient'):
 for name in files:
@@ -82,21 +87,21 @@ def build(bld):
 
 bsp_dirs, bsp_sources = bsp_drivers.bsp_files(bld)
 
-include_path.extend(['.',
- 'include',
- os.path.relpath(bld.env.PREFIX),
- os.path.join('testsuites', 'include'),
- os.path.relpath(os.path.join(bld.env.PREFIX,
-  'include')),
- os.path.join('bsps', 'include')])
+include_path.extend([
+'.', 'include',
+os.path.relpath(bld.env.PREFIX),
+os.path.join('testsuites', 'include'),
+os.path.relpath(os.path.join(bld.env.PREFIX, 'include')),
+os.path.join('bsps', 'include')
+])
 arch_lib_path = rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION,
 bld.env.RTEMS_ARCH_BSP)
 lib_path = os.path.join(bld.env.PREFIX, arch_lib_path)
-include_path.append(os.path.relpath(os.path.join(bld.env.PREFIX,
- arch_lib_path)))
-include_path.append(os.path.relpath(os.path.join(bld.env.PREFIX,
- arch_lib_path,
- 'include')))
+include_path.append(
+os.path.relpath(os.path.join(bld.env.PREFIX, arch_lib_path)))
+include_path.append(
+os.path.relpath(os.path.join(bld.env.PREFIX, arch_lib_path,
+ 'include')))
 include_path.append(find_node(bld, 'bsps', 'include', 'libchip'))
 
 bld.read_stlib('rtemsbsp', paths=[lib_path])
@@ -138,15 +143,14 @@ def build(bld):
 
 bld.install_files(os.path.join(bld.env.PREFIX, arch_lib_path),
   ["libnetworking.a", 'libpppd.a', 'libnfs.a'])
-bld.install_files(os.path.join(bld.env.PREFIX, arch_lib_path,
-   'include', 'libchip'),
-  install_file_list('bsps', 'include', 'libchip'))
+bld.install_files(
+os.path.join(bld.env.PREFIX, arch_lib_path, 'include', 'libchip'),
+install_file_list('bsps', 'include', 'libchip'))
 for i in include_files:
 if 'include' in os.path.split(i):
-bld.install_files(os.path.join(bld.env.PREFIX,
-   arch_lib_path, i),
+bld.install_files(os.path.join(bld.env.PREFIX, arch_lib_path, i),
   include_files[i])
 else:
-bld.install_files(os.path.join(bld.env.PREFIX,
-   arch_lib_path, 'include', i),
-  include_files[i])
+bld.install_files(
+os.path.join(bld.env.PREFIX, arch_lib_path, 'include', i),
+include_files[i])
diff --git a/wscript b/wscript
index c790707..5492b51 100644
--- a/wscript
+++ b/wscript
@@ -51,6 +51,7 @@ def options(opt):
 rtems.options(opt)
 netlegacy.options(opt)
 
+
 def bsp_configure(conf, arch_bsp):
 env = conf.env.derive()
 ab = conf.env.RTEMS_ARCH_BSP
-- 
2.37.1

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


Re: [PATCH 2/2] includes: Update to use the latest networking headers

2023-03-21 Thread Chris Johns
On 22/3/2023 3:29 pm, Gedare Bloom wrote:
> These patches look ok for rtems-net-legacy.

Yes and again sorry for the wrong subject line.

> In general, net-legacy is ok for maintenance patches. Any new features
> will be heavily scrutinized and need additional discussions.

Agreed. These are maintenance changes only and there is a ticket. I think this
repo needs tickets for changes so these release notes contain any changes.

> Please run the python file through yapf consistent with
> https://docs.rtems.org/branches/master/eng/python-devel.html
> feel free to send the format fix separately. this should help reduce
> whitespace changes in the future patches to net-legacy.

Good idea. Hmmm there is a few changes so I will add this as a separate patch.


Thanks for the prompt review. A v2 coming.

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


Re: [PATCH 2/2] includes: Update to use the latest networking headers

2023-03-21 Thread Gedare Bloom
These patches look ok for rtems-net-legacy.

In general, net-legacy is ok for maintenance patches. Any new features
will be heavily scrutinized and need additional discussions.

Please run the python file through yapf consistent with
https://docs.rtems.org/branches/master/eng/python-devel.html
feel free to send the format fix separately. this should help reduce
whitespace changes in the future patches to net-legacy.

Thanks!

On Tue, Mar 21, 2023 at 6:36 PM  wrote:
>
> From: Chris Johns 
>
> - Add support for BSP configs and options if we need them
>
> Closes #4882
> ---
>  netlegacy.py | 11 +++
>  wscript  | 11 ++-
>  2 files changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/netlegacy.py b/netlegacy.py
> index ebab745..981fd4a 100644
> --- a/netlegacy.py
> +++ b/netlegacy.py
> @@ -46,15 +46,25 @@ for root, dirs, files in os.walk("."):
>  if ext == '.h' and name not in exclude_headers:
>  include_files[root[2:]].append(os.path.join(root, name))
>
> +
>  def find_node(bld, *paths):
>  path = os.path.join(*paths)
>  return os.path.relpath(str(bld.path.find_node(path)))
>
> +
>  def install_file_list(*paths):
>  path = os.path.join(*paths)
>  file_list = [os.path.join(path, f) for f in os.listdir(path)]
>  return file_list
>
> +def options(opt):
> +pass
> +
> +
> +def bsp_configure(conf, arch_bsp, mandatory = True):
> +pass
> +
> +
>  def build(bld):
>  include_path = []
>  ip = ''
> @@ -107,6 +117,7 @@ def build(bld):
>  bld(target='network_objects',
>  features='c',
>  includes=ip,
> +defines=['IN_HISTORICAL_NETS=1'],
>  source=source_files)
>
>  bld(target='networking',
> diff --git a/wscript b/wscript
> index 518108b..c790707 100644
> --- a/wscript
> +++ b/wscript
> @@ -49,10 +49,19 @@ def init(ctx):
>
>  def options(opt):
>  rtems.options(opt)
> +netlegacy.options(opt)
> +
> +def bsp_configure(conf, arch_bsp):
> +env = conf.env.derive()
> +ab = conf.env.RTEMS_ARCH_BSP
> +conf.msg('Configure variant: ', ab)
> +conf.setenv(ab, env)
> +netlegacy.bsp_configure(conf, arch_bsp)
> +conf.setenv(ab)
>
>
>  def configure(conf):
> -rtems.configure(conf)
> +rtems.configure(conf, bsp_configure)
>
>
>  def recurse(ctx):
> --
> 2.37.1
>
> ___
> 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: [PATCH rtems-docs 2/2] user/zynqmp: Add NAND driver information

2023-03-21 Thread Chris Johns
On 22/3/2023 1:32 pm, Kinsey Moore wrote:
> On Tue, Mar 21, 2023 at 9:20 PM Chris Johns  > wrote:
> 
> On 22/3/2023 1:18 pm, Kinsey Moore wrote:
> > On Tue, Mar 21, 2023 at 7:39 PM Chris Johns  
> > >> wrote:
> >
> >     On 22/3/2023 7:00 am, Kinsey Moore wrote:
> >     > ---
> >     >  user/bsps/aarch64/xilinx-zynqmp.rst | 9 +
> >     >  1 file changed, 9 insertions(+)
> >     >
> >     > diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst
> >     b/user/bsps/aarch64/xilinx-zynqmp.rst
> >     > index 4de0115..e30c3f6 100644
> >     > --- a/user/bsps/aarch64/xilinx-zynqmp.rst
> >     > +++ b/user/bsps/aarch64/xilinx-zynqmp.rst
> >     > @@ -250,6 +250,15 @@ Console Driver
> >     >  The console driver supports the default Qemu emulated ARM PL011
> PrimeCell
> >     UART
> >     >  as well as the physical ARM PL011 PrimeCell UART in the ZynqMP
> hardware.
> >     > 
> >     > +NAND Controller Driver
> >     > +--
> >     > +
> >     > +The ZynqMP BSP has a NAND controller driver which allows writing 
> to and
> >     reading
> >     > +from one or more attached NAND chips. This driver was imported 
> from the
> >     Xilinx
> >     > +embeddedsw repository and requires the clock to be configured 
> since
> it is a
> >     > +polling driver and not interrupt-driven. This driver is only
> available for
> >     > +hardware BSPs since QEMU does not emulate the NAND controller.
> >
> >     Is the JFFS support that uses this driver for production or just an
> example?
> >
> >     I ask because the QSPI driver takes control of the whole flash and 
> that is
> >     confusing if you run an app that has a boot image in the same device
> because the
> >     JFFS erases it.
> >
> >
> > The JFFS2 glue in the ZynqMP BSP (both NAND and NOR) is perfectly 
> usable in
> > production, but it does not encompass every use case that may exist 
> which
> is why
> > it is not run by default. The user would need to customize their own
> version of
> > the glue code if they have requirements beyond "use the whole device".
> 
> Is this worth explaining? It confused us when we played with the code.
> 
> 
> The NAND glue code makes it pretty clear if you read the blurb at the top of 
> the
> implementation file. It appears that the NOR glue code does not have a similar
> blurb, but clearly it should.

Ah that would help.

> Maybe the explanation should be in the header with the function definition, 
> instead?

Aaron is working on an API for flash so maybe we wait and once done moving to
that would make it since.

> What was the expectation of functionality when you provided the device control
> struct instance to the JFFS2 init function with no additional parameters?

I am not sure. I have not look into the detail for a number of years now.

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

Re: [PATCH rtems-docs 2/2] user/zynqmp: Add NAND driver information

2023-03-21 Thread Kinsey Moore
On Tue, Mar 21, 2023 at 9:20 PM Chris Johns  wrote:

> On 22/3/2023 1:18 pm, Kinsey Moore wrote:
> > On Tue, Mar 21, 2023 at 7:39 PM Chris Johns  > > wrote:
> >
> > On 22/3/2023 7:00 am, Kinsey Moore wrote:
> > > ---
> > >  user/bsps/aarch64/xilinx-zynqmp.rst | 9 +
> > >  1 file changed, 9 insertions(+)
> > >
> > > diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst
> > b/user/bsps/aarch64/xilinx-zynqmp.rst
> > > index 4de0115..e30c3f6 100644
> > > --- a/user/bsps/aarch64/xilinx-zynqmp.rst
> > > +++ b/user/bsps/aarch64/xilinx-zynqmp.rst
> > > @@ -250,6 +250,15 @@ Console Driver
> > >  The console driver supports the default Qemu emulated ARM PL011
> PrimeCell
> > UART
> > >  as well as the physical ARM PL011 PrimeCell UART in the ZynqMP
> hardware.
> > >
> > > +NAND Controller Driver
> > > +--
> > > +
> > > +The ZynqMP BSP has a NAND controller driver which allows writing
> to and
> > reading
> > > +from one or more attached NAND chips. This driver was imported
> from the
> > Xilinx
> > > +embeddedsw repository and requires the clock to be configured
> since it is a
> > > +polling driver and not interrupt-driven. This driver is only
> available for
> > > +hardware BSPs since QEMU does not emulate the NAND controller.
> >
> > Is the JFFS support that uses this driver for production or just an
> example?
> >
> > I ask because the QSPI driver takes control of the whole flash and
> that is
> > confusing if you run an app that has a boot image in the same device
> because the
> > JFFS erases it.
> >
> >
> > The JFFS2 glue in the ZynqMP BSP (both NAND and NOR) is perfectly usable
> in
> > production, but it does not encompass every use case that may exist
> which is why
> > it is not run by default. The user would need to customize their own
> version of
> > the glue code if they have requirements beyond "use the whole device".
>
> Is this worth explaining? It confused us when we played with the code.
>

The NAND glue code makes it pretty clear if you read the blurb at the top
of the implementation file. It appears that the NOR glue code does not have
a similar blurb, but clearly it should.

Maybe the explanation should be in the header with the function definition,
instead?

What was the expectation of functionality when you provided the device
control struct instance to the JFFS2 init function with no additional
parameters?

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

Re: [PATCH rtems-docs 2/2] user/zynqmp: Add NAND driver information

2023-03-21 Thread Chris Johns
On 22/3/2023 1:18 pm, Kinsey Moore wrote:
> On Tue, Mar 21, 2023 at 7:39 PM Chris Johns  > wrote:
> 
> On 22/3/2023 7:00 am, Kinsey Moore wrote:
> > ---
> >  user/bsps/aarch64/xilinx-zynqmp.rst | 9 +
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst
> b/user/bsps/aarch64/xilinx-zynqmp.rst
> > index 4de0115..e30c3f6 100644
> > --- a/user/bsps/aarch64/xilinx-zynqmp.rst
> > +++ b/user/bsps/aarch64/xilinx-zynqmp.rst
> > @@ -250,6 +250,15 @@ Console Driver
> >  The console driver supports the default Qemu emulated ARM PL011 
> PrimeCell
> UART
> >  as well as the physical ARM PL011 PrimeCell UART in the ZynqMP 
> hardware.
> > 
> > +NAND Controller Driver
> > +--
> > +
> > +The ZynqMP BSP has a NAND controller driver which allows writing to and
> reading
> > +from one or more attached NAND chips. This driver was imported from the
> Xilinx
> > +embeddedsw repository and requires the clock to be configured since it 
> is a
> > +polling driver and not interrupt-driven. This driver is only available 
> for
> > +hardware BSPs since QEMU does not emulate the NAND controller.
> 
> Is the JFFS support that uses this driver for production or just an 
> example?
> 
> I ask because the QSPI driver takes control of the whole flash and that is
> confusing if you run an app that has a boot image in the same device 
> because the
> JFFS erases it.
> 
> 
> The JFFS2 glue in the ZynqMP BSP (both NAND and NOR) is perfectly usable in
> production, but it does not encompass every use case that may exist which is 
> why
> it is not run by default. The user would need to customize their own version 
> of
> the glue code if they have requirements beyond "use the whole device".

Is this worth explaining? It confused us when we played with the code.

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

Re: [PATCH rtems-docs 2/2] user/zynqmp: Add NAND driver information

2023-03-21 Thread Kinsey Moore
On Tue, Mar 21, 2023 at 7:39 PM Chris Johns  wrote:

> On 22/3/2023 7:00 am, Kinsey Moore wrote:
> > ---
> >  user/bsps/aarch64/xilinx-zynqmp.rst | 9 +
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst
> b/user/bsps/aarch64/xilinx-zynqmp.rst
> > index 4de0115..e30c3f6 100644
> > --- a/user/bsps/aarch64/xilinx-zynqmp.rst
> > +++ b/user/bsps/aarch64/xilinx-zynqmp.rst
> > @@ -250,6 +250,15 @@ Console Driver
> >  The console driver supports the default Qemu emulated ARM PL011
> PrimeCell UART
> >  as well as the physical ARM PL011 PrimeCell UART in the ZynqMP hardware.
> >
> > +NAND Controller Driver
> > +--
> > +
> > +The ZynqMP BSP has a NAND controller driver which allows writing to and
> reading
> > +from one or more attached NAND chips. This driver was imported from the
> Xilinx
> > +embeddedsw repository and requires the clock to be configured since it
> is a
> > +polling driver and not interrupt-driven. This driver is only available
> for
> > +hardware BSPs since QEMU does not emulate the NAND controller.
>
> Is the JFFS support that uses this driver for production or just an
> example?
>
> I ask because the QSPI driver takes control of the whole flash and that is
> confusing if you run an app that has a boot image in the same device
> because the
> JFFS erases it.
>

The JFFS2 glue in the ZynqMP BSP (both NAND and NOR) is perfectly usable in
production, but it does not encompass every use case that may exist which
is why it is not run by default. The user would need to customize their own
version of the glue code if they have requirements beyond "use the whole
device".

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

Re: [PATCH 1/2] score: Update to the latest score interface

2023-03-21 Thread Chris Johns
These are for the net-legacy repo. I seem to have lost my subject say this while
getting them posted to the list.

Bring on a merge request tool to avoid all this mess .

Chris

On 22/3/2023 11:36 am, chr...@rtems.org wrote:
> From: Chris Johns 
> 
> Updates #4882
> ---
>  libtest/testbusy.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libtest/testbusy.c b/libtest/testbusy.c
> index c1d4427..51c6a71 100644
> --- a/libtest/testbusy.c
> +++ b/libtest/testbusy.c
> @@ -28,10 +28,10 @@ void rtems_test_busy_cpu_usage( time_t seconds, long 
> nanoseconds )
>Timestamp_Control  now;
>  
>executing = _Thread_Get_executing();
> -  _Thread_Get_CPU_time_used( executing,  );
> +  start = _Thread_Get_CPU_time_used( executing );
>_Timestamp_Set( , seconds, nanoseconds );
>  
>do {
> -_Thread_Get_CPU_time_used( executing,  );
> +now = _Thread_Get_CPU_time_used( executing );
>} while ( now - start < busy );
>  }
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH rtems-docs 2/2] user/zynqmp: Add NAND driver information

2023-03-21 Thread Chris Johns
On 22/3/2023 7:00 am, Kinsey Moore wrote:
> ---
>  user/bsps/aarch64/xilinx-zynqmp.rst | 9 +
>  1 file changed, 9 insertions(+)
> 
> diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst 
> b/user/bsps/aarch64/xilinx-zynqmp.rst
> index 4de0115..e30c3f6 100644
> --- a/user/bsps/aarch64/xilinx-zynqmp.rst
> +++ b/user/bsps/aarch64/xilinx-zynqmp.rst
> @@ -250,6 +250,15 @@ Console Driver
>  The console driver supports the default Qemu emulated ARM PL011 PrimeCell 
> UART
>  as well as the physical ARM PL011 PrimeCell UART in the ZynqMP hardware.
>  
> +NAND Controller Driver
> +--
> +
> +The ZynqMP BSP has a NAND controller driver which allows writing to and 
> reading
> +from one or more attached NAND chips. This driver was imported from the 
> Xilinx
> +embeddedsw repository and requires the clock to be configured since it is a
> +polling driver and not interrupt-driven. This driver is only available for
> +hardware BSPs since QEMU does not emulate the NAND controller.

Is the JFFS support that uses this driver for production or just an example?

I ask because the QSPI driver takes control of the whole flash and that is
confusing if you run an app that has a boot image in the same device because the
JFFS erases it.

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


[PATCH 2/2] includes: Update to use the latest networking headers

2023-03-21 Thread chrisj
From: Chris Johns 

- Add support for BSP configs and options if we need them

Closes #4882
---
 netlegacy.py | 11 +++
 wscript  | 11 ++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/netlegacy.py b/netlegacy.py
index ebab745..981fd4a 100644
--- a/netlegacy.py
+++ b/netlegacy.py
@@ -46,15 +46,25 @@ for root, dirs, files in os.walk("."):
 if ext == '.h' and name not in exclude_headers:
 include_files[root[2:]].append(os.path.join(root, name))
 
+
 def find_node(bld, *paths):
 path = os.path.join(*paths)
 return os.path.relpath(str(bld.path.find_node(path)))
 
+
 def install_file_list(*paths):
 path = os.path.join(*paths)
 file_list = [os.path.join(path, f) for f in os.listdir(path)]
 return file_list
 
+def options(opt):
+pass
+
+
+def bsp_configure(conf, arch_bsp, mandatory = True):
+pass
+
+
 def build(bld):
 include_path = []
 ip = ''
@@ -107,6 +117,7 @@ def build(bld):
 bld(target='network_objects',
 features='c',
 includes=ip,
+defines=['IN_HISTORICAL_NETS=1'],
 source=source_files)
 
 bld(target='networking',
diff --git a/wscript b/wscript
index 518108b..c790707 100644
--- a/wscript
+++ b/wscript
@@ -49,10 +49,19 @@ def init(ctx):
 
 def options(opt):
 rtems.options(opt)
+netlegacy.options(opt)
+
+def bsp_configure(conf, arch_bsp):
+env = conf.env.derive()
+ab = conf.env.RTEMS_ARCH_BSP
+conf.msg('Configure variant: ', ab)
+conf.setenv(ab, env)
+netlegacy.bsp_configure(conf, arch_bsp)
+conf.setenv(ab)
 
 
 def configure(conf):
-rtems.configure(conf)
+rtems.configure(conf, bsp_configure)
 
 
 def recurse(ctx):
-- 
2.37.1

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


[PATCH 1/2] score: Update to the latest score interface

2023-03-21 Thread chrisj
From: Chris Johns 

Updates #4882
---
 libtest/testbusy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libtest/testbusy.c b/libtest/testbusy.c
index c1d4427..51c6a71 100644
--- a/libtest/testbusy.c
+++ b/libtest/testbusy.c
@@ -28,10 +28,10 @@ void rtems_test_busy_cpu_usage( time_t seconds, long 
nanoseconds )
   Timestamp_Control  now;
 
   executing = _Thread_Get_executing();
-  _Thread_Get_CPU_time_used( executing,  );
+  start = _Thread_Get_CPU_time_used( executing );
   _Timestamp_Set( , seconds, nanoseconds );
 
   do {
-_Thread_Get_CPU_time_used( executing,  );
+now = _Thread_Get_CPU_time_used( executing );
   } while ( now - start < busy );
 }
-- 
2.37.1

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


Re: [PATCH] binutils: Disable stack exec and RWX section warnings

2023-03-21 Thread Chris Johns
On 22/3/2023 2:25 am, Sebastian Huber wrote:
> On 21.03.23 12:11, chr...@rtems.org wrote:
>> From: Chris Johns
>>
>> Binutils 2.39 and later enable by default warnings for executables
>> with executable stack and RWX sections. Disable them.
>>
>> Closes #4881
> 
> Thanks for silencing the warnings, these warnings plagued us for some time.
> 

Pleasure.

When playing I attempted a change to the rtems.git LINKFLAGS in
spec/build/bsps/linkcmd.yml and nothing happened. I do not understand that file
and if it is used?

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


Re: [PATCH v2 0/3] bsps/riscv: Add kendrytek210 riscv BSP variant

2023-03-21 Thread Alan Cudmore
Thanks for the test! I'm working on setting up the Polarfire HSS software
so I can try running on the icicle kit emulation on renode.io.

FYI: If anyone is interested in a very inexpensive RISC-V board, the
Pine64.org Ox64 boards are back in stock:
https://pine64.com/product-category/ox64/
These might make an interesting RTEMS target, since the SoC has 64Mbytes of
PSRAM and can run Linux.

Alan


On Fri, Mar 17, 2023 at 7:41 AM  wrote:

>
> I have tested it on the renode.io simulator and working fine.
>
> Regards
> Padmarao
> > On Wed, 2023-03-15 at 22:04 -0400, Alan Cudmore wrote:
> >
> > Version 2 patch updates: Separated the device tree source and encoded
> > device tree blob into a separate patch, added the license text to
> > k210.h, eliminated whitespace warnings, and eliminated dead code in
> > the conditional compilation structure for the core_get_frequency
> > function in start/bspstart.c.
> >
> > This patch set adds the riscv/kendrytek210 BSP variant to support the
> > Kendryte K210 Dual Core RISC-V SoC. The BSP runs on the renode.io
> > simulator, the Sipeed MAiX BiT and MAiXDuino boards, and would likely
> > run on other boards. RTEMS binaries can be flashed to the boards
> > using
> > the kflash python utility available through the pip command.
> > Currently
> > the BSP supports the console UART which is shared with the
> > frdme310arty,
> > an interrupt controller, and timer. The included device tree source
> > just covers a minimal set of peripherals. The device tree can be
> > expanded as additional device support is addded.
> > Manufacturer, board links, and other information can be found in
> > ticket #4876.
> >
> > Documentation that describes how to build and run the BSP on the
> > boards and simulator has been prepared and will be submitted after
> > the bsp
> > is merged.
> >
> > The full testsuite has not been run on this BSP, but I run a
> > subset of the of testsuite on the renode.io robot test framework.
> >
> > Alan Cudmore (3):
> >   bsps/riscv: add device tree source and device tree blob header for
> > k210 bsp variant
> >   bsps/riscv: add riscv/kendrytek210 BSP variant source changes
> >   spec: add riscv kendrytek210 variant build options
> >
> >  bsps/riscv/riscv/config/kendrytek210.cfg  |   9 +
> >  bsps/riscv/riscv/console/console-config.c |  10 +-
> >  bsps/riscv/riscv/console/fe310-uart.c |   2 +-
> >  bsps/riscv/riscv/dts/kendryte-k210.dts| 216 
> >  bsps/riscv/riscv/include/bsp.h|   4 +
> >  bsps/riscv/riscv/include/bsp/k210.h   | 105 ++
> >  .../riscv/include/bsp/kendryte-k210-dtb.h | 315
> > ++
> >  bsps/riscv/riscv/include/bsp/riscv.h  |   4 +
> >  bsps/riscv/riscv/start/bspstart.c |  43 +++
> >  spec/build/bsps/optdtb.yml|   4 +-
> >  spec/build/bsps/optdtbheaderpath.yml  |   2 +
> >  spec/build/bsps/optfdtuboot.yml   |   3 +
> >  spec/build/bsps/riscv/optramsize.yml  |   2 +
> >  spec/build/bsps/riscv/riscv/abi.yml   |   1 +
> >  .../bsps/riscv/riscv/bspkendrtyek210.yml  |  19 ++
> >  spec/build/bsps/riscv/riscv/grp.yml   |   4 +
> >  spec/build/bsps/riscv/riscv/obj.yml   |   1 +
> >  .../bsps/riscv/riscv/optkendrytek210.yml  |  18 +
> >  spec/build/bsps/riscv/riscv/optns16550max.yml |   4 +-
> >  spec/build/bsps/riscv/riscv/optsifiveuart.yml |  20 ++
> >  spec/build/cpukit/optsmp.yml  |   1 +
> >  21 files changed, 779 insertions(+), 8 deletions(-)
> >  create mode 100644 bsps/riscv/riscv/config/kendrytek210.cfg
> >  create mode 100644 bsps/riscv/riscv/dts/kendryte-k210.dts
> >  create mode 100644 bsps/riscv/riscv/include/bsp/k210.h
> >  create mode 100644 bsps/riscv/riscv/include/bsp/kendryte-k210-dtb.h
> >  create mode 100644 spec/build/bsps/riscv/riscv/bspkendrtyek210.yml
> >  create mode 100644 spec/build/bsps/riscv/riscv/optkendrytek210.yml
> >  create mode 100644 spec/build/bsps/riscv/riscv/optsifiveuart.yml
> >
> > --
> > 2.25.1
> >
> > ___
> > 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

[PATCH rtems-docs 1/2] user/zynqmp: Fix SDHCI wording

2023-03-21 Thread Kinsey Moore
---
 user/bsps/aarch64/xilinx-zynqmp.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst 
b/user/bsps/aarch64/xilinx-zynqmp.rst
index 1fef7a4..4de0115 100644
--- a/user/bsps/aarch64/xilinx-zynqmp.rst
+++ b/user/bsps/aarch64/xilinx-zynqmp.rst
@@ -253,7 +253,7 @@ as well as the physical ARM PL011 PrimeCell UART in the 
ZynqMP hardware.
 SDHCI Driver
 
 
-The ZynqMP bsp has an SDHCI driver which allows reading to and writing from SD
+The ZynqMP bsp has an SDHCI driver which allows writing to and reading from SD
 cards. These can be tested in qemu using the "-sd" option. For example:
 
 .. code-block:: shell
-- 
2.30.2

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


[PATCH rtems-docs 2/2] user/zynqmp: Add NAND driver information

2023-03-21 Thread Kinsey Moore
---
 user/bsps/aarch64/xilinx-zynqmp.rst | 9 +
 1 file changed, 9 insertions(+)

diff --git a/user/bsps/aarch64/xilinx-zynqmp.rst 
b/user/bsps/aarch64/xilinx-zynqmp.rst
index 4de0115..e30c3f6 100644
--- a/user/bsps/aarch64/xilinx-zynqmp.rst
+++ b/user/bsps/aarch64/xilinx-zynqmp.rst
@@ -250,6 +250,15 @@ Console Driver
 The console driver supports the default Qemu emulated ARM PL011 PrimeCell UART
 as well as the physical ARM PL011 PrimeCell UART in the ZynqMP hardware.
 
+NAND Controller Driver
+--
+
+The ZynqMP BSP has a NAND controller driver which allows writing to and reading
+from one or more attached NAND chips. This driver was imported from the Xilinx
+embeddedsw repository and requires the clock to be configured since it is a
+polling driver and not interrupt-driven. This driver is only available for
+hardware BSPs since QEMU does not emulate the NAND controller.
+
 SDHCI Driver
 
 
-- 
2.30.2

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


Re: [PATCH] binutils: Disable stack exec and RWX section warnings

2023-03-21 Thread Sebastian Huber

On 21.03.23 12:11, chr...@rtems.org wrote:

From: Chris Johns

Binutils 2.39 and later enable by default warnings for executables
with executable stack and RWX sections. Disable them.

Closes #4881


Thanks for silencing the warnings, these warnings plagued us for some time.

--
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

Re: [PATCH] binutils: Disable stack exec and RWX section warnings

2023-03-21 Thread Kinsey Moore
Joel,
This is fine for fixing the warnings for the time being. We still need to
address the AArch64 break due to binutils >= 2.40 (2.39 does not have the
bad patch).

Kinsey

On Tue, Mar 21, 2023 at 10:17 AM Joel Sherrill  wrote:

> I'm ok with this if Kinsey confirms it
>
> On Tue, Mar 21, 2023, 4:11 AM  wrote:
>
>> From: Chris Johns 
>>
>> Binutils 2.39 and later enable by default warnings for executables
>> with executable stack and RWX sections. Disable them.
>>
>> Closes #4881
>> ---
>>  source-builder/config/binutils-2-1.cfg | 15 ++-
>>  1 file changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/source-builder/config/binutils-2-1.cfg
>> b/source-builder/config/binutils-2-1.cfg
>> index 6de33ae..df121af 100644
>> --- a/source-builder/config/binutils-2-1.cfg
>> +++ b/source-builder/config/binutils-2-1.cfg
>> @@ -32,6 +32,18 @@ URL:http://sources.redhat.com/binutils
>>   %define with_gold 0
>>  %endif
>>
>> +#
>> +# Disable the new default options to check for stack exec and RWX
>> sections
>> +# instroduced in 2.39.
>> +#
>> +%define binutils_extra_config %nil
>> +%ifn %{defined without_stackexec}
>> + %define binutils_extra_config %{binutils_extra_config}
>> --disable-warn-execstack
>> +%endif
>> +%ifn %{defined without_rwx_sections}
>> + %define binutils_extra_config %{binutils_extra_config}
>> --disable-warn-rwx-segments
>> +%endif
>> +
>>  #
>>  # Source
>>  #
>> @@ -75,7 +87,8 @@ URL: http://sources.redhat.com/binutils
>>  --prefix=%{_prefix} --bindir=%{_bindir} \
>>  --exec-prefix=%{_exec_prefix} \
>>  --includedir=%{_includedir} --libdir=%{_libdir} \
>> ---mandir=%{_mandir} --infodir=%{_infodir}
>> +--mandir=%{_mandir} --infodir=%{_infodir} \
>> +%{binutils_extra_config}
>>
>>%{__make} %{?_smp_mflags} all
>>
>> --
>> 2.37.1
>>
>> ___
>> 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: [PATCH] binutils: Disable stack exec and RWX section warnings

2023-03-21 Thread Joel Sherrill
I'm ok with this if Kinsey confirms it

On Tue, Mar 21, 2023, 4:11 AM  wrote:

> From: Chris Johns 
>
> Binutils 2.39 and later enable by default warnings for executables
> with executable stack and RWX sections. Disable them.
>
> Closes #4881
> ---
>  source-builder/config/binutils-2-1.cfg | 15 ++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/source-builder/config/binutils-2-1.cfg
> b/source-builder/config/binutils-2-1.cfg
> index 6de33ae..df121af 100644
> --- a/source-builder/config/binutils-2-1.cfg
> +++ b/source-builder/config/binutils-2-1.cfg
> @@ -32,6 +32,18 @@ URL:http://sources.redhat.com/binutils
>   %define with_gold 0
>  %endif
>
> +#
> +# Disable the new default options to check for stack exec and RWX sections
> +# instroduced in 2.39.
> +#
> +%define binutils_extra_config %nil
> +%ifn %{defined without_stackexec}
> + %define binutils_extra_config %{binutils_extra_config}
> --disable-warn-execstack
> +%endif
> +%ifn %{defined without_rwx_sections}
> + %define binutils_extra_config %{binutils_extra_config}
> --disable-warn-rwx-segments
> +%endif
> +
>  #
>  # Source
>  #
> @@ -75,7 +87,8 @@ URL: http://sources.redhat.com/binutils
>  --prefix=%{_prefix} --bindir=%{_bindir} \
>  --exec-prefix=%{_exec_prefix} \
>  --includedir=%{_includedir} --libdir=%{_libdir} \
> ---mandir=%{_mandir} --infodir=%{_infodir}
> +--mandir=%{_mandir} --infodir=%{_infodir} \
> +%{binutils_extra_config}
>
>%{__make} %{?_smp_mflags} all
>
> --
> 2.37.1
>
> ___
> 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

[PATCH] binutils: Disable stack exec and RWX section warnings

2023-03-21 Thread chrisj
From: Chris Johns 

Binutils 2.39 and later enable by default warnings for executables
with executable stack and RWX sections. Disable them.

Closes #4881
---
 source-builder/config/binutils-2-1.cfg | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/source-builder/config/binutils-2-1.cfg 
b/source-builder/config/binutils-2-1.cfg
index 6de33ae..df121af 100644
--- a/source-builder/config/binutils-2-1.cfg
+++ b/source-builder/config/binutils-2-1.cfg
@@ -32,6 +32,18 @@ URL:http://sources.redhat.com/binutils
  %define with_gold 0
 %endif
 
+#
+# Disable the new default options to check for stack exec and RWX sections
+# instroduced in 2.39.
+#
+%define binutils_extra_config %nil
+%ifn %{defined without_stackexec}
+ %define binutils_extra_config %{binutils_extra_config} 
--disable-warn-execstack
+%endif
+%ifn %{defined without_rwx_sections}
+ %define binutils_extra_config %{binutils_extra_config} 
--disable-warn-rwx-segments
+%endif
+
 #
 # Source
 #
@@ -75,7 +87,8 @@ URL: http://sources.redhat.com/binutils
 --prefix=%{_prefix} --bindir=%{_bindir} \
 --exec-prefix=%{_exec_prefix} \
 --includedir=%{_includedir} --libdir=%{_libdir} \
---mandir=%{_mandir} --infodir=%{_infodir}
+--mandir=%{_mandir} --infodir=%{_infodir} \
+%{binutils_extra_config}
 
   %{__make} %{?_smp_mflags} all
 
-- 
2.37.1

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