Minos Galanakis | ea42123 | 2019-06-20 17:11:28 +0100 | [diff] [blame^] | 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | """ run_fvp_configs.py: |
| 4 | |
| 5 | Using Python clas inheritance model to generate modular and easily to scale |
| 6 | configuration models for the run_fpv module. Configuration data is also |
| 7 | combined with helper methods. If the file is run as a standalone file, |
| 8 | it can save json configuration files to disk if requested by --export |
| 9 | directive """ |
| 10 | |
| 11 | from __future__ import print_function |
| 12 | |
| 13 | __copyright__ = """ |
| 14 | /* |
| 15 | * Copyright (c) 2018-2019, Arm Limited. All rights reserved. |
| 16 | * |
| 17 | * SPDX-License-Identifier: BSD-3-Clause |
| 18 | * |
| 19 | */ |
| 20 | """ |
| 21 | __author__ = "Minos Galanakis" |
| 22 | __email__ = "minos.galanakis@linaro.org" |
| 23 | __project__ = "Trusted Firmware-M Open CI" |
| 24 | __status__ = "stable" |
| 25 | __version__ = "1.1" |
| 26 | |
| 27 | import sys |
| 28 | from AN521 import AN521 |
| 29 | from AN519 import AN519 |
| 30 | |
| 31 | fvp_config_map = AN521 + AN519 |
| 32 | |
| 33 | if __name__ == "__main__": |
| 34 | # Create Json configuration files on user request |
| 35 | |
| 36 | if len(sys.argv) >= 2: |
| 37 | if sys.argv[1] == "--export": |
| 38 | |
| 39 | for platform in fvp_config_map.get_object_map().values(): |
| 40 | for config in platform.values(): |
| 41 | config.json_to_file() |