From 4243be3a4b4111f738d6edd81cb2d6277c3cd945 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Fri, 11 Feb 2022 12:50:01 -0800 Subject: [PATCH] tools: leave out kconf platform targets --- .github/workflows/build_docker.yml | 4 +- Tools/generate_board_targets_json.py | 76 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index e1f4fb4c66..f3be528821 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -108,9 +108,9 @@ jobs: with: python-version: 3.9 - - name: Install Python packages + #- name: Install Python packages #run: pip install -r Tools/setup/requirements.txt - run: pip install kconfiglib + #run: pip install kconfiglib - id: set-matrix name: Get all nuttx targets diff --git a/Tools/generate_board_targets_json.py b/Tools/generate_board_targets_json.py index 52ecad33c8..d89c6c81c0 100755 --- a/Tools/generate_board_targets_json.py +++ b/Tools/generate_board_targets_json.py @@ -6,14 +6,14 @@ import os import sys import json import re -from kconfiglib import Kconfig +# from kconfiglib import Kconfig -kconf = Kconfig() +# kconf = Kconfig() # Supress warning output -kconf.warn_assign_undef = False -kconf.warn_assign_override = False -kconf.warn_assign_redun = False +# kconf.warn_assign_undef = False +# kconf.warn_assign_override = False +# kconf.warn_assign_redun = False source_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..') @@ -49,46 +49,46 @@ bloaty_helpers = [ 'bloaty_compare_master', ] -def process_target(px4board_file, target_name): - ret = None - platform = None - toolchain = None +# def process_target(px4board_file, target_name): + # ret = None + # platform = None + # toolchain = None - if px4board_file.endswith("default.px4board") or \ - px4board_file.endswith("recovery.px4board") or \ - px4board_file.endswith("bootloader.px4board"): - kconf.load_config(px4board_file, replace=True) - else: # Merge config with default.px4board - default_kconfig = re.sub(r'[a-zA-Z\d_]+\.px4board', 'default.px4board', px4board_file) - kconf.load_config(default_kconfig, replace=True) - kconf.load_config(px4board_file, replace=False) + # if px4board_file.endswith("default.px4board") or \ + # px4board_file.endswith("recovery.px4board") or \ + # px4board_file.endswith("bootloader.px4board"): + # kconf.load_config(px4board_file, replace=True) + # else: # Merge config with default.px4board + # default_kconfig = re.sub(r'[a-zA-Z\d_]+\.px4board', 'default.px4board', px4board_file) + # kconf.load_config(default_kconfig, replace=True) + # kconf.load_config(px4board_file, replace=False) - if "BOARD_TOOLCHAIN" in kconf.syms: - toolchain = kconf.syms["BOARD_TOOLCHAIN"].str_value + # if "BOARD_TOOLCHAIN" in kconf.syms: + # toolchain = kconf.syms["BOARD_TOOLCHAIN"].str_value - if "BOARD_PLATFORM" in kconf.syms: - platform = kconf.syms["BOARD_PLATFORM"].str_value + # if "BOARD_PLATFORM" in kconf.syms: + # platform = kconf.syms["BOARD_PLATFORM"].str_value - assert platform, f"PLATFORM not found in {px4board_file}" + # assert platform, f"PLATFORM not found in {px4board_file}" - if platform not in excluded_platforms: - # get the container based on the platform and toolchain - container = platform - if platform == 'posix': - container = 'base-focal' - if toolchain: - if toolchain.startswith('aarch64'): - container = 'aarch64' - elif toolchain == 'arm-linux-gnueabihf': - container = 'armhf' - else: - if verbose: print(f'possibly unmatched toolchain: {toolchain}') - elif platform == 'nuttx': - container = 'nuttx-focal' + # if platform not in excluded_platforms: + # # get the container based on the platform and toolchain + # container = platform + # if platform == 'posix': + # container = 'base-focal' + # if toolchain: + # if toolchain.startswith('aarch64'): + # container = 'aarch64' + # elif toolchain == 'arm-linux-gnueabihf': + # container = 'armhf' + # else: + # if verbose: print(f'possibly unmatched toolchain: {toolchain}') + # elif platform == 'nuttx': + # container = 'nuttx-focal' - ret = {'target': target_name, 'container': container} + # ret = {'target': target_name, 'container': container} - return ret + # return ret def process_bloaty(target_path, target_name): response = []