Changeset 8db33fb in rtems-source-builder
- Timestamp:
- 07/11/19 22:25:15 (4 years ago)
- Branches:
- 5, master
- Children:
- b90b749
- Parents:
- 8922c8b
- git-author:
- Chris Johns <chrisj@…> (07/11/19 22:25:15)
- git-committer:
- Chris Johns <chrisj@…> (07/21/19 11:09:34)
- Files:
-
- 6 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
rtems/config/5/rtems-default.bset
r8922c8b r8db33fb 21 21 tools/rtems-gcc-fb371a33fa6-newlib-5c2a3661c 22 22 tools/rtems-tools-5-1 23 tools/rtems-kernel-5 -
rtems/config/rtems-base.bset
r8922c8b r8db33fb 28 28 # 29 29 %include rtems-urls.bset 30 31 # 32 # Handle the Waf install root. 33 # 34 %ifos win32 mingw ming32 35 %define rtems_waf_build_root_suffix %{waf_build_root_suffix} 36 %else 37 %define rtems_waf_build_root_suffix %{nil} 38 %endif -
rtems/config/rtems-bsp.cfg
r8922c8b r8db33fb 33 33 34 34 # 35 # The target is used by compilers or Cxc builds. 35 # We need a host from the user to specifiy the RTEMS architecture and major 36 # version. It can be defined in rtems_host. 36 37 # 37 %if %{ _target} != %{nil}38 % error RTEMS BSP builds use --host and not --target38 %if %{defined rtems_host} 39 %define _host %{rtems_host} 39 40 %endif 40 41 # 42 # We need a host from the user to specifiy the RTEMS architecture and major 43 # version. 44 # 45 %if %{_host} == %{nil} && %{rtems_bsp_error} 46 %error No RTEMS host or BSP specified: --host=<arch>-rtems<ver> 41 %if %{rtems_bsp_error} 42 %if %{_host} == %{nil} || %{_host} == %{_build} 43 %error No RTEMS host or BSP specified: --host=<arch>-rtems<ver> 44 %endif 47 45 %endif 48 46 … … 52 50 %ifn %{defined with_rtems_bsp} 53 51 %if %{rtems_bsp_error} 54 %error No RTEMS BSP specified: -- rtems-bsp=arch/bsp (or --with-rtems-bsp=bsp)52 %error No RTEMS BSP specified: --with-rtems-bsp=bsp 55 53 %endif 56 54 %define with_rtems_bsp sparc/erc32 … … 62 60 %ifn %{defined with_tools} 63 61 %define with_tools %{_prefix} 62 %define rtems_waf_tools %{nil} 63 %else 64 %define rtems_waf_tools --rtems-tools=%{with_tools} 64 65 %endif 65 66 66 67 %ifn %{defined with_rtems} 67 68 %define with_rtems %{_prefix} 69 %define rtems_waf_rtems %{nil} 70 %else 71 %define rtems_waf_rtems --rtems=%{with_rtems} 68 72 %endif 69 73 … … 92 96 93 97 %if %{rtems_bsp_cflags} == %{nil} && %{rtems_bsp_error} 94 %error No RTEMS BSP CFLAGS found; Please check the -- rtems-bsp option.98 %error No RTEMS BSP CFLAGS found; Please check the --with-rtems-bsp option. 95 99 %endif 96 100 … … 98 102 %define rtems_bsp_ccflags %{rtems_bsp_cflags} 99 103 %endif 104 105 # 106 # The RTEMS BSP architecture/bsp. 107 # 108 %define rtems_bsp_arch_bsp %{_host_arch}/%{rtems_bsp} 100 109 101 110 # … … 157 166 %define host_ldflags %{rtems_bsp_ldflags} 158 167 %define host_libs %{rtems_bsp_libs} 168 169 # 170 # Handle the Waf install root. 171 # 172 %ifos win32 mingw ming32 173 %define rtems_waf_build_root_suffix %{waf_build_root_suffix} 174 %else 175 %define rtems_waf_build_root_suffix %{nil} 176 %endif -
rtems/config/tools/rtems-kernel-4-1.cfg
r8922c8b r8db33fb 4 4 # This configuration file configure's, make's and install's RTEMS. 5 5 # 6 7 %if %{rsb_released} 8 %define rtems_kernel_version %{rsb_version} 9 %else 10 %define rtems_kernel_version %{rtems_version} 11 %endif 12 13 # 14 # Package details. 15 # 16 Name: %{_target}-kernel-%{rtems_kernel_version}-%{release} 17 Summary: RTEMS v%{rtems_kernel_version} for target %{_target} on host %{_host} 18 Version: %{rtems_kernel_version} 19 Release: %{release} 20 URL: http://www.rtems.org/ 21 22 # 23 # Build if the RSB is released or optionally enable/disable building the RTEMS 24 # kernel via the command line. 25 # 26 %if %{rsb_released} || %{defined with_rtems} 27 %define rtems_kernel_build 1 28 %else 29 %define rtems_kernel_build 0 30 %endif 31 %if %{defined without_rtems} 32 %define rtems_kernel_build 0 33 %endif 34 35 %if %{rtems_kernel_build} 36 %include %{_configdir}/checks.cfg 37 %include %{_configdir}/base.cfg 38 %include %{_configdir}/versions.cfg 39 40 # 41 # A magic internal path that would break if changes in the defaults.mc 42 # macro file are made. 43 # 44 %define _internal_autotools_path %{_tmppath}/sb-%{_uid}/${SB_PREFIX_CLEAN} 45 46 # 47 # Check the version of autoconf. Check autoreconf as it is used. 48 # 49 %if %{__autoreconf_ver} <= 2.68 50 %if %{__autoreconf_bindir_ver} <= 2.68 51 %if %{__autoreconf_path_ver} <= 2.68 52 %error Autoconf (autoreconf) version 2.69 or higher is needed. 53 %endif 54 %endif 55 %endif 56 57 # 58 # Source 59 # 60 %if %{rsb_released} 61 %if ! %{defined rtems_kernel_compression} 62 %define rtems_kernel_compression xz 63 %endif 64 %define rtems_kernel_version %{rtems_version} 65 %define rtems_bootstrap 0 66 %else 67 # 68 # The code in git needs to be bootstrapped. Do each build because we have 69 # no way to change what changes may have happened in the code. 70 # 71 %define rtems_bootstrap 1 72 %endif 73 74 %if ! %{defined rtems_kernel_version} 75 %define rtems_kernel_version HEAD 76 %endif 77 %if %{defined rtems_kernel_git_commit_hash} 78 %define rtems_kernel_git_checkout ?checkout=%{defined rtems_kernel_git_commit_hash} 79 %else 80 %define rtems_kernel_git_checkout %{nil} 81 %endif 82 83 %source set rtems git://git.rtems.org/rtems.git?reset=hard?branch=%{rtems_kernel_version}?pull%{rtems_kernel_git_checkout} # 84 # If C++ defined for the tool set use it to control RTEMS's setting.. 85 # 86 %if %{defined enable_cxx} 87 %define rtems_cxx %{enable_cxx} 88 %endif 89 90 # 91 # Default set up. 92 # 93 %ifn %{defined rtems_posix} 94 %define rtems_posix 1 95 %endif 96 %ifn %{defined rtems_networking} 97 %define rtems_networking 1 98 %endif 99 %ifn %{defined rtems_cxx} 100 %define rtems_cxx 1 101 %endif 102 %ifn %{defined rtems_tests} 103 %define rtems_tests samples 104 %endif 105 106 %if %{rtems_tests} == disable 107 %define rtems_tests_opt --disable-tests 108 %else 109 %define rtems_tests_opt --enable-tests=%{rtems_tests} 110 %endif 111 112 # 113 # Check the various --with/--without options we support. 114 # 115 # --with-rtemsbsp : Supported, list of BSPs 116 # --without-rtemsbsp: Not supported 117 # --with-tests : Supported, samples/yes/no 118 # --without-tests : Not supported 119 # --with-smp : Supported 120 # --without-smp : Not care 121 # 122 # 123 %if %{defined without_rtemsbsp} 124 %error Option --without-rtemsbsp is not supported. 125 %endif 126 %if %{defined without_rtems_tests} 127 %define with_rtems_tests no 128 %endif 129 130 # 131 # Prepare the source code. 132 # 133 %prep 134 source_dir_rtems="rtems-%{rtems_kernel_version}" 135 %source setup rtems -q -c -n %{name}-%{version} 136 cd ${source_dir_rtems} 137 %patch setup rtems -p1 138 %if %{rtems_bootstrap} 139 %if %{defined _internal_autotools_path} 140 export PATH="%{_internal_autotools_path}/bin:${PATH}" 141 %endif 142 ./bootstrap -c 143 %{_sbdir}/sb-bootstrap --preinstall 144 %{_sbdir}/sb-bootstrap 145 %endif 146 cd .. 147 148 %build 149 # Build directory support. 150 if test "%{_build}" != "%{_host}" ; then 151 build_dir="build-cxc" 152 else 153 build_dir="build" 154 fi 155 mkdir -p ${build_dir} 156 cd ${build_dir} 157 158 ../${source_dir_rtems}/configure \ 159 --build=%{_build} --host=%{_host} \ 160 --target=%{_target} \ 161 %{?rtems_posix:--enable-posix}%{!?rtems_posix:--disable-posix} \ 162 %{?rtems_networking:--enable-networking}%{!?rtems_networking:--disable-networking} \ 163 %{?rtems_cxx:--enable-cxx}%{!?rtems_cxx:--disable-cxx} \ 164 %{?with_rtems_tests:--enable-tests=%{with_rtems_tests}} \ 165 %{?with_rtemsbsp:--enable-rtemsbsp="%{with_rtemsbsp}"} \ 166 %{?with_rtems_smp:--enable-smp} \ 167 --prefix=%{_prefix} --bindir=%{_bindir} \ 168 --exec-prefix=%{_exec_prefix} \ 169 --includedir=%{_includedir} --libdir=%{_libdir} \ 170 --mandir=%{_mandir} --infodir=%{_infodir} 171 172 %{__make} %{?_smp_mflags} all 173 cd .. 174 175 %install 176 %{__rmdir} $SB_BUILD_ROOT 177 178 cd ${build_dir} 179 %{__make} DESTDIR=$SB_BUILD_ROOT install 180 181 cd .. 182 183 %endif 6 %include tools/rtems-kernel-common.cfg -
rtems/config/tools/rtems-kernel-5.cfg
r8922c8b r8db33fb 3 3 # 4 4 5 %define rtems_kernel_version c4d89deaa66f9878ea5499cae7210d5815afc4fe 6 %hash sha512 rtems-kernel-%{rtems_kernel_version}.tar.bz2 fa4cbcfd9d10be737b91805f1fbaccb7289f3d300a2a7aafef1713d265dd97242d00aba5f1c63ead5a889cfb2148fd9d62c79dcb6f16e61f9fa1290067159b43 7 5 8 # 6 # The RTEMS build instructions. We use 4.xx Release 1.9 # The RTEMS build instructions. 7 10 # 8 %include tools/rtems-kernel- 4-1.cfg11 %include tools/rtems-kernel-common.cfg -
rtems/config/tools/rtems-tools-common-1.cfg
r8922c8b r8db33fb 59 59 %{__rmdir} $SB_BUILD_ROOT 60 60 61 #62 # If on Windows we need to add the driver prefix to the built root as waf63 # strips the driver prefix from the prefix path when joining it to the64 # destdir path. Waf is correct in doing this and the RSB is design to match65 # the configure behaviour which treats the whole path including the drive66 # prefix as part of the path as just a path.67 #68 %ifos win32 mingw ming3269 SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT$(echo %{_prefix} | cut -c 1-2)70 %else71 SB_BUILD_ROOT_WAF=$SB_BUILD_ROOT72 %endif73 74 61 cd ${source_dir_rtems_tools} 75 ./waf --destdir=$SB_BUILD_ROOT _WAFinstall62 ./waf --destdir=$SB_BUILD_ROOT%{rtems_waf_build_root_suffix} install 76 63 cd ${build_top} -
source-builder/defaults.mc
r8922c8b r8db33fb 185 185 __sh: exe, required, '/bin/sh' 186 186 __tar: exe, required, '/usr/bin/tar' 187 __tar_extract: exe, none, '%{__tar} -xvv f'187 __tar_extract: exe, none, '%{__tar} -xvv' 188 188 __touch: exe, required, '/usr/bin/touch' 189 189 __unzip: exe, required, '/usr/bin/unzip' … … 391 391 utf_16,utf_16be,utf_16le,utf_8,win_1250,win_1251,win_1252,\ 392 392 win_1253,win_1254,win_1255,win_1256,win_1257,win_1258''' 393 394 # Waf build root suffix, only use for win32 mingw ming32 OSs 395 # 396 # If on Windows we need to add the driver prefix to the built root as waf 397 # strips the driver prefix from the prefix path when joining it to the 398 # destdir path. Waf is correct in doing this and the RSB is design to match 399 # the configure behaviour which treats the whole path including the drive 400 # prefix as part of the path as just a path. 401 # 402 waf_build_root_suffix: none, none, ' %(echo %{_prefix} | cut -c 1-2)' -
source-builder/sb/build.py
r8922c8b r8db33fb 204 204 not _canadian_cross 205 205 206 def source(self, name ):206 def source(self, name, strip_components): 207 207 # 208 208 # Return the list of sources. Merge in any macro defined sources as … … 247 247 src = download.parse_url(url, '_sourcedir', self.config, self.opts, file_override) 248 248 download.get_file(src['url'], src['local'], self.opts, self.config) 249 if strip_components > 0: 250 tar_extract = '%%{__tar_extract} --strip-components %d' % (strip_components) 251 else: 252 tar_extract = '%{__tar_extract}' 249 253 if 'symlink' in src: 250 254 sname = name.replace('-', '_') … … 256 260 src['script'] = '%s %s' % (src['compressed'], src['local']) 257 261 if src['compressed-type'] != 'zip': 258 src['script'] += ' | % {__tar_extract} -'262 src['script'] += ' | %s -f -' % (tar_extract) 259 263 else: 260 src['script'] = '% %{__tar_extract} %s' % (src['local'])264 src['script'] = '%s -f %s' % (tar_extract, src['local']) 261 265 srcs += [src] 262 266 return srcs … … 267 271 args = args[1:] 268 272 try: 269 opts, args = getopt.getopt(args[1:], 'qDcn:ba ')273 opts, args = getopt.getopt(args[1:], 'qDcn:bas:') 270 274 except getopt.GetoptError as ge: 271 275 raise error.general('source setup error: %s' % str(ge)) … … 277 281 created_dir = False 278 282 changed_dir = False 283 strip_components = 0 279 284 opt_name = None 280 285 for o in opts: … … 291 296 elif o[0] == '-a': 292 297 unpack_before_chdir = False 298 elif o[0] == '-s': 299 if not o[1].isdigit(): 300 raise error.general('source setup error: invalid strip count: %s' % (o[1])) 301 strip_components = int(o[1]) 293 302 name = None 294 for source in self.source(setup_name ):303 for source in self.source(setup_name, strip_components): 295 304 if name is None: 296 305 if opt_name is None: … … 302 311 name = opt_name 303 312 self.script_build.append(self.config.expand('cd %{_builddir}')) 304 if not deleted_dir and 313 if not deleted_dir and delete_before_unpack: 305 314 self.script_build.append(self.config.expand('%{__rm} -rf ' + name)) 306 315 deleted_dir = True -
source-builder/sb/config.py
r8922c8b r8db33fb 505 505 fflags += [f] 506 506 pkg_flags = ' '.join(fflags) 507 log.trace('pkgconfig: %s: %s' % (flags, pkg_flags))507 log.trace('pkgconfig: %s: %s' % (flags, pkg_flags)) 508 508 except pkgconfig.error as pe: 509 self._error('pkgconfig: %s: %s' % (flags, pe))509 self._error('pkgconfig: %s: %s' % (flags, pe)) 510 510 except: 511 511 raise error.internal('pkgconfig failure') … … 720 720 if ls[1] == 'select': 721 721 self.macros.lock_read_map() 722 log.trace('config: %s: %3d: _disable_select: %s' % (self.name, self.lc,722 log.trace('config: %s: %3d: _disable_select: %s' % (self.name, self.lc, 723 723 ls[1])) 724 724 else: … … 730 730 else: 731 731 r = self.macros.set_read_map(ls[1]) 732 log.trace('config: %s: %3d: _select: %s %s %r' % \732 log.trace('config: %s: %3d: _select: %s %s %r' % \ 733 733 (self.name, self.lc, 734 734 r, ls[1], self.macros.maps())) … … 769 769 770 770 def _ifs(self, config, ls, label, iftrue, isvalid, dir, info): 771 log.trace('config: %s: %3d: _ifs[%i]: dir=%s %i %r' % \771 log.trace('config: %s: %3d: _ifs[%i]: dir=%s %i %r' % \ 772 772 (self.name, self.lc, self.if_depth, str(dir), len(ls), ls)) 773 773 in_dir = dir … … 789 789 raise error.general('terminating build') 790 790 if r[1] == '%endif': 791 log.trace('config: %s: %3d: _ifs[%i]: %%endif: dir=%s %s %s %r' % \791 log.trace('config: %s: %3d: _ifs[%i]: %%endif: dir=%s %s %s %r' % \ 792 792 (self.name, self.lc, self.if_depth, 793 793 str(dir), r[1], this_isvalid, data)) … … 825 825 cls = sls 826 826 827 log.trace('config: %s: %3d: _if[%i]: %s' % (self.name, self.lc,827 log.trace('config: %s: %3d: _if[%i]: %s' % (self.name, self.lc, 828 828 self.if_depth, sls)) 829 829 … … 840 840 join_op = 'and' 841 841 cls = cls[1:] 842 log.trace('config: %s: %3d: _if[%i]: joining: %s' % (self.name, self.lc,843 self.if_depth,844 join_op))842 log.trace('config: %s: %3d: _if[%i]: joining: %s' % (self.name, self.lc, 843 self.if_depth, 844 join_op)) 845 845 ori = 0 846 846 andi = 0 … … 848 848 if '||' in cls: 849 849 ori = cls.index('||') 850 log.trace('config: %s: %3d: _if[%i}: OR found at %i' % (self.name, self.lc,851 self.if_depth,852 ori))850 log.trace('config: %s: %3d: _if[%i}: OR found at %i' % (self.name, self.lc, 851 self.if_depth, 852 ori)) 853 853 if '&&' in cls: 854 854 andi = cls.index('&&') 855 log.trace('config: %s: %3d: _if[%i]: AND found at %i' % (self.name, self.lc,856 self.if_depth,857 andi))855 log.trace('config: %s: %3d: _if[%i]: AND found at %i' % (self.name, self.lc, 856 self.if_depth, 857 andi)) 858 858 if ori > 0 or andi > 0: 859 859 if ori == 0: … … 865 865 else: 866 866 i = andi 867 log.trace('config: %s: %3d: _if[%i]: next OP found at %i' % (self.name, self.lc,868 self.if_depth,869 i))867 log.trace('config: %s: %3d: _if[%i]: next OP found at %i' % (self.name, self.lc, 868 self.if_depth, 869 i)) 870 870 ls = cls[:i] 871 871 if len(ls) == 0: … … 964 964 cistrue = istrue 965 965 966 log.trace('config: %s: %3d: _if[%i]: %s %s %s %s' % (self.name, self.lc,967 self.if_depth,968 ifls, str(cistrue),969 join_op, str(istrue)))966 log.trace('config: %s: %3d: _if[%i]: %s %s %s %s' % (self.name, self.lc, 967 self.if_depth, 968 ifls, str(cistrue), 969 join_op, str(istrue))) 970 970 971 971 if invert: … … 976 976 self.if_depth -= 1 977 977 978 log.trace('config: %s: %3d: _if[%i]: %r' % (self.name, self.lc,979 self.if_depth, ifs_return))978 log.trace('config: %s: %3d: _if[%i]: %r' % (self.name, self.lc, 979 self.if_depth, ifs_return)) 980 980 981 981 return ifs_return … … 1037 1037 if len(l) == 0: 1038 1038 continue 1039 log.trace('config: %s: %0d: %s %s' % \ 1040 (self.name, self.lc, str(isvalid), l)) 1039 if isvalid: 1040 indicator = '>' 1041 else: 1042 indicator = ' ' 1043 log.trace('config: %s: %3d:%s%s [%s]' % \ 1044 (self.name, self.lc, indicator, l, str(isvalid))) 1041 1045 lo = l 1042 1046 if isvalid: … … 1091 1095 d = self._if(config, ls, isvalid, dir, info) 1092 1096 if len(d): 1093 log.trace('config: %s: %3d: %%if: %s' % (self.name, self.lc, d))1097 log.trace('config: %s: %3d: %%if: %s' % (self.name, self.lc, d)) 1094 1098 return ('data', d) 1095 1099 elif ls[0] == '%ifn': 1096 1100 d = self._if(config, ls, isvalid, dir, info, True) 1097 1101 if len(d): 1098 log.trace('config: %s: %3d: %%ifn: %s' % (self.name, self.lc, d))1102 log.trace('config: %s: %3d: %%ifn: %s' % (self.name, self.lc, d)) 1099 1103 return ('data', d) 1100 1104 elif ls[0] == '%ifos': … … 1143 1147 for d in self._directive: 1144 1148 if ls[0].strip() == d: 1145 log.trace('config: %s: % 0d:_parse: directive: %s' % \1149 log.trace('config: %s: %3d: _parse: directive: %s' % \ 1146 1150 (self.name, self.lc, ls[0].strip())) 1147 1151 return ('directive', ls[0].strip(), ls[1:]) … … 1177 1181 1178 1182 def _process_data(self, results, directive, info, data): 1179 log.trace('config: %s: %3d: _process_data: result=#%r# directive=#%s# info=#%r# data=#%r#' % \1183 log.trace('config: %s: %3d: _process_data: result=#%r# directive=#%s# info=#%r# data=#%r#' % \ 1180 1184 (self.name, self.lc, results, directive, info, data)) 1181 1185 new_data = [] … … 1193 1197 l = self._expand(l) 1194 1198 ls = self.tags.split(l, 1) 1195 log.trace('config: %s: %3d: _tag: %s %s' % (self.name, self.lc, l, ls))1199 log.trace('config: %s: %3d: _tag: %s %s' % (self.name, self.lc, l, ls)) 1196 1200 if len(ls) > 1: 1197 1201 info = ls[0].lower() … … 1207 1211 else: 1208 1212 l = self._expand(l) 1209 log.trace('config: %s: %3d: _data: %s %s' % (self.name, self.lc, l, new_data))1213 log.trace('config: %s: %3d: _data: %s %s' % (self.name, self.lc, l, new_data)) 1210 1214 new_data.append(l) 1211 1215 return (directive, info, data + new_data) … … 1223 1227 1224 1228 def _directive_extend(self, dir, data): 1225 log.trace('config: %s: %3d: _directive_extend: %s: %r' % (self.name, self.lc, dir, data))1229 log.trace('config: %s: %3d: _directive_extend: %s: %r' % (self.name, self.lc, dir, data)) 1226 1230 self._packages[self.package].directive_extend(dir, data) 1227 1231 … … 1296 1300 1297 1301 try: 1298 log.trace('config: %s: _open: %s' % (self.name, path.host(configname)))1302 log.trace('config: %s: _open: %s' % (self.name, path.host(configname))) 1299 1303 config = open(path.host(configname), 'r') 1300 1304 except IOError as err:
Note: See TracChangeset
for help on using the changeset viewer.