Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf
On 4/11/21 12:37 am, Ryan Long wrote: > -Original Message- > From: Chris Johns > Sent: Tuesday, November 2, 2021 5:14 PM > To: Ryan Long ; devel@rtems.org > Subject: Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf > > On 3/11/21 4:13 am, Ryan Long wrote: >> >> -Original Message- >> From: Chris Johns >> Sent: Monday, November 1, 2021 8:48 PM >> To: Ryan Long ; devel@rtems.org >> Subject: Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe >> using waf On 28/10/21 2:09 am, Ryan Long wrote: >>> + %define rtems_bsp >>> + %(%{_topdir}/../source-builder/rtems-kernel-config-check -b >>> + %{with_rtems_bsp_config}) >> >> How are config file errors handled? I normally return `ERROR` or something >> that can be checked. >> [Ryan Long] Right now the script is handling all the errors. I'll add some >> error checking to rtems-kernel-common.cfg. > > And if the helper script finds and error what happens to the RSB build? > [Ryan Long] The build fails when an error is found on in the INI file by the > helper script. The error is printed out, so does error checking still need to > be added to rtems-kernel-common.cfg? This founds fine to me. I was just checking this is being handled. Thanks Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
RE: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf
-Original Message- From: Chris Johns Sent: Tuesday, November 2, 2021 5:14 PM To: Ryan Long ; devel@rtems.org Subject: Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf On 3/11/21 4:13 am, Ryan Long wrote: > > -Original Message- > From: Chris Johns > Sent: Monday, November 1, 2021 8:48 PM > To: Ryan Long ; devel@rtems.org > Subject: Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe > using waf On 28/10/21 2:09 am, Ryan Long wrote: >> + %define rtems_bsp >> + %(%{_topdir}/../source-builder/rtems-kernel-config-check -b >> + %{with_rtems_bsp_config}) > > How are config file errors handled? I normally return `ERROR` or something > that can be checked. > [Ryan Long] Right now the script is handling all the errors. I'll add some > error checking to rtems-kernel-common.cfg. And if the helper script finds and error what happens to the RSB build? [Ryan Long] The build fails when an error is found on in the INI file by the helper script. The error is printed out, so does error checking still need to be added to rtems-kernel-common.cfg? Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf
On 3/11/21 4:13 am, Ryan Long wrote: > > -Original Message- > From: Chris Johns > Sent: Monday, November 1, 2021 8:48 PM > To: Ryan Long ; devel@rtems.org > Subject: Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf > On 28/10/21 2:09 am, Ryan Long wrote: >> + %define rtems_bsp >> + %(%{_topdir}/../source-builder/rtems-kernel-config-check -b >> + %{with_rtems_bsp_config}) > > How are config file errors handled? I normally return `ERROR` or something > that can be checked. > [Ryan Long] Right now the script is handling all the errors. I'll add some > error checking to rtems-kernel-common.cfg. And if the helper script finds and error what happens to the RSB build? Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
RE: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf
-Original Message- From: Chris Johns Sent: Monday, November 1, 2021 8:48 PM To: Ryan Long ; devel@rtems.org Subject: Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf On 28/10/21 2:09 am, Ryan Long wrote: > Closes #4145 > --- > rtems/config/tools/rtems-kernel-6.cfg | 6 +- > rtems/config/tools/rtems-kernel-common.cfg | 125 > source-builder/rtems-kernel-config-check | 147 > + > source-builder/sb/options.py | 135 +- > 4 files changed, 283 insertions(+), 130 deletions(-) create mode > 100755 source-builder/rtems-kernel-config-check > > diff --git a/rtems/config/tools/rtems-kernel-6.cfg > b/rtems/config/tools/rtems-kernel-6.cfg > index f1d0990..9120862 100644 > --- a/rtems/config/tools/rtems-kernel-6.cfg > +++ b/rtems/config/tools/rtems-kernel-6.cfg > @@ -2,10 +2,10 @@ > # RTEMS 5 > # > > -%define rtems_kernel_version 3ec5f20484cc4201e1d7b87844505644533b6148 > -%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.bz2 \ > - > BjMKrf5n1YR6IpiZrY5TUEzKATPRJxA2/6m6f833DdRu+RyLxccXqA4gHRdVUqFelFNQ3o0XdG4o1naBKYfhkQ== > +%define rtems_kernel_version 3bb97a30b17b6c138dead3e3a6b329c3b301cdb3 > > +%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.gz \ > + > +m/ogwrJj4X60ewDIbV6WRj1MJa/22gQHQd56XiNMfvCr0nsvcXdkXKAObLIGYIGYfUyEw > +lVk3SRjjRFkFalDGQ== > # > # The RTEMS build instructions. > # > diff --git a/rtems/config/tools/rtems-kernel-common.cfg > b/rtems/config/tools/rtems-kernel-common.cfg > index 157c7a4..d5b67dd 100644 > --- a/rtems/config/tools/rtems-kernel-common.cfg > +++ b/rtems/config/tools/rtems-kernel-common.cfg > @@ -9,7 +9,7 @@ > # and BSPs. Only after the source to download. > # > %if %{_dry_run} && %{defined with_download} > - %log Kenrel configuration errors ignored > + %log Kernel configuration errors ignored > %define rtems_kernel_error 0 > %else > %define rtems_kernel_error 1 > @@ -19,10 +19,15 @@ > %define rtems_kernel_version %{rsb_version} %endif > > +%if %{defined with_rtems_bsp_config} > + %define _target > +%(%{_topdir}/../source-builder/rtems-kernel-config-check -v > +%{rtems_version} -t %{with_rtems_bsp_config}) There is a variable called `_sbdir` that is normally used to find internal helper scripts located in the source builder... https://docs.rtems.org/branches/master/user/rsb/configuration.html#configuration If you add `rtems-kernel-config-check` to `source-builder` it becomes a user facing tool and needs documentation and a controlled user interface. If you use: %{_sbdir}/sb/rtems-kernel-config-check the helper script is internal to the source builder. Is the script internal? [Ryan Long] I think it would only be useful in this case, so I'll move that to sb. > + %define rtems_bsp > + %(%{_topdir}/../source-builder/rtems-kernel-config-check -b > + %{with_rtems_bsp_config}) How are config file errors handled? I normally return `ERROR` or something that can be checked. [Ryan Long] Right now the script is handling all the errors. I'll add some error checking to rtems-kernel-common.cfg. > +%endif > + > # > # The target. It could be set in rtems_target. > # > -%if %{defined rtems_target} > +%if %{defined rtems_target} && !%{defined with_rtems_bsp_config} > %define _target %{rtems_target} > %endif > %if %{_target} == %{nil} && %{rtems_kernel_error} @@ -32,10 +37,21 @@ > # # The BSP. > # > -%if !%{defined with_rtems_bsp} && %{rtems_kernel_error} > +%if !%{defined with_rtems_bsp} && %{rtems_kernel_error} && !%{defined > +with_rtems_bsp_config} > %error No RTEMS BSP specified: --with-rtems-bsp=bsp %endif -%define > rtems_bsp %{with_rtems_bsp} > +%if !%{defined with_rtems_bsp_config} %define rtems_bsp > +%{with_rtems_bsp} %endif > + > +# > +# Configuration file used with waf > +# > +%ifn %{defined with_rtems_bsp_config} %define config_file > +config-%{_target}-%{rtems_bsp}.ini > +%else > + %define config_file %{with_rtems_bsp_config} %endif > > # > # If no tools are provided use the prefix. > @@ -98,14 +114,6 @@ URL: https://www.rtems.org/ > %define rtems_posix 0 > %endif > > -%if %{defined with_rtems_legacy_network} > - %define rtems_networking 1 > -%endif > - > -%if %{defined with_rtems_cxx} > - %define rtems_cxx 1 > -%endif > - > %if %{defined with_rtems_bspopts} > %define bspopts %{with_rtems_bspopts} %endif > @@ -143,43 +151,43 @@ URL: https://www.rtems.org/ > # --without-rtems-tests : Supported, forced to no > # --with-rtems-smp : Supported > # --without-rte
Re: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf
On 28/10/21 2:09 am, Ryan Long wrote: > Closes #4145 > --- > rtems/config/tools/rtems-kernel-6.cfg | 6 +- > rtems/config/tools/rtems-kernel-common.cfg | 125 > source-builder/rtems-kernel-config-check | 147 > + > source-builder/sb/options.py | 135 +- > 4 files changed, 283 insertions(+), 130 deletions(-) > create mode 100755 source-builder/rtems-kernel-config-check > > diff --git a/rtems/config/tools/rtems-kernel-6.cfg > b/rtems/config/tools/rtems-kernel-6.cfg > index f1d0990..9120862 100644 > --- a/rtems/config/tools/rtems-kernel-6.cfg > +++ b/rtems/config/tools/rtems-kernel-6.cfg > @@ -2,10 +2,10 @@ > # RTEMS 5 > # > > -%define rtems_kernel_version 3ec5f20484cc4201e1d7b87844505644533b6148 > -%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.bz2 \ > - > BjMKrf5n1YR6IpiZrY5TUEzKATPRJxA2/6m6f833DdRu+RyLxccXqA4gHRdVUqFelFNQ3o0XdG4o1naBKYfhkQ== > +%define rtems_kernel_version 3bb97a30b17b6c138dead3e3a6b329c3b301cdb3 > > +%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.gz \ > + > m/ogwrJj4X60ewDIbV6WRj1MJa/22gQHQd56XiNMfvCr0nsvcXdkXKAObLIGYIGYfUyEwlVk3SRjjRFkFalDGQ== > # > # The RTEMS build instructions. > # > diff --git a/rtems/config/tools/rtems-kernel-common.cfg > b/rtems/config/tools/rtems-kernel-common.cfg > index 157c7a4..d5b67dd 100644 > --- a/rtems/config/tools/rtems-kernel-common.cfg > +++ b/rtems/config/tools/rtems-kernel-common.cfg > @@ -9,7 +9,7 @@ > # and BSPs. Only after the source to download. > # > %if %{_dry_run} && %{defined with_download} > - %log Kenrel configuration errors ignored > + %log Kernel configuration errors ignored > %define rtems_kernel_error 0 > %else > %define rtems_kernel_error 1 > @@ -19,10 +19,15 @@ > %define rtems_kernel_version %{rsb_version} > %endif > > +%if %{defined with_rtems_bsp_config} > + %define _target %(%{_topdir}/../source-builder/rtems-kernel-config-check -v > %{rtems_version} -t %{with_rtems_bsp_config}) There is a variable called `_sbdir` that is normally used to find internal helper scripts located in the source builder... https://docs.rtems.org/branches/master/user/rsb/configuration.html#configuration If you add `rtems-kernel-config-check` to `source-builder` it becomes a user facing tool and needs documentation and a controlled user interface. If you use: %{_sbdir}/sb/rtems-kernel-config-check the helper script is internal to the source builder. Is the script internal? > + %define rtems_bsp %(%{_topdir}/../source-builder/rtems-kernel-config-check > -b %{with_rtems_bsp_config}) How are config file errors handled? I normally return `ERROR` or something that can be checked. > +%endif > + > # > # The target. It could be set in rtems_target. > # > -%if %{defined rtems_target} > +%if %{defined rtems_target} && !%{defined with_rtems_bsp_config} > %define _target %{rtems_target} > %endif > %if %{_target} == %{nil} && %{rtems_kernel_error} > @@ -32,10 +37,21 @@ > # > # The BSP. > # > -%if !%{defined with_rtems_bsp} && %{rtems_kernel_error} > +%if !%{defined with_rtems_bsp} && %{rtems_kernel_error} && !%{defined > with_rtems_bsp_config} > %error No RTEMS BSP specified: --with-rtems-bsp=bsp > %endif > -%define rtems_bsp %{with_rtems_bsp} > +%if !%{defined with_rtems_bsp_config} > + %define rtems_bsp %{with_rtems_bsp} > +%endif > + > +# > +# Configuration file used with waf > +# > +%ifn %{defined with_rtems_bsp_config} > + %define config_file config-%{_target}-%{rtems_bsp}.ini > +%else > + %define config_file %{with_rtems_bsp_config} > +%endif > > # > # If no tools are provided use the prefix. > @@ -98,14 +114,6 @@ URL: https://www.rtems.org/ > %define rtems_posix 0 > %endif > > -%if %{defined with_rtems_legacy_network} > - %define rtems_networking 1 > -%endif > - > -%if %{defined with_rtems_cxx} > - %define rtems_cxx 1 > -%endif > - > %if %{defined with_rtems_bspopts} > %define bspopts %{with_rtems_bspopts} > %endif > @@ -143,43 +151,43 @@ URL: https://www.rtems.org/ > # --without-rtems-tests : Supported, forced to no > # --with-rtems-smp : Supported > # --without-rtems-smp: Don't care > -# --with-rtems-legacy-network: Supported > +# --with-rtems-legacy-network: Unsupported > # --without-rtems-legacy-network : Don't care > -# --with-rtems-bspopts : Supported, quote for a list > -# --without-rtems-bspopts: Don't care > -# > %if %{defined without_rtemsbsp} > %error Option --without-rtemsbsp is not supported. > %endif > +%if %{defined with_rtems_legacy_network} > + echo "RTEMS legacy network has been removed." > + echo "Please review and update your configuration." > + exit 1 > +%endif > +%if %{defined enable_cxx} > + echo CXX has been removed." > + echo "Please review and update your configuration." > + exit 1 > +%endif > + > %if %{defined without_rtems_tests} > - %define
RE: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf
ping -Original Message- From: Ryan Long Sent: Wednesday, October 27, 2021 10:09 AM To: devel@rtems.org Cc: Ryan Long Subject: [PATCH RSB v2] rtems-kernel: Implement kernel recipe using waf Closes #4145 --- rtems/config/tools/rtems-kernel-6.cfg | 6 +- rtems/config/tools/rtems-kernel-common.cfg | 125 source-builder/rtems-kernel-config-check | 147 + source-builder/sb/options.py | 135 +- 4 files changed, 283 insertions(+), 130 deletions(-) create mode 100755 source-builder/rtems-kernel-config-check diff --git a/rtems/config/tools/rtems-kernel-6.cfg b/rtems/config/tools/rtems-kernel-6.cfg index f1d0990..9120862 100644 --- a/rtems/config/tools/rtems-kernel-6.cfg +++ b/rtems/config/tools/rtems-kernel-6.cfg @@ -2,10 +2,10 @@ # RTEMS 5 # -%define rtems_kernel_version 3ec5f20484cc4201e1d7b87844505644533b6148 -%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.bz2 \ - BjMKrf5n1YR6IpiZrY5TUEzKATPRJxA2/6m6f833DdRu+RyLxccXqA4gHRdVUqFelFNQ3o0XdG4o1naBKYfhkQ== +%define rtems_kernel_version 3bb97a30b17b6c138dead3e3a6b329c3b301cdb3 +%hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.gz \ + +m/ogwrJj4X60ewDIbV6WRj1MJa/22gQHQd56XiNMfvCr0nsvcXdkXKAObLIGYIGYfUyEwlV +k3SRjjRFkFalDGQ== # # The RTEMS build instructions. # diff --git a/rtems/config/tools/rtems-kernel-common.cfg b/rtems/config/tools/rtems-kernel-common.cfg index 157c7a4..d5b67dd 100644 --- a/rtems/config/tools/rtems-kernel-common.cfg +++ b/rtems/config/tools/rtems-kernel-common.cfg @@ -9,7 +9,7 @@ # and BSPs. Only after the source to download. # %if %{_dry_run} && %{defined with_download} - %log Kenrel configuration errors ignored + %log Kernel configuration errors ignored %define rtems_kernel_error 0 %else %define rtems_kernel_error 1 @@ -19,10 +19,15 @@ %define rtems_kernel_version %{rsb_version} %endif +%if %{defined with_rtems_bsp_config} + %define _target +%(%{_topdir}/../source-builder/rtems-kernel-config-check -v +%{rtems_version} -t %{with_rtems_bsp_config}) %define rtems_bsp +%(%{_topdir}/../source-builder/rtems-kernel-config-check -b +%{with_rtems_bsp_config}) %endif + # # The target. It could be set in rtems_target. # -%if %{defined rtems_target} +%if %{defined rtems_target} && !%{defined with_rtems_bsp_config} %define _target %{rtems_target} %endif %if %{_target} == %{nil} && %{rtems_kernel_error} @@ -32,10 +37,21 @@ # # The BSP. # -%if !%{defined with_rtems_bsp} && %{rtems_kernel_error} +%if !%{defined with_rtems_bsp} && %{rtems_kernel_error} && !%{defined +with_rtems_bsp_config} %error No RTEMS BSP specified: --with-rtems-bsp=bsp %endif -%define rtems_bsp %{with_rtems_bsp} +%if !%{defined with_rtems_bsp_config} + %define rtems_bsp %{with_rtems_bsp} +%endif + +# +# Configuration file used with waf +# +%ifn %{defined with_rtems_bsp_config} + %define config_file config-%{_target}-%{rtems_bsp}.ini +%else + %define config_file %{with_rtems_bsp_config} %endif # # If no tools are provided use the prefix. @@ -98,14 +114,6 @@ URL: https://www.rtems.org/ %define rtems_posix 0 %endif -%if %{defined with_rtems_legacy_network} - %define rtems_networking 1 -%endif - -%if %{defined with_rtems_cxx} - %define rtems_cxx 1 -%endif - %if %{defined with_rtems_bspopts} %define bspopts %{with_rtems_bspopts} %endif @@ -143,43 +151,43 @@ URL: https://www.rtems.org/ # --without-rtems-tests : Supported, forced to no # --with-rtems-smp : Supported # --without-rtems-smp: Don't care -# --with-rtems-legacy-network: Supported +# --with-rtems-legacy-network: Unsupported # --without-rtems-legacy-network : Don't care -# --with-rtems-bspopts : Supported, quote for a list -# --without-rtems-bspopts: Don't care -# %if %{defined without_rtemsbsp} %error Option --without-rtemsbsp is not supported. %endif +%if %{defined with_rtems_legacy_network} echo "RTEMS legacy network +has been removed." + echo "Please review and update your configuration." + exit 1 +%endif +%if %{defined enable_cxx} + echo CXX has been removed." + echo "Please review and update your configuration." + exit 1 +%endif + %if %{defined without_rtems_tests} - %define with_rtems_tests no + %define rtems_tests False + %define rtems_sample_tests False %endif %if %{defined with_rtems_tests} %if %{with_rtems_tests} == 1 - %define with_rtems_tests yes + %define rtems_tests True + %define rtems_sample_tests True %endif - %if %{with_rtems_tests} == yes || \ - %{with_rtems_tests} == no || \ - %{with_rtems_tests} == samples - %define rtems_tests %{with_rtems_tests} + %if %{with_rtems_tests} == samples + %define rtems_tests False + %define rtems_sample_tests True %endif %endif %if %{defined with_rtems_smp} %define rtems_smp 1 %endif -%if %{defined with_rtems_legacy_network} - %define rtems_networking 1