[PATCH 06/11] rtems/kernel: Support a list of BSPs as arch/bsp
chrisj at rtems.org
chrisj at rtems.org
Thu Sep 8 01:26:00 UTC 2022
From: Chris Johns <chrisj at rtems.org>
---
rtems/config/tools/rtems-kernel-common.cfg | 44 +++++++++-------------
1 file changed, 17 insertions(+), 27 deletions(-)
diff --git a/rtems/config/tools/rtems-kernel-common.cfg b/rtems/config/tools/rtems-kernel-common.cfg
index 431fc1d..6466180 100644
--- a/rtems/config/tools/rtems-kernel-common.cfg
+++ b/rtems/config/tools/rtems-kernel-common.cfg
@@ -42,15 +42,18 @@
%endif
%if !%{defined with_rtems_bsp_config}
%define rtems_bsp %{with_rtems_bsp}
+ # If a list the path gets too long
+ %define rtems_bsp_pkgname bsps
%endif
#
# Configuration file used with waf
#
-%ifn %{defined with_rtems_bsp_config}
- %define config_file config-%{_target}-%{rtems_bsp}.ini
+%if !%{defined with_rtems_bsp_config}
+ %define config_file config.ini
%else
%define config_file %{with_rtems_bsp_config}
+ %define rtems_bsp_pkgname %(basename %{with_rtems_bsp_config})
%endif
#
@@ -68,12 +71,12 @@
#
# Define the package.
#
-package: rtems-%{rtems_version}-%{_target}-%{rtems_bsp}-%{_host}-%{release}
+package: rtems-%{rtems_version}-%{_target}-%{rtems_bsp_pkgname}-%{_host}-%{release}
#
# Package details.
#
-Name: %{_target}-kernel-%{rtems_bsp}-%{release}
+Name: %{_target}-kernel-%{rtems_bsp_pkgname}-%{release}
Summary: RTEMS v%{rtems_kernel_version} for target %{_target} BSP %{rtems_bsp}
Version: %{rtems_kernel_version}
Release: %{release}
@@ -83,23 +86,6 @@ URL: https://www.rtems.org/
%include %{_configdir}/base.cfg
%include %{_configdir}/versions.cfg
-#
-# A magic internal path that would break if changes in the defaults.mc
-# macro file are made.
-#
-%define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN}
-
-#
-# Check the version of autoconf. Check autoreconf as it is used.
-#
-%if %{__autoreconf_ver} <= 2.68
- %if %{__autoreconf_bindir_ver} <= 2.68
- %if %{__autoreconf_path_ver} <= 2.68
- %error Autoconf (autoreconf) version 2.69 or higher is needed.
- %endif
- %endif
-%endif
-
#
# If no tools provided use the prefix.
#
@@ -162,7 +148,7 @@ URL: https://www.rtems.org/
exit 1
%endif
%if %{defined enable_cxx}
- echo CXX has been removed."
+ echo "CXX has been removed."
echo "Please review and update your configuration."
exit 1
%endif
@@ -229,20 +215,24 @@ URL: https://www.rtems.org/
cd ${source_dir_rtems}
- %if %{defined without_rtems_bsp_config}
- cpu=`echo %{_target} | cut -d- -f1`
- echo "[${cpu}/%{rtems_bsp}]" > %{config_file}
+ %ifn %{defined with_rtems_bsp_config}
+ echo "[DEFAULT]" > %{config_file}
echo "RTEMS_POSIX_API = %{?rtems_posix:True}%{!?rtems_posix:False}" >> %{config_file}
echo "RTEMS_SMP = %{?rtems_smp:True}%{!?rtems_smp:False}" >> %{config_file}
echo "BUILD_TESTS = %{rtems_tests}" >> %{config_file}
echo "BUILD_SAMPLES = %{rtems_sample_tests}" >> %{config_file}
+ echo "" >> %{config_file}
+ for bsp in %{rtems_bsp}
+ do
+ echo "[$bsp]" >> %{config_file};
+ echo "" >> %{config_file}
+ done
%endif
mkdir -p ${build_dir}
./waf configure \
- --rtems-bsps=%{_target}/%{rtems_bsp} \
- --prefix=%{_prefix} --bindir=%{_bindir} \
+ --prefix=%{_prefix} \
--rtems-config=%{config_file}
./waf %{?_smp_mflags}
--
2.24.1
More information about the devel
mailing list