65 Commits

Author SHA1 Message Date
Chris Johns
1ce36943e9 sb/build.py: Output build scripts to trace
- Only remove the build directory when not a dry run
2022-09-09 09:08:09 +10:00
Chris Johns
c51f634258 sb: Fix the imports on Python2
Updates #4037
2020-08-28 11:37:53 +10:00
Chris Johns
650c6f9933 sb: Use shebang env python
Closes #4037
2020-08-25 21:21:50 +10:00
Chris Johns
12418190b9 sb/track: Add a command to track build sets.
- Process a build set for a range of hosts and output a dependency
  tree, the used build set and configuration files.
- Output the configuration files that are no referenced

Closes #4036
2020-08-10 16:19:47 +10:00
Chris Johns
5f7c53a7bd sb: Align the version processing with rtems-tools.
- Use the same VERSION file format as rtems-tools so a common release
  generation can be used.

- The version.py is almost the same as rtems-tools. There are some
  minor differences, one is the RTEMS version is present in this
  file while rtems-tool uses config/rtems-release.ini.

Updates #3822
2019-11-18 11:29:45 +11:00
Chris Johns
591deae6d7 sb/build: Add -E to '%source setup' to handle tar dependency errors.
Tar on Windows raises an error if a symlink appears before the target.
Windows needs the target to exist before a link can be created. This
patch adds support via the -E option to catch the error and rerun the
tar command a second time. The symlink should work as the target should
exist on the second pass.
2019-10-25 14:12:33 +11:00
Chris Johns
4b7af07300 5/llvm: Add LLVM as a package for RTEMS.
- Add '%source download <source>' to only download the source
  and do not unpack and prep. This can used when a package
  internally needs another source package.

- Install the staging root only if it is present. A package
  may internally build another package that is not staged as it
  is not suitable for installing.

Updates #3250
Updatew #3797
2019-09-16 08:21:40 +10:00
Chris Johns
8db33fbe43 rtems: Add kernel, libbsd and BSP building as packages. 2019-07-21 21:09:34 +10:00
Chris Johns
96c414c8ff windows: Remove BuildRoot from all configs, add a short tmp path.
Closes #3562.
2018-11-05 15:46:42 +11:00
Chris Johns
13f4c37999 sb: Add support to search for a suitable version of python.
The command python has been removed from upstream python and python2
and python3 is now used. This patch wraps the commands in a shell
script that locates a suitable python to run.

Updates #3537
2018-10-21 09:49:02 +11:00
Chris Johns
38fd56c8a8 sb: Monitor the build disk usage. Report the usage, total and various sizes
- Track the size of a build of a package in a build set to determine the
  maximum amout of disk space used. This can be used as a guide to
  documenting how much space a user needs to set aside to build a specific
  set of tools.

- The `%clean` stage of a build is now split into a separate script.
  I do not think this is an issue because I could not find any `%clean`
  sections in any build configs we have. In time support for the
  `%clean` section will be removed, the package builder cleans up.

Closes #3516
2018-09-28 07:36:49 +10:00
Chris Johns
6dc551cf47 sb: Move the option check for reporting errors to the error reporter.
Updates #2536.
2017-10-12 13:48:52 +11:00
Chris Johns
383f7e6690 sb: Add --rsb-file options to %source and %patch to set a file name.
Override the automatic file name of a downloaded file and use the file
name provided by the option. This is useful if the URL has no meanful
file that can be automatically extracted from the URL.
2016-04-15 11:59:30 +10:00
Chris Johns
8d0e377a28 sb: Fix the --without-error-report parsing of the label.
Update #2526.
2016-03-14 17:44:04 +11:00
Chris Johns
e8f351915e sb: Fix build's --with-error-report handling.
This reflects changes in the way the --with/--without options are handled.

Updates #2526.
2016-03-14 15:19:29 +11:00
Chris Johns
3a972f6102 sb: Update code base to support Python3 and Python2.
Fix Windows support to allow MSYS2 Python to be used.

Updates #2619.
2016-03-07 15:02:58 +11:00
Chris Johns
610ae576b2 Fix sb-build to reference the opts correctly. 2016-02-24 09:56:07 +11:00
Chris Johns
40e4222d87 Support released downloading of the RTEMS Tools and RTEMS Kernel.
Add a --without-error-reports flags to reduce the noise on --with-downloading.
2015-12-11 12:11:54 +11:00
Chris Johns
47d703fd8c sb. Add VERSION support for releasing the RSB.
Add support to release the RSB by adding the VERSION file. The file
is a single line with the version.

Fix the reports to include the version. Update the INI file
support to include the details of the build.

Show the GIT or released version when the command starts.

Closes #2480.
2015-12-03 22:25:00 +11:00
Chris Johns
6444d5806d Canandian Cross Compiling and RTEMS 3rd party package building Fixes.
The change fixes installing for RTEMS 3rd Party packages where the
RSB considered them Canadian Cross Compiling (Cxc). Fixing the
Cxc issue broke real Cxc builds. The change corrects the issue of
macros being changed in the Cxc and the prep data not being udpated.
The configuration is loaded again after the updated macros. The
macros are also copied and restored to ensure a clean stable base.

The change also introduces --rtems-tools and --rtems-bsp to align
the command line with the waf configure process or RTEMS application.
2015-07-20 13:49:42 +10:00
Chris Johns
d4eb08f55a Windows native build fixes.
The testing of building on Windows is done using MSYS2.
2015-02-07 17:58:17 +11:00
Chris Johns
5fdd664b18 sb: Convert the '-' to '_' in symlinks for git repos. 2014-10-31 15:11:10 +11:00
Chris Johns
53290f9bd7 sb: Add a dry run footer to ereports. 2014-08-14 07:10:52 +10:00
Chris Johns
d3629a9bae sb: Fix sources related bugs.
Updates the sources module introduced bugs in the build and download
modules. The commit fixes those modules.
2014-08-12 12:59:22 +10:00
Chris Johns
a083b52921 Add checksum support for downloaded files.
File download by http, ftp, pw support checksum. The %hash
directive provides a means of setting a hash used to
checksum the file.

Files on disk or just downloaded are checked.
2014-07-29 16:35:43 +10:00
Chris Johns
4900498e33 sb: Remove duplicates from the config file list. 2014-07-25 22:35:36 +10:00
Chris Johns
339f92f89f sb: Tighten the canadian cross compile detection.
A canadian cross compile needs the build, host and target being
different.

Clean up the error handling.
2014-06-15 17:14:16 +12:00
Chris Johns
4a315d364a sb: Fix the source option string for getopts. 2014-06-01 17:57:35 +10:00
Chris Johns
65d94573a5 sb: Move error report generation to the build phase.
Generate a separate report of each package being built in a build set.
This creates a better list of faults in the case of nesting build sets
such as */rtems-all.
2014-05-15 08:49:34 +10:00
Chris Johns
83586f70c4 sb: Fix the formatting string. 2014-05-14 16:43:40 +10:00
Chris Johns
9a15c40e1b sb: Implement %source and %patch to manage source and patches.
Remove the numbered source and patches and automatically manage
sources and patches. This removes the overhead in maintaining large
collections of patches.
2014-05-13 23:26:09 +10:00
Chris Johns
74da24cb61 sb: Generate an error report on an error.
Generate an error report users can send to the mailing list with
error details.
2014-05-08 13:20:29 +10:00
Chris Johns
ebf8a1f0f8 Automtically build the Autotools to bootstrap RTEMS.
This changes adds support to build the autotools if the host installed
version is not a suitable version. Autoconf and automake have hard coded
references to the install prefix and host tools and this makes it impossible
to relocate, that is use in any path other than the install prefix. To
bootstrap automake you need to first build a suitable autoconf and with that
you can built automake for the install prefix. The other complication is
not referencing the install prefix in the path when building in the RSB.
Having the install prefix in the path can result in strange issues appearing
such as gcc using a new assembler feature not present in an older assember
installed under the install prefix.

The process is to build the autotools using an install prefix to an
internal path inside the RSB temporary path and to use that autoconf
to build the version for the install prefix. The internal install
prefix version is also used to bootstrap RTEMS.
2013-07-16 10:02:41 +10:00
Chris Johns
db65c6aaf1 Support Canadian cross builds on FreeBSD (and other hosts).
Set up the rules to manage the separate host and build setting to
allow a Canadian cross to complete.

Update the scripts to move the build directory and host/build
flags into the defaults so they are common for all build
configurations.
2013-05-15 12:15:14 +10:00
Chris Johns
5237f1ccb7 Fix support for Windows (MinGW) native builds using MSYS.
Fix paths that need to be coverted to host format.

The shell expansion needs to invoke a shell on Windows as cmd.exe
will not work.

Munch the paths into smaller sizes for Windows due to the limited
path size.
2013-05-13 14:44:49 +10:00
Chris Johns
f077b2b190 Fixes for CVS to work. Add RTEMS build for sparc/sis. 2013-04-22 22:28:27 +10:00
Chris Johns
5142becd8e Refactor the logging support. 2013-04-21 18:37:02 +10:00
Chris Johns
649a64c0af Add download git support.
Add support to use a git cloned repo as the source. Move the download
code out of the build module and into a separate module. Add to this
module support for git.

Update the GCC common configuration to support using a symlinked
git repo.

Add checks for all languages.
2013-04-16 14:28:34 +10:00
Chris Johns
5e02e80d5a Add --no-download to disable the downloader. 2013-04-15 09:48:42 +10:00
Chris Johns
0565e1fa4b Add support for snapshot testing.
User macro files passed on the command line allow a user to
override the defaults in configuration files to test new changes
in pending releases.

Fix macros issues with keys with more than one map.
2013-04-13 18:29:30 +10:00
Chris Johns
7ed2835f8e Hack in sources and print the macros when tracing. 2013-04-13 10:41:40 +10:00
Chris Johns
cb12e4875c Refactor defaults, macros and options.
To support building snapshots and pre-release source the defaults
has been refactored. The defaults have been moved to a stand alone
file and a macros.py module added. This modile abstracts the
old default dictionary turning it into a class. The macros
class can load macros from a file therefore the defaults have
been moved to a stand alone file.

The use of defaults has been removed from the project. The only
case where it is used in the options where the defaults are read
from a file. Macros are used everywhere now.

The defaults.py has been moved to the option.py and the separate
options and defaults values has been moved to a new pattern. When
constructing an object that needs macros and options if the macros
passed in is None the defaults from the options are used. This makes
it clear when the defaults are being used or when a modified set of
macros is being used.

The macros class support maps. The default is 'global' and where all
the defaults reside and where configuratiion file changes end up.
Maps allow macros to be read from a file and override the values
being maintained in the 'global' map. Reading a macro first checks
the map and if not present checks the 'global' map.

The addition of maps to the macros provides the base to support
snapshots and pre-release testing with standard configurations.
This functionality needs to be added. It works by letting to
specify a snapshot with:

source0: none, override, 'my-dist.tar.bz2'

and it will be used rather the value from the standard configuration.
With a build set you need to also specify the package these macros
are for. The maps provide this.
2013-04-09 13:51:43 +10:00
Chris Johns
efb6688be0 Support a common verion number for all commands. 2013-04-05 09:17:47 +11:00
Chris Johns
0add2eaa70 PR 2108, PR 2109. Add --jobs and --always-clean.
Refactor the options handling in defaults.py to allow the --jobs
option have varing specific parameters. The option supports 'none',
'max' and 'half' or a fraction to divide the number of CPUs or
an integer value which is the number of jobs. The --no-smp has
been removed.

The host specific modules have been changed to set the number of
CPUs in the defaults table.

Fixed the --keep-going to clean up is --always-clean is provided
even if the build has an error.
2013-04-03 14:31:41 +11:00
Chris Johns
4f26bdb2f0 Add Canadian Cross support.
Add support to build MinGW tools using Cygwin. This is a Canadian cross
build.

Do not expand the directives when parsing a configuration file. Hold
in the package object the text as read from the configuration file. Still
parse the logic but leave the macros. This allows a configuration to be
varied when the build happens. The Canadian cross uses this to build a
build compiler used to build a Cxc runtime.

Add Cxc support to the build module. In the defaults add rm and rmfile
macros, add Cxc paths and pre-build script code.

In the setbuilder check for a Cxc build and if so and the package
allow Cxc build the build host version then the host target
version.

Add cygiwn support to the defaults processing and to the Windows module.
2013-04-01 15:19:56 +11:00
Chris Johns
aa4f8f66e0 Generate a better error message. Use the package name in the installing message. 2013-03-15 15:34:24 +11:00
Chris Johns
ce5e9911d9 Store downloaded patches in %{_patchdir}. 2013-03-10 14:50:55 +11:00
Chris Johns
54d76bb037 Provide the main package as a function. 2013-03-04 18:03:19 +11:00
Chris Johns
0759d98628 Move find_configs to build and fix. Install reports to 'rtems-source-builder'. 2013-03-04 10:14:57 +11:00
Chris Johns
a18e76bd85 If %setup -c then always create and change into the directory. 2013-03-02 16:06:59 +11:00