[PATCH] build: Add PROGRAM_PREFIX option

2023-08-01 Thread Sebastian Huber
Replace --rtems-version with a PROGRAM_PREFIX option.  This allows also
the use of vendor tools.
---
 spec/build/bsps/makeinc.yml| 16 
 spec/build/bsps/maketarget.yml | 22 +++---
 spec/build/bsps/optobjcopy.yml |  2 +-
 spec/build/cpukit/cpuopts.yml  |  2 ++
 spec/build/cpukit/optgcc.yml   |  8 
 spec/build/cpukit/optprogramprefix.yml | 18 ++
 spec/build/testsuites/ada/optgnat.yml  |  2 +-
 wscript| 24 ++--
 8 files changed, 47 insertions(+), 47 deletions(-)
 create mode 100644 spec/build/cpukit/optprogramprefix.yml

diff --git a/spec/build/bsps/makeinc.yml b/spec/build/bsps/makeinc.yml
index ac395f2f02..08fc75a8b9 100644
--- a/spec/build/bsps/makeinc.yml
+++ b/spec/build/bsps/makeinc.yml
@@ -16,14 +16,14 @@ content: |
   prefix = ${PREFIX}
   exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
 
-  CC_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
-  CXX_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
-  AS_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
-  AR_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
-  NM_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
-  LD_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
-  SIZE_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
-  OBJCOPY_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
+  CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
+  CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++
+  AS_FOR_TARGET = ${PROGRAM_PREFIX}as
+  AR_FOR_TARGET = ${PROGRAM_PREFIX}ar
+  NM_FOR_TARGET = ${PROGRAM_PREFIX}nm
+  LD_FOR_TARGET = ${PROGRAM_PREFIX}ld
+  SIZE_FOR_TARGET = ${PROGRAM_PREFIX}size
+  OBJCOPY_FOR_TARGET = ${PROGRAM_PREFIX}objcopy
 
   CC= $$(CC_FOR_TARGET)
   CXX= $$(CXX_FOR_TARGET)
diff --git a/spec/build/bsps/maketarget.yml b/spec/build/bsps/maketarget.yml
index 798b64fa22..7a7b0c3d35 100644
--- a/spec/build/bsps/maketarget.yml
+++ b/spec/build/bsps/maketarget.yml
@@ -11,17 +11,17 @@ content: |
   LIBS =
 
   RTEMS_API = ${__RTEMS_MAJOR__}
-  CC = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc --pipe
-  AS = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
-  AR = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
-  NM = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
-  LD = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
-  SIZE = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
-  STRIP = ${ARCH}-rtems${__RTEMS_MAJOR__}-strip
-  OBJCOPY = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
-  RANLIB = ${ARCH}-rtems${__RTEMS_MAJOR__}-ranlib
-
-  CXX = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
+  CC = ${PROGRAM_PREFIX}gcc --pipe
+  AS = ${PROGRAM_PREFIX}as
+  AR = ${PROGRAM_PREFIX}ar
+  NM = ${PROGRAM_PREFIX}nm
+  LD = ${PROGRAM_PREFIX}ld
+  SIZE = ${PROGRAM_PREFIX}size
+  STRIP = ${PROGRAM_PREFIX}strip
+  OBJCOPY = ${PROGRAM_PREFIX}objcopy
+  RANLIB = ${PROGRAM_PREFIX}ranlib
+
+  CXX = ${PROGRAM_PREFIX}g++
 
   export CC
   export AS
diff --git a/spec/build/bsps/optobjcopy.yml b/spec/build/bsps/optobjcopy.yml
index 3387e23794..63fab08ac6 100644
--- a/spec/build/bsps/optobjcopy.yml
+++ b/spec/build/bsps/optobjcopy.yml
@@ -1,6 +1,6 @@
 SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 actions:
-- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
+- set-value: ${PROGRAM_PREFIX}objcopy
 - substitute: null
 - find-program: null
 - env-assign: OBJCOPY
diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml
index f1b30eec55..1d28ace552 100644
--- a/spec/build/cpukit/cpuopts.yml
+++ b/spec/build/cpukit/cpuopts.yml
@@ -7,6 +7,8 @@ guard: _RTEMS_SCORE_CPUOPTS_H
 include-headers: []
 install-path: ${BSP_INCLUDEDIR}/rtems/score
 links:
+- role: build-dependency
+  uid: optprogramprefix
 - role: build-dependency
   uid: optgcc
 - role: build-dependency
diff --git a/spec/build/cpukit/optgcc.yml b/spec/build/cpukit/optgcc.yml
index 3afb909444..94af494af4 100644
--- a/spec/build/cpukit/optgcc.yml
+++ b/spec/build/cpukit/optgcc.yml
@@ -1,21 +1,21 @@
 SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
 actions:
-- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
+- set-value: ${PROGRAM_PREFIX}gcc
 - substitute: null
 - find-program: null
 - env-assign: AS
 - env-assign: CC
 - env-assign: LINK_CC
-- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
+- set-value: ${PROGRAM_PREFIX}g++
 - substitute: null
 - find-program: null
 - env-assign: CXX
 - env-assign: LINK_CXX
-- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
+- set-value: ${PROGRAM_PREFIX}ar
 - substitute: null
 - find-program: null
 - env-assign: AR
-- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
+- set-value: ${PROGRAM_PREFIX}ld
 - substitute: null
 - find-program: null
 - env-assign: LD
diff --git a/spec/build/cpukit/optprogramprefix.yml 
b/spec/build/cpukit/optprogramprefix.yml
new file mode 100644
index 00..73deef79d1
--- /dev/null
+++ b/spec/build/cpukit/optprogramprefix.yml
@@ -0,0 +1,18 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- get-string: null
+- substitute: null
+- env-assign: null
+build-type: option

Re: [PATCH] build: Optionally use a VERSION file

2023-08-01 Thread Chris Johns
On 2/8/2023 2:46 pm, Sebastian Huber wrote:
> On 02.08.23 06:01, Chris Johns wrote:
>>> Allow the command line
>>> option --rtems-version to override __RTEMS_MAJOR__.  Remove support for
>>> command line configurable options.
>> I do not understand this last bit. It says allow --rtems-version and then the
>> command line configuration options are removed? And my reading of the change 
>> the
>> command line support has been removed?
> 
> The patch removes the --rtems-option command line support. The --rtems-version
> is needed to build for example using the RTEMS 7 tools.

Ah of course. Thanks.

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

Re: [PATCH] build: Optionally use a VERSION file

2023-08-01 Thread Sebastian Huber

On 02.08.23 06:01, Chris Johns wrote:

Allow the command line
option --rtems-version to override __RTEMS_MAJOR__.  Remove support for
command line configurable options.

I do not understand this last bit. It says allow --rtems-version and then the
command line configuration options are removed? And my reading of the change the
command line support has been removed?


The patch removes the --rtems-option command line support. The 
--rtems-version is needed to build for example using the RTEMS 7 tools.


--
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] build: Optionally use a VERSION file

2023-08-01 Thread Chris Johns
On 1/8/2023 5:11 pm, Sebastian Huber wrote:
> Define the RTEMS version in the wscript.  Optionally use a VERSION file
> to change the default values of the wscript. 

Thanks, this is welcome. I will update the release scripts when merged.

> Allow the command line
> option --rtems-version to override __RTEMS_MAJOR__.  Remove support for
> command line configurable options.

I do not understand this last bit. It says allow --rtems-version and then the
command line configuration options are removed? And my reading of the change the
command line support has been removed?

> Rename internal define RTEMS_VERSION_VC_KEY to
> RTEMS_VERSION_CONTROL_KEY.

OK.

Thanks
Chris

> ---
>  cpukit/sapi/src/version.c   |   8 +--
>  spec/build/cpukit/cpuopts.yml   |   6 --
>  spec/build/cpukit/optvermaj.yml |  13 
>  spec/build/cpukit/optvermin.yml |  13 
>  spec/build/cpukit/optverrev.yml |  13 
>  wscript | 108 +++-
>  6 files changed, 55 insertions(+), 106 deletions(-)
>  delete mode 100644 spec/build/cpukit/optvermaj.yml
>  delete mode 100644 spec/build/cpukit/optvermin.yml
>  delete mode 100644 spec/build/cpukit/optverrev.yml
> 
> diff --git a/cpukit/sapi/src/version.c b/cpukit/sapi/src/version.c
> index ea07683876..7197ddd153 100644
> --- a/cpukit/sapi/src/version.c
> +++ b/cpukit/sapi/src/version.c
> @@ -54,8 +54,8 @@
>  
>  const char *rtems_version( void )
>  {
> -#ifdef RTEMS_VERSION_VC_KEY
> -  return RTEMS_VERSION "." RTEMS_VERSION_VC_KEY;
> +#ifdef RTEMS_VERSION_CONTROL_KEY
> +  return RTEMS_VERSION "." RTEMS_VERSION_CONTROL_KEY;
>  #else
>return RTEMS_VERSION;
>  #endif
> @@ -78,8 +78,8 @@ int rtems_version_revision( void )
>  
>  const char *rtems_version_control_key( void )
>  {
> -#ifdef RTEMS_VERSION_VC_KEY
> -  return RTEMS_VERSION_VC_KEY;
> +#ifdef RTEMS_VERSION_CONTROL_KEY
> +  return RTEMS_VERSION_CONTROL_KEY;
>  #else
>return "";
>  #endif
> diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml
> index 49dfc26e4b..f1b30eec55 100644
> --- a/spec/build/cpukit/cpuopts.yml
> +++ b/spec/build/cpukit/cpuopts.yml
> @@ -7,12 +7,6 @@ guard: _RTEMS_SCORE_CPUOPTS_H
>  include-headers: []
>  install-path: ${BSP_INCLUDEDIR}/rtems/score
>  links:
> -- role: build-dependency
> -  uid: optvermaj
> -- role: build-dependency
> -  uid: optvermin
> -- role: build-dependency
> -  uid: optverrev
>  - role: build-dependency
>uid: optgcc
>  - role: build-dependency
> diff --git a/spec/build/cpukit/optvermaj.yml b/spec/build/cpukit/optvermaj.yml
> deleted file mode 100644
> index e194930b47..00
> --- a/spec/build/cpukit/optvermaj.yml
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> -actions:
> -- get-string-command-line: '6'
> -- env-assign: null
> -build-type: option
> -copyrights:
> -- Copyright (C) 2020 embedded brains GmbH & Co. KG
> -default: []
> -description: ''
> -enabled-by: true
> -links: []
> -name: __RTEMS_MAJOR__
> -type: build
> diff --git a/spec/build/cpukit/optvermin.yml b/spec/build/cpukit/optvermin.yml
> deleted file mode 100644
> index 8a58959394..00
> --- a/spec/build/cpukit/optvermin.yml
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> -actions:
> -- set-value: '0'
> -- env-assign: null
> -build-type: option
> -copyrights:
> -- Copyright (C) 2020 embedded brains GmbH & Co. KG
> -default: []
> -description: ''
> -enabled-by: true
> -links: []
> -name: __RTEMS_MINOR__
> -type: build
> diff --git a/spec/build/cpukit/optverrev.yml b/spec/build/cpukit/optverrev.yml
> deleted file mode 100644
> index 618c936e86..00
> --- a/spec/build/cpukit/optverrev.yml
> +++ /dev/null
> @@ -1,13 +0,0 @@
> -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
> -actions:
> -- set-value: '0'
> -- env-assign: null
> -build-type: option
> -copyrights:
> -- Copyright (C) 2020 embedded brains GmbH & Co. KG
> -default: []
> -description: ''
> -enabled-by: true
> -links: []
> -name: __RTEMS_REVISION__
> -type: build
> diff --git a/wscript b/wscript
> index 862000513d..13c1d1d4d9 100755
> --- a/wscript
> +++ b/wscript
> @@ -43,7 +43,13 @@ except:
>  from waflib.TaskGen import after, before_method, feature
>  
>  is_windows_host = os.name == "nt" or sys.platform in ["msys", "cygwin"]
> -default_prefix = "/opt/rtems/6"
> +version = {
> +"__RTEMS_MAJOR__": "6",
> +"__RTEMS_MINOR__": "0",
> +"__RTEMS_REVISION__": "0",
> +"RTEMS_VERSION_CONTROL_KEY": "git"
> +}
> +default_prefix = "/opt/rtems/" + version["__RTEMS_MAJOR__"]
>  compilers = ["gcc", "clang"]
>  items = {}
>  bsps = {}
> @@ -62,22 +68,28 @@ class VersionControlKeyHeader:
>  
>  @staticmethod
>  def write(bld, filename):
> -if VersionControlKeyHeader._content is None:
> -from waflib.Build import Context
> -from waflib.Errors import WafError
> -
> +content = VersionControlKeyHeader._content
> +if 

Re: [PATCH RTEMS] spec: Remove empty reset from mvme3100

2023-08-01 Thread Chris Johns
OK

Thanks
Chris

On 2/8/2023 6:16 am, Vijay Kumar Banerjee wrote:
> ---
>  spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml 
> b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
> index 1667c1617a..fbb85123f0 100644
> --- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
> +++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
> @@ -86,6 +86,5 @@ source:
>  - bsps/shared/dev/getentropy/getentropy-cpucounter.c
>  - bsps/shared/dev/rtc/rtc-support.c
>  - bsps/shared/start/bspfatal-default.c
> -- bsps/shared/start/bspreset-empty.c
>  - bsps/shared/start/gettargethash-default.c
>  type: build
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH RTEMS] mvme3100: Add BSP fatal extension

2023-08-01 Thread Vijay Kumar Banerjee
On Tue, Aug 1, 2023, 15:30 Joel Sherrill  wrote:

>
>
> On Tue, Aug 1, 2023 at 2:52 PM Vijay Kumar Banerjee 
> wrote:
>
>>
>>
>> On Tue, Aug 1, 2023, 12:20 Joel Sherrill  wrote:
>>
>>>
>>>
>>> On Tue, Aug 1, 2023, 11:41 AM Vijay Kumar Banerjee 
>>> wrote:
>>>
 ---
  bsps/powerpc/mvme3100/start/bspclean.c| 25 +++
  .../bsps/powerpc/mvme3100/bspmvme3100.yml |  1 +
  2 files changed, 26 insertions(+)
  create mode 100644 bsps/powerpc/mvme3100/start/bspclean.c

 diff --git a/bsps/powerpc/mvme3100/start/bspclean.c
 b/bsps/powerpc/mvme3100/start/bspclean.c
 new file mode 100644
 index 00..251d47a46d
 --- /dev/null
 +++ b/bsps/powerpc/mvme3100/start/bspclean.c
 @@ -0,0 +1,25 @@

>>>
>>> There is no copyright, licence, or Doxygen file header block.
>>>
>>> +#include 
 +#include 
 +#include 
 +
 +void bsp_fatal_extension(
 +  rtems_fatal_source source,
 +  bool always_set_to_false,
 +  rtems_fatal_code error
 +)
 +{
 +  printk("fatal source: %s\n", rtems_fatal_source_text(source));
 +
 +  if (source == RTEMS_FATAL_SOURCE_EXCEPTION) {
 +rtems_exception_frame_print((const rtems_exception_frame *) error);
 +  }
 +
 +  /* We can't go back to MotLoad since we blew it's memory area
 +   * and vectors. Just pull the reset line...
 +   */
 +  printk(
 +"bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad
 "
 +  "so I reset the card\n"
 +  );
 +  bsp_reset();
 +}

>>>
>>> What does Motorola PowerPC or the other similar bsps do?
>>>
>>> Can the behaviour be unified and shared?
>>>
>>
>> Thanks for the suggestion!
>> Motorola powerpc uses bspfatal-default.c from bsps/shared. It was not
>> working with mvme3100 because it added the bspreset-empty in the build.
>> Just removing the empty reset makes it work. This patch is no longer
>> needed. I'll send a smaller patch with this much neater solution using the
>> shared defaults.
>>
>
> Wow! Good to hear. Probably should check beatnik and the other mvme* ppc
> BSPs  as well,
>

At least two bsps (mvme5500 and beatnik) has this issue. I will test on the
hardware and post patches for other boards too.

>
>>
>> Thanks!
>>
>
> No problem.
>
> --joel
>
>>
>>
>>> diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
 b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
 index 1667c1617a..dc04e4dd36 100644
 --- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
 +++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
 @@ -64,6 +64,7 @@ source:
  - bsps/powerpc/mvme3100/pci/detect_host_bridge.c
  - bsps/powerpc/mvme3100/rtc/todcfg.c
  - bsps/powerpc/mvme3100/start/bspstart.c
 +- bsps/powerpc/mvme3100/start/bspclean.c
  - bsps/powerpc/mvme3100/start/misc.c
  - bsps/powerpc/shared/btimer/btimer-ppc-dec.c
  - bsps/powerpc/shared/cache/cache.c
 --
 2.39.3

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

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

Re: [PATCH RTEMS] mvme3100: Add BSP fatal extension

2023-08-01 Thread Joel Sherrill
On Tue, Aug 1, 2023 at 2:52 PM Vijay Kumar Banerjee  wrote:

>
>
> On Tue, Aug 1, 2023, 12:20 Joel Sherrill  wrote:
>
>>
>>
>> On Tue, Aug 1, 2023, 11:41 AM Vijay Kumar Banerjee 
>> wrote:
>>
>>> ---
>>>  bsps/powerpc/mvme3100/start/bspclean.c| 25 +++
>>>  .../bsps/powerpc/mvme3100/bspmvme3100.yml |  1 +
>>>  2 files changed, 26 insertions(+)
>>>  create mode 100644 bsps/powerpc/mvme3100/start/bspclean.c
>>>
>>> diff --git a/bsps/powerpc/mvme3100/start/bspclean.c
>>> b/bsps/powerpc/mvme3100/start/bspclean.c
>>> new file mode 100644
>>> index 00..251d47a46d
>>> --- /dev/null
>>> +++ b/bsps/powerpc/mvme3100/start/bspclean.c
>>> @@ -0,0 +1,25 @@
>>>
>>
>> There is no copyright, licence, or Doxygen file header block.
>>
>> +#include 
>>> +#include 
>>> +#include 
>>> +
>>> +void bsp_fatal_extension(
>>> +  rtems_fatal_source source,
>>> +  bool always_set_to_false,
>>> +  rtems_fatal_code error
>>> +)
>>> +{
>>> +  printk("fatal source: %s\n", rtems_fatal_source_text(source));
>>> +
>>> +  if (source == RTEMS_FATAL_SOURCE_EXCEPTION) {
>>> +rtems_exception_frame_print((const rtems_exception_frame *) error);
>>> +  }
>>> +
>>> +  /* We can't go back to MotLoad since we blew it's memory area
>>> +   * and vectors. Just pull the reset line...
>>> +   */
>>> +  printk(
>>> +"bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad "
>>> +  "so I reset the card\n"
>>> +  );
>>> +  bsp_reset();
>>> +}
>>>
>>
>> What does Motorola PowerPC or the other similar bsps do?
>>
>> Can the behaviour be unified and shared?
>>
>
> Thanks for the suggestion!
> Motorola powerpc uses bspfatal-default.c from bsps/shared. It was not
> working with mvme3100 because it added the bspreset-empty in the build.
> Just removing the empty reset makes it work. This patch is no longer
> needed. I'll send a smaller patch with this much neater solution using the
> shared defaults.
>

Wow! Good to hear. Probably should check beatnik and the other mvme* ppc
BSPs  as well,

>
>
> Thanks!
>

No problem.

--joel

>
>
>> diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> index 1667c1617a..dc04e4dd36 100644
>>> --- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> +++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> @@ -64,6 +64,7 @@ source:
>>>  - bsps/powerpc/mvme3100/pci/detect_host_bridge.c
>>>  - bsps/powerpc/mvme3100/rtc/todcfg.c
>>>  - bsps/powerpc/mvme3100/start/bspstart.c
>>> +- bsps/powerpc/mvme3100/start/bspclean.c
>>>  - bsps/powerpc/mvme3100/start/misc.c
>>>  - bsps/powerpc/shared/btimer/btimer-ppc-dec.c
>>>  - bsps/powerpc/shared/cache/cache.c
>>> --
>>> 2.39.3
>>>
>>> ___
>>> devel mailing list
>>> devel@rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel
>>>
>>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH RTEMS] spec: Remove empty reset from mvme3100

2023-08-01 Thread Vijay Kumar Banerjee
---
 spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml 
b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
index 1667c1617a..fbb85123f0 100644
--- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
+++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
@@ -86,6 +86,5 @@ source:
 - bsps/shared/dev/getentropy/getentropy-cpucounter.c
 - bsps/shared/dev/rtc/rtc-support.c
 - bsps/shared/start/bspfatal-default.c
-- bsps/shared/start/bspreset-empty.c
 - bsps/shared/start/gettargethash-default.c
 type: build
-- 
2.39.3

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


Re: [PATCH RTEMS] mvme3100: Add BSP fatal extension

2023-08-01 Thread Vijay Kumar Banerjee
On Tue, Aug 1, 2023, 12:20 Joel Sherrill  wrote:

>
>
> On Tue, Aug 1, 2023, 11:41 AM Vijay Kumar Banerjee 
> wrote:
>
>> ---
>>  bsps/powerpc/mvme3100/start/bspclean.c| 25 +++
>>  .../bsps/powerpc/mvme3100/bspmvme3100.yml |  1 +
>>  2 files changed, 26 insertions(+)
>>  create mode 100644 bsps/powerpc/mvme3100/start/bspclean.c
>>
>> diff --git a/bsps/powerpc/mvme3100/start/bspclean.c
>> b/bsps/powerpc/mvme3100/start/bspclean.c
>> new file mode 100644
>> index 00..251d47a46d
>> --- /dev/null
>> +++ b/bsps/powerpc/mvme3100/start/bspclean.c
>> @@ -0,0 +1,25 @@
>>
>
> There is no copyright, licence, or Doxygen file header block.
>
> +#include 
>> +#include 
>> +#include 
>> +
>> +void bsp_fatal_extension(
>> +  rtems_fatal_source source,
>> +  bool always_set_to_false,
>> +  rtems_fatal_code error
>> +)
>> +{
>> +  printk("fatal source: %s\n", rtems_fatal_source_text(source));
>> +
>> +  if (source == RTEMS_FATAL_SOURCE_EXCEPTION) {
>> +rtems_exception_frame_print((const rtems_exception_frame *) error);
>> +  }
>> +
>> +  /* We can't go back to MotLoad since we blew it's memory area
>> +   * and vectors. Just pull the reset line...
>> +   */
>> +  printk(
>> +"bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad "
>> +  "so I reset the card\n"
>> +  );
>> +  bsp_reset();
>> +}
>>
>
> What does Motorola PowerPC or the other similar bsps do?
>
> Can the behaviour be unified and shared?
>

Thanks for the suggestion!
Motorola powerpc uses bspfatal-default.c from bsps/shared. It was not
working with mvme3100 because it added the bspreset-empty in the build.
Just removing the empty reset makes it work. This patch is no longer
needed. I'll send a smaller patch with this much neater solution using the
shared defaults.


Thanks!


> diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>> b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>> index 1667c1617a..dc04e4dd36 100644
>> --- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>> +++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>> @@ -64,6 +64,7 @@ source:
>>  - bsps/powerpc/mvme3100/pci/detect_host_bridge.c
>>  - bsps/powerpc/mvme3100/rtc/todcfg.c
>>  - bsps/powerpc/mvme3100/start/bspstart.c
>> +- bsps/powerpc/mvme3100/start/bspclean.c
>>  - bsps/powerpc/mvme3100/start/misc.c
>>  - bsps/powerpc/shared/btimer/btimer-ppc-dec.c
>>  - bsps/powerpc/shared/cache/cache.c
>> --
>> 2.39.3
>>
>> ___
>> devel mailing list
>> devel@rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
>>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: CVA6 RISC-V support

2023-08-01 Thread Joel Sherrill
Thanks for the submission. It's a bit hard to review with the patches as
attachments rather than having been sent via git send-email but here goes.

Hopefully someone with more RISC-V knowledge can comment also.


0001 - long comment appears to be one line. Please break into multiple
lines.

0001 - riscv/abi.yml is this just adding another set of compiler options?
Hard to tell.

0001 - bspcv32a6.yml - Did this file end up with a copyright?

0002 - same issue with long comment. Blank line between paragraphs.

0002 - Is this a common issue which applies to other BSPs?

0002 - Is there a maximum length of the strings so strnlen() can be used
instead of strlen()?

0002 - Call strlen/strnlen once on stdout_patch and assign to a variable of
type size_t

0003 - This looks like it will break every other architecture since they
will not have had restart renamed to start.
Can you explain what is really not working so we can find a solution that
is strictly within the RISC-V? There is
also a context method which is invoked in the context of the thread once it
begins execution. Maybe this will
work. See threadhandler.c for the call
to _Context_Initialization_at_thread_begin.

I personally am ok for 01 and 02. 03 will require discussion.

--joel


On Tue, Aug 1, 2023 at 10:53 AM EYSSARTIER Kevin <
kevin.eyssart...@thalesgroup.com> wrote:

> Classified as: {THALES GROUP LIMITED DISTRIBUTION}
>
> Hello,
>
>
>
> I am working on the port of RTEMS 6 on our RISC-V processor, the CORE-V
> CVA6 processor
>
> GitHub - ThalesGroup/cva6: The CORE-V CVA6 is an Application class 6-stage
> RISC-V CPU capable of booting Linux 
>
> The port is working and I think it is a good idea to publish my work on
> the official repository.
>
> During the port I also found two bugs in the RISC-V generic BSP that I
> corrected.
>
>
>
> I hope it satisfy the quality standards of RTEMS.
>
> Best regards,
>
> ---
>
> Kevin EYSSARTIER, Research Engineer
>
> Thales Research & Technology France – High Performance Computing Lab
> Campus Polytechnique - 1, avenue Augustin Fresnel  - 91767 Palaiseau cedex
> Phone : +33 (0)1 69 41 55 14  Internal : 341 55 14
>
>
>
> {THALES GROUP LIMITED DISTRIBUTION}
> ___
> 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] mvme3100: Add BSP fatal extension

2023-08-01 Thread Joel Sherrill
On Tue, Aug 1, 2023, 11:41 AM Vijay Kumar Banerjee  wrote:

> ---
>  bsps/powerpc/mvme3100/start/bspclean.c| 25 +++
>  .../bsps/powerpc/mvme3100/bspmvme3100.yml |  1 +
>  2 files changed, 26 insertions(+)
>  create mode 100644 bsps/powerpc/mvme3100/start/bspclean.c
>
> diff --git a/bsps/powerpc/mvme3100/start/bspclean.c
> b/bsps/powerpc/mvme3100/start/bspclean.c
> new file mode 100644
> index 00..251d47a46d
> --- /dev/null
> +++ b/bsps/powerpc/mvme3100/start/bspclean.c
> @@ -0,0 +1,25 @@
>

There is no copyright, licence, or Doxygen file header block.

+#include 
> +#include 
> +#include 
> +
> +void bsp_fatal_extension(
> +  rtems_fatal_source source,
> +  bool always_set_to_false,
> +  rtems_fatal_code error
> +)
> +{
> +  printk("fatal source: %s\n", rtems_fatal_source_text(source));
> +
> +  if (source == RTEMS_FATAL_SOURCE_EXCEPTION) {
> +rtems_exception_frame_print((const rtems_exception_frame *) error);
> +  }
> +
> +  /* We can't go back to MotLoad since we blew it's memory area
> +   * and vectors. Just pull the reset line...
> +   */
> +  printk(
> +"bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad "
> +  "so I reset the card\n"
> +  );
> +  bsp_reset();
> +}
>

What does Motorola PowerPC or the other similar bsps do?

Can the behaviour be unified and shared?

diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
> b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
> index 1667c1617a..dc04e4dd36 100644
> --- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
> +++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
> @@ -64,6 +64,7 @@ source:
>  - bsps/powerpc/mvme3100/pci/detect_host_bridge.c
>  - bsps/powerpc/mvme3100/rtc/todcfg.c
>  - bsps/powerpc/mvme3100/start/bspstart.c
> +- bsps/powerpc/mvme3100/start/bspclean.c
>  - bsps/powerpc/mvme3100/start/misc.c
>  - bsps/powerpc/shared/btimer/btimer-ppc-dec.c
>  - bsps/powerpc/shared/cache/cache.c
> --
> 2.39.3
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH RTEMS] mvme3100: Add BSP fatal extension

2023-08-01 Thread Vijay Kumar Banerjee
---
 bsps/powerpc/mvme3100/start/bspclean.c| 25 +++
 .../bsps/powerpc/mvme3100/bspmvme3100.yml |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 bsps/powerpc/mvme3100/start/bspclean.c

diff --git a/bsps/powerpc/mvme3100/start/bspclean.c 
b/bsps/powerpc/mvme3100/start/bspclean.c
new file mode 100644
index 00..251d47a46d
--- /dev/null
+++ b/bsps/powerpc/mvme3100/start/bspclean.c
@@ -0,0 +1,25 @@
+#include 
+#include 
+#include 
+
+void bsp_fatal_extension(
+  rtems_fatal_source source,
+  bool always_set_to_false,
+  rtems_fatal_code error
+)
+{
+  printk("fatal source: %s\n", rtems_fatal_source_text(source));
+
+  if (source == RTEMS_FATAL_SOURCE_EXCEPTION) {
+rtems_exception_frame_print((const rtems_exception_frame *) error);
+  }
+
+  /* We can't go back to MotLoad since we blew it's memory area
+   * and vectors. Just pull the reset line...
+   */
+  printk(
+"bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad "
+  "so I reset the card\n"
+  );
+  bsp_reset();
+}
diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml 
b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
index 1667c1617a..dc04e4dd36 100644
--- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
+++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
@@ -64,6 +64,7 @@ source:
 - bsps/powerpc/mvme3100/pci/detect_host_bridge.c
 - bsps/powerpc/mvme3100/rtc/todcfg.c
 - bsps/powerpc/mvme3100/start/bspstart.c
+- bsps/powerpc/mvme3100/start/bspclean.c
 - bsps/powerpc/mvme3100/start/misc.c
 - bsps/powerpc/shared/btimer/btimer-ppc-dec.c
 - bsps/powerpc/shared/cache/cache.c
-- 
2.39.3

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


CVA6 RISC-V support

2023-08-01 Thread EYSSARTIER Kevin
Classified as: {THALES GROUP LIMITED DISTRIBUTION}

Hello,

I am working on the port of RTEMS 6 on our RISC-V processor, the CORE-V CVA6 
processor
GitHub - ThalesGroup/cva6: The CORE-V CVA6 is an Application class 6-stage 
RISC-V CPU capable of booting Linux
The port is working and I think it is a good idea to publish my work on the 
official repository.
During the port I also found two bugs in the RISC-V generic BSP that I 
corrected.

I hope it satisfy the quality standards of RTEMS.
Best regards,
---
Kevin EYSSARTIER, Research Engineer
Thales Research & Technology France - High Performance Computing Lab
Campus Polytechnique - 1, avenue Augustin Fresnel  - 91767 Palaiseau cedex
Phone : +33 (0)1 69 41 55 14  Internal : 341 55 14



{THALES GROUP LIMITED DISTRIBUTION}


0003-Force-ISR-enable-before-scheduler-start.patch
Description: 0003-Force-ISR-enable-before-scheduler-start.patch


0001-Adding-core-v-cv32a6-support.patch
Description: 0001-Adding-core-v-cv32a6-support.patch


0002-bsps-riscv-Handle-in-chosen-stdout-path.patch
Description: 0002-bsps-riscv-Handle-in-chosen-stdout-path.patch
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Fwd: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s): everything

2023-08-01 Thread Karel Gardas

On 8/1/23 16:12, Joel Sherrill wrote:

Yes, go ahead.



Thanks,


But would it be more useful it the report included a hash?


Of course, but this is single-liner right?
Depending on what you like:

- git log -n 1
- git log -n 1|grep "^commit"|cut -d ' ' -f 2-

Karel



On Tue, Aug 1, 2023 at 9:00 AM Karel Gardas  wrote:


    Joel,

not sure about what do you mean by "before the fix was pushed", but
certainly RTEMS HEAD does not contain the fix for this yet and fix is
already awaiting review here:

https://lists.rtems.org/pipermail/devel/2023-July/076043.html


If you ok that, I may push...

Thanks,
Karel


On 8/1/23 15:55, Joel Sherrill wrote:
 >
 > I think this started before the fix was pushed but since there is no
 > hash in this report, it is impossible to be sure.
 >
 > Since it already has to know about the rtems source tree, could it
 > include a hash? How hard is that to implement?
 >
 > --joel
 > -- Forwarded message -
 > From: *OAR Tester for CentOS 7* mailto:rtems-tes...@oarcorp.com>
 > >>
 > Date: Tue, Aug 1, 2023 at 5:24 AM
 > Subject: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s):
everything
 > To: mailto:bu...@rtems.org>
>>
 >
 >
 > RTEMS Tools Project - RTEMS Kernel BSP Builder, 6.0.not_released
 > 
 >
 > Host: #1 SMP Tue Jun 20 11:48:01 UTC 2023
 >
 > command: /home/tester/rtems-cron-6/tools/6/bin/rtems-bsp-builder\
 >           --rtems=/home/tester/rtems-cron-6/rtems
--build-path=/home/tester\
 >           /rtems-cron-6/build --prefix=/home/tester/rtems-\
 >           cron-6/tools/6/bsps --log=/home/tester/rtems-cron-6/bsp-\
 >           builder.log --warnings-report=warnings.log --mail
--use-gitconfig\
 >           --profiles=everything
 >
 > Total Time            : 6:57:10.027015 for 1298 completed job(s)
 > Average BSP Build Time: 0:00:19.283533
 >
 > Builds
 > ==
 >   debug
 >   no-posix
 >   posix
 >   posix-debug
 >   posix-profiling
 >   profiling
 >   smp
 >   smp-debug
 >
 > Failures Report
 > ===
 >     1 debug arm/beagleboardorig build:
 >        configure: /home/tester/rtems-cron-6/rtems/waf configure\
 >        --prefix=/home/tester/rtems-cron-6/tools/6/bsps
--top=/home/tester\
 >        /rtems-cron-6/rtems
--rtems-config=config-arm-beagleboardorig-\
 >        debug.ini
 >       error:
home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
 >              fatal error: dev/can/can.h: No such file or directory
 >       error:
home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
 >              error: dev/can/can.h: No such file or directory
 >
 >     2 no-posix arm/beagleboardorig build:
 >        configure: /home/tester/rtems-cron-6/rtems/waf configure\
 >        --prefix=/home/tester/rtems-cron-6/tools/6/bsps
--top=/home/tester\
 >        /rtems-cron-6/rtems
--rtems-config=config-arm-beagleboardorig-no-\
 >        posix.ini
 >       error:
home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
 >              fatal error: dev/can/can.h: No such file or directory
 >
 >     3 posix arm/beagleboardorig build:
 >        configure: /home/tester/rtems-cron-6/rtems/waf configure\
 >        --prefix=/home/tester/rtems-cron-6/tools/6/bsps
--top=/home/tester\
 >        /rtems-cron-6/rtems
--rtems-config=config-arm-beagleboardorig-\
 >        posix.ini
 >       error:
home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
 >              fatal error: dev/can/can.h: No such file or directory
 >
 >     4 posix-debug arm/beagleboardorig build:
 >        configure: /home/tester/rtems-cron-6/rtems/waf configure\
 >        --prefix=/home/tester/rtems-cron-6/tools/6/bsps
--top=/home/tester\
 >        /rtems-cron-6/rtems
--rtems-config=config-arm-beagleboardorig-posix-\
 >        debug.ini
 >       error:
home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
 >              fatal error: dev/can/can.h: No such file or directory
 >
 >     5 posix-profiling arm/beagleboardorig build:
 >        configure: /home/tester/rtems-cron-6/rtems/waf configure\
 >        --prefix=/home/tester/rtems-cron-6/tools/6/bsps
--top=/home/tester\
 >        /rtems-cron-6/rtems
--rtems-config=config-arm-beagleboardorig-posix-\
 >        profiling.ini
 >       error:
home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
 >              error: 

Re: Fwd: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s): everything

2023-08-01 Thread Joel Sherrill
Yes, go ahead.

But would it be more useful it the report included a hash?

On Tue, Aug 1, 2023 at 9:00 AM Karel Gardas  wrote:

>
>Joel,
>
> not sure about what do you mean by "before the fix was pushed", but
> certainly RTEMS HEAD does not contain the fix for this yet and fix is
> already awaiting review here:
>
> https://lists.rtems.org/pipermail/devel/2023-July/076043.html
>
> If you ok that, I may push...
>
> Thanks,
> Karel
>
>
> On 8/1/23 15:55, Joel Sherrill wrote:
> >
> > I think this started before the fix was pushed but since there is no
> > hash in this report, it is impossible to be sure.
> >
> > Since it already has to know about the rtems source tree, could it
> > include a hash? How hard is that to implement?
> >
> > --joel
> > -- Forwarded message -
> > From: *OAR Tester for CentOS 7*  > >
> > Date: Tue, Aug 1, 2023 at 5:24 AM
> > Subject: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s): everything
> > To: mailto:bu...@rtems.org>>
> >
> >
> > RTEMS Tools Project - RTEMS Kernel BSP Builder, 6.0.not_released
> > 
> >
> > Host: #1 SMP Tue Jun 20 11:48:01 UTC 2023
> >
> > command: /home/tester/rtems-cron-6/tools/6/bin/rtems-bsp-builder\
> >   --rtems=/home/tester/rtems-cron-6/rtems
> --build-path=/home/tester\
> >   /rtems-cron-6/build --prefix=/home/tester/rtems-\
> >   cron-6/tools/6/bsps --log=/home/tester/rtems-cron-6/bsp-\
> >   builder.log --warnings-report=warnings.log --mail
> --use-gitconfig\
> >   --profiles=everything
> >
> > Total Time: 6:57:10.027015 for 1298 completed job(s)
> > Average BSP Build Time: 0:00:19.283533
> >
> > Builds
> > ==
> >   debug
> >   no-posix
> >   posix
> >   posix-debug
> >   posix-profiling
> >   profiling
> >   smp
> >   smp-debug
> >
> > Failures Report
> > ===
> > 1 debug arm/beagleboardorig build:
> >configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >--prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> >/rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
> >debug.ini
> >   error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
> >  fatal error: dev/can/can.h: No such file or directory
> >   error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
> >  error: dev/can/can.h: No such file or directory
> >
> > 2 no-posix arm/beagleboardorig build:
> >configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >--prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> >/rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-no-\
> >posix.ini
> >   error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
> >  fatal error: dev/can/can.h: No such file or directory
> >
> > 3 posix arm/beagleboardorig build:
> >configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >--prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> >/rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
> >posix.ini
> >   error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
> >  fatal error: dev/can/can.h: No such file or directory
> >
> > 4 posix-debug arm/beagleboardorig build:
> >configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >--prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> >/rtems-cron-6/rtems
> --rtems-config=config-arm-beagleboardorig-posix-\
> >debug.ini
> >   error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
> >  fatal error: dev/can/can.h: No such file or directory
> >
> > 5 posix-profiling arm/beagleboardorig build:
> >configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >--prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> >/rtems-cron-6/rtems
> --rtems-config=config-arm-beagleboardorig-posix-\
> >profiling.ini
> >   error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
> >  error: dev/can/can.h: No such file or directory
> >
> > 6 profiling arm/beagleboardorig build:
> >configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >--prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> >/rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
> >profiling.ini
> >   error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
> >  error: dev/can/can.h: No such file or directory
> >
> > 7 debug arm/beagleboardxm build:
> >configure: /home/tester/rtems-cron-6/rtems/waf configure\
> >--prefix=/home/tester/rtems-cron-6/tools/6/bsps
> --top=/home/tester\
> >/rtems-cron-6/rtems 

Re: Fwd: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s): everything

2023-08-01 Thread Karel Gardas


  Joel,

not sure about what do you mean by "before the fix was pushed", but 
certainly RTEMS HEAD does not contain the fix for this yet and fix is 
already awaiting review here:


https://lists.rtems.org/pipermail/devel/2023-July/076043.html

If you ok that, I may push...

Thanks,
Karel


On 8/1/23 15:55, Joel Sherrill wrote:


I think this started before the fix was pushed but since there is no 
hash in this report, it is impossible to be sure.


Since it already has to know about the rtems source tree, could it 
include a hash? How hard is that to implement?


--joel
-- Forwarded message -
From: *OAR Tester for CentOS 7* >

Date: Tue, Aug 1, 2023 at 5:24 AM
Subject: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s): everything
To: mailto:bu...@rtems.org>>


RTEMS Tools Project - RTEMS Kernel BSP Builder, 6.0.not_released


Host: #1 SMP Tue Jun 20 11:48:01 UTC 2023

command: /home/tester/rtems-cron-6/tools/6/bin/rtems-bsp-builder\
          --rtems=/home/tester/rtems-cron-6/rtems --build-path=/home/tester\
          /rtems-cron-6/build --prefix=/home/tester/rtems-\
          cron-6/tools/6/bsps --log=/home/tester/rtems-cron-6/bsp-\
          builder.log --warnings-report=warnings.log --mail --use-gitconfig\
          --profiles=everything

Total Time            : 6:57:10.027015 for 1298 completed job(s)
Average BSP Build Time: 0:00:19.283533

Builds
==
  debug
  no-posix
  posix
  posix-debug
  posix-profiling
  profiling
  smp
  smp-debug

Failures Report
===
    1 debug arm/beagleboardorig build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
       debug.ini
      error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
             fatal error: dev/can/can.h: No such file or directory
      error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
             error: dev/can/can.h: No such file or directory

    2 no-posix arm/beagleboardorig build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-no-\
       posix.ini
      error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
             fatal error: dev/can/can.h: No such file or directory

    3 posix arm/beagleboardorig build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
       posix.ini
      error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
             fatal error: dev/can/can.h: No such file or directory

    4 posix-debug arm/beagleboardorig build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-posix-\
       debug.ini
      error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
             fatal error: dev/can/can.h: No such file or directory

    5 posix-profiling arm/beagleboardorig build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-posix-\
       profiling.ini
      error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
             error: dev/can/can.h: No such file or directory

    6 profiling arm/beagleboardorig build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
       profiling.ini
      error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
             error: dev/can/can.h: No such file or directory

    7 debug arm/beagleboardxm build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardxm-\
       debug.ini
      error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
             error: dev/can/can.h: No such file or directory

    8 no-posix arm/beagleboardxm build:
       configure: /home/tester/rtems-cron-6/rtems/waf configure\
       --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
       /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardxm-no-\
       posix.ini
      error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
             

Fwd: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s): everything

2023-08-01 Thread Joel Sherrill
I think this started before the fix was pushed but since there is no hash
in this report, it is impossible to be sure.

Since it already has to know about the rtems source tree, could it include
a hash? How hard is that to implement?

--joel
-- Forwarded message -
From: OAR Tester for CentOS 7 
Date: Tue, Aug 1, 2023 at 5:24 AM
Subject: [rtems-bsp-builder] 2023-07-31 17:37:34: Profile(s): everything
To: 


RTEMS Tools Project - RTEMS Kernel BSP Builder, 6.0.not_released


Host: #1 SMP Tue Jun 20 11:48:01 UTC 2023

command: /home/tester/rtems-cron-6/tools/6/bin/rtems-bsp-builder\
 --rtems=/home/tester/rtems-cron-6/rtems --build-path=/home/tester\
 /rtems-cron-6/build --prefix=/home/tester/rtems-\
 cron-6/tools/6/bsps --log=/home/tester/rtems-cron-6/bsp-\
 builder.log --warnings-report=warnings.log --mail --use-gitconfig\
 --profiles=everything

Total Time: 6:57:10.027015 for 1298 completed job(s)
Average BSP Build Time: 0:00:19.283533

Builds
==
 debug
 no-posix
 posix
 posix-debug
 posix-profiling
 profiling
 smp
 smp-debug

Failures Report
===
   1 debug arm/beagleboardorig build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
  debug.ini
 error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
fatal error: dev/can/can.h: No such file or directory
 error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
error: dev/can/can.h: No such file or directory

   2 no-posix arm/beagleboardorig build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-no-\
  posix.ini
 error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
fatal error: dev/can/can.h: No such file or directory

   3 posix arm/beagleboardorig build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
  posix.ini
 error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
fatal error: dev/can/can.h: No such file or directory

   4 posix-debug arm/beagleboardorig build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-posix-\
  debug.ini
 error: home/tester/bsps/arm/beagle/include/bsp/am335x_dcan.h:42:10:
fatal error: dev/can/can.h: No such file or directory

   5 posix-profiling arm/beagleboardorig build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-posix-\
  profiling.ini
 error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
error: dev/can/can.h: No such file or directory

   6 profiling arm/beagleboardorig build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardorig-\
  profiling.ini
 error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
error: dev/can/can.h: No such file or directory

   7 debug arm/beagleboardxm build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardxm-\
  debug.ini
 error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
error: dev/can/can.h: No such file or directory

   8 no-posix arm/beagleboardxm build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardxm-no-\
  posix.ini
 error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
error: dev/can/can.h: No such file or directory

   9 posix arm/beagleboardxm build:
  configure: /home/tester/rtems-cron-6/rtems/waf configure\
  --prefix=/home/tester/rtems-cron-6/tools/6/bsps --top=/home/tester\
  /rtems-cron-6/rtems --rtems-config=config-arm-beagleboardxm-\
  posix.ini
 error: home/tester/bsps/arm/beagle/dcan/am335x-dcan.c:37:10: fatal
error: dev/can/can.h: No such file or directory

  10 posix-debug arm/beagleboardxm 

Re: [PATCH] build: Add optional RTEMS_VERSION_VC_KEY

2023-08-01 Thread Sebastian Huber

On 01.08.23 00:43, Chris Johns wrote:

I think naming this option RTEMS_VERSION_CONTROL_KEY makes more sense, since the
corresponding RTEMS API directive is rtems_version_control_key(). Is VC a well
known abbreviation?

The name in the API is what it is and I am not suggesting it be changed. Maybe
it could have been more general to serve a wider purpose than just the VC but it
is there now so that time has passed.


This define is only internally used. The API element is 
rtems_version_control_key().


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

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

[PATCH] build: Optionally use a VERSION file

2023-08-01 Thread Sebastian Huber
Define the RTEMS version in the wscript.  Optionally use a VERSION file
to change the default values of the wscript.  Allow the command line
option --rtems-version to override __RTEMS_MAJOR__.  Remove support for
command line configurable options.

Rename internal define RTEMS_VERSION_VC_KEY to
RTEMS_VERSION_CONTROL_KEY.
---
 cpukit/sapi/src/version.c   |   8 +--
 spec/build/cpukit/cpuopts.yml   |   6 --
 spec/build/cpukit/optvermaj.yml |  13 
 spec/build/cpukit/optvermin.yml |  13 
 spec/build/cpukit/optverrev.yml |  13 
 wscript | 108 +++-
 6 files changed, 55 insertions(+), 106 deletions(-)
 delete mode 100644 spec/build/cpukit/optvermaj.yml
 delete mode 100644 spec/build/cpukit/optvermin.yml
 delete mode 100644 spec/build/cpukit/optverrev.yml

diff --git a/cpukit/sapi/src/version.c b/cpukit/sapi/src/version.c
index ea07683876..7197ddd153 100644
--- a/cpukit/sapi/src/version.c
+++ b/cpukit/sapi/src/version.c
@@ -54,8 +54,8 @@
 
 const char *rtems_version( void )
 {
-#ifdef RTEMS_VERSION_VC_KEY
-  return RTEMS_VERSION "." RTEMS_VERSION_VC_KEY;
+#ifdef RTEMS_VERSION_CONTROL_KEY
+  return RTEMS_VERSION "." RTEMS_VERSION_CONTROL_KEY;
 #else
   return RTEMS_VERSION;
 #endif
@@ -78,8 +78,8 @@ int rtems_version_revision( void )
 
 const char *rtems_version_control_key( void )
 {
-#ifdef RTEMS_VERSION_VC_KEY
-  return RTEMS_VERSION_VC_KEY;
+#ifdef RTEMS_VERSION_CONTROL_KEY
+  return RTEMS_VERSION_CONTROL_KEY;
 #else
   return "";
 #endif
diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml
index 49dfc26e4b..f1b30eec55 100644
--- a/spec/build/cpukit/cpuopts.yml
+++ b/spec/build/cpukit/cpuopts.yml
@@ -7,12 +7,6 @@ guard: _RTEMS_SCORE_CPUOPTS_H
 include-headers: []
 install-path: ${BSP_INCLUDEDIR}/rtems/score
 links:
-- role: build-dependency
-  uid: optvermaj
-- role: build-dependency
-  uid: optvermin
-- role: build-dependency
-  uid: optverrev
 - role: build-dependency
   uid: optgcc
 - role: build-dependency
diff --git a/spec/build/cpukit/optvermaj.yml b/spec/build/cpukit/optvermaj.yml
deleted file mode 100644
index e194930b47..00
--- a/spec/build/cpukit/optvermaj.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
-actions:
-- get-string-command-line: '6'
-- env-assign: null
-build-type: option
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH & Co. KG
-default: []
-description: ''
-enabled-by: true
-links: []
-name: __RTEMS_MAJOR__
-type: build
diff --git a/spec/build/cpukit/optvermin.yml b/spec/build/cpukit/optvermin.yml
deleted file mode 100644
index 8a58959394..00
--- a/spec/build/cpukit/optvermin.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
-actions:
-- set-value: '0'
-- env-assign: null
-build-type: option
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH & Co. KG
-default: []
-description: ''
-enabled-by: true
-links: []
-name: __RTEMS_MINOR__
-type: build
diff --git a/spec/build/cpukit/optverrev.yml b/spec/build/cpukit/optverrev.yml
deleted file mode 100644
index 618c936e86..00
--- a/spec/build/cpukit/optverrev.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
-actions:
-- set-value: '0'
-- env-assign: null
-build-type: option
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH & Co. KG
-default: []
-description: ''
-enabled-by: true
-links: []
-name: __RTEMS_REVISION__
-type: build
diff --git a/wscript b/wscript
index 862000513d..13c1d1d4d9 100755
--- a/wscript
+++ b/wscript
@@ -43,7 +43,13 @@ except:
 from waflib.TaskGen import after, before_method, feature
 
 is_windows_host = os.name == "nt" or sys.platform in ["msys", "cygwin"]
-default_prefix = "/opt/rtems/6"
+version = {
+"__RTEMS_MAJOR__": "6",
+"__RTEMS_MINOR__": "0",
+"__RTEMS_REVISION__": "0",
+"RTEMS_VERSION_CONTROL_KEY": "git"
+}
+default_prefix = "/opt/rtems/" + version["__RTEMS_MAJOR__"]
 compilers = ["gcc", "clang"]
 items = {}
 bsps = {}
@@ -62,22 +68,28 @@ class VersionControlKeyHeader:
 
 @staticmethod
 def write(bld, filename):
-if VersionControlKeyHeader._content is None:
-from waflib.Build import Context
-from waflib.Errors import WafError
-
+content = VersionControlKeyHeader._content
+if content is None:
 content = """/*
  * Automatically generated. Do not edit.
  */
 #if !defined(_RTEMS_VERSION_VC_KEY_H_)
 #define _RTEMS_VERSION_VC_KEY_H_
 """
-try:
-rev = bld.cmd_and_log("git rev-parse HEAD",
-  quiet=Context.STDOUT).strip()
-content += """#define RTEMS_VERSION_VC_KEY "{}"
-""".format(rev)
-except WafError:
+key = bld.env.RTEMS_VERSION_CONTROL_KEY
+if key == "git":
+from waflib.Build import Context
+from waflib.Errors import WafError
+
+