Hello,

the new build system is now ready for integration. You find the latest documentation here:

https://ftp.rtems.org/pub/rtems/people/sebh/user.pdf

https://ftp.rtems.org/pub/rtems/people/sebh/eng.pdf

You can review the new build system for RTEMS BSPs here:

git clone git://git.rtems.org/sebh/rtems.git
cd rtems
git checkout --track origin/build

The new build system builds all BSPs and all tests (including the Ada tests). I tested the build on OpenSUSE 15.1, MinGW64, MSYS2, and FreeBSD 12.1.

The build specification consists of

find spec -name '*.yml' -and -not -name .doorstop.yml | wc
   2011    2011  136959

YAML files. From these only 18 have hand-crafted content:

grep -r 'build-type: script' spec/ | sort
spec/build/bsps/powerpc/motorola_powerpc/RTEMS-BUILD-BSP-POWERPC-MOTOROLAPOWERPC-BOOT.yml:build-type: script spec/build/bsps/powerpc/motorola_powerpc/RTEMS-BUILD-BSP-POWERPC-MOTOROLAPOWERPC-QEMUFAKEROM.yml:build-type: script spec/build/bsps/powerpc/mvme5500/RTEMS-BUILD-BSP-POWERPC-MVME5500-START.yml:build-type: script
spec/build/bsps/powerpc/RTEMS-BUILD-BSP-POWERPC-MOTLD.yml:build-type: script
spec/build/bsps/RTEMS-BUILD-BSP-LINKCMDS.yml:build-type: script
spec/build/cpukit/RTEMS-BUILD-CPUKIT-VCKEY.yml:build-type: script
spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL01.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL02.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL04.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL05.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL06.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL07.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL08.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL09.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-DL10.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-MGHTTPD01.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-TAR01.yml:build-type: script spec/build/testsuites/libtests/RTEMS-BUILD-TEST-LIB-TAR02.yml:build-type: script

So, more than 99% of the build specification is done through standard items. The attached script can be used to load the content of all items into a standard Python data structure (dictionaries, lists, strings, integers). The next person doing a new build system will have a much easier task, no more parsing of Makefile.am, configure.ac, *.cfg, and *.tcfg files.

My proposed next steps are:

1. I push the source and documentation patches next Monday to the main repositories.

2. I make it harder to use the existing build system. I add a --I-only-want-to-compare-results-with-the-new-build-system" to the top-level configure script. If this option is not present, then the build stops with an error. This basically disables the normal use.

3. I create a new ticket with a build system conversion checklist.

4. We announce a four month period in which we keep the old build system in the sources. Everyone is encouraged to test the new build system with the help of the checklist. The new build system should be used, fixed and improved.

5. If the new build system shows satisfactory results after the testing period, we remove the old one.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
#!/usr/bin/env python

# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (C) 2019 embedded brains GmbH
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

import os
import stat
import yaml

def load_from_yaml(data_by_uid, path):
    names = os.listdir(path)
    for name in names:
        path2 = os.path.join(path, name)
        if name.endswith(".yml") and not name.startswith("."):
            uid = os.path.basename(name).replace(".yml", "")
            with open(path2, "r") as f:
                data_by_uid[uid] = yaml.safe_load(f.read())
        else:
            mode = os.lstat(path2).st_mode
            if stat.S_ISDIR(mode):
                load_from_yaml(data_by_uid, path2)

data_by_uid = {}
load_from_yaml(data_by_uid, "spec")
print(data_by_uid)
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to