From f20078acea88f7c38f14cbc206053e50c313c357 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 12 Sep 2022 10:35:21 +0200 Subject: build: Use enabled by for defaults Merge the "default" and "default-by-variant" attributes. Use an "enabled-by" expression to select the default value based on the enabled set. This makes it possible to select default values depending on other options. For example you could choose memory settings based on whether RTEMS_SMP is enabled or disabled. The change was tested by comparing the output of ./waf bspdefaults before and after the change. --- spec/build/bsps/aarch64/a53/abi.yml | 10 +++++----- spec/build/bsps/aarch64/a53/optloadoff.yml | 5 +++-- spec/build/bsps/aarch64/a53/optnocachelen.yml | 5 +++-- spec/build/bsps/aarch64/a53/optramlen.yml | 5 +++-- spec/build/bsps/aarch64/a53/optramori.yml | 5 +++-- spec/build/bsps/aarch64/a53/tsta53.yml | 3 +-- 6 files changed, 18 insertions(+), 15 deletions(-) (limited to 'spec/build/bsps/aarch64/a53') diff --git a/spec/build/bsps/aarch64/a53/abi.yml b/spec/build/bsps/aarch64/a53/abi.yml index 6401972f76..4374818fbd 100644 --- a/spec/build/bsps/aarch64/a53/abi.yml +++ b/spec/build/bsps/aarch64/a53/abi.yml @@ -7,13 +7,13 @@ build-type: option copyrights: - Copyright (C) 2020 On-Line Applications Research (OAR) default: -- -mcpu=cortex-a53 -default-by-variant: -- value: +- enabled-by: aarch64/a53_ilp32_qemu + value: - -mcpu=cortex-a53 - -mabi=ilp32 - variants: - - aarch64/a53_ilp32_qemu +- enabled-by: true + value: + - -mcpu=cortex-a53 description: | ABI flags enabled-by: true diff --git a/spec/build/bsps/aarch64/a53/optloadoff.yml b/spec/build/bsps/aarch64/a53/optloadoff.yml index bdd9856afc..efdc8a0d8b 100644 --- a/spec/build/bsps/aarch64/a53/optloadoff.yml +++ b/spec/build/bsps/aarch64/a53/optloadoff.yml @@ -7,8 +7,9 @@ actions: build-type: option copyrights: - Copyright (C) 2020 On-Line Applications Research (OAR) -default: 0x00008000 -default-by-variant: [] +default: +- enabled-by: true + value: 0x00008000 description: | offset of RAM region from memory area base enabled-by: true diff --git a/spec/build/bsps/aarch64/a53/optnocachelen.yml b/spec/build/bsps/aarch64/a53/optnocachelen.yml index 8655f7a6dd..989354af2e 100644 --- a/spec/build/bsps/aarch64/a53/optnocachelen.yml +++ b/spec/build/bsps/aarch64/a53/optnocachelen.yml @@ -7,8 +7,9 @@ actions: build-type: option copyrights: - Copyright (C) 2020 On-Line Applications Research (OAR) -default: 0x00100000 -default-by-variant: [] +default: +- enabled-by: true + value: 0x00100000 description: | length of nocache RAM region enabled-by: true diff --git a/spec/build/bsps/aarch64/a53/optramlen.yml b/spec/build/bsps/aarch64/a53/optramlen.yml index 2d84831938..452587021f 100644 --- a/spec/build/bsps/aarch64/a53/optramlen.yml +++ b/spec/build/bsps/aarch64/a53/optramlen.yml @@ -7,8 +7,9 @@ actions: build-type: option copyrights: - Copyright (C) 2020 On-Line Applications Research (OAR) -default: 0x08000000 -default-by-variant: [] +default: +- enabled-by: true + value: 0x08000000 description: | length of memory area available to the BSP enabled-by: true diff --git a/spec/build/bsps/aarch64/a53/optramori.yml b/spec/build/bsps/aarch64/a53/optramori.yml index 9601637c0e..58e4ec0082 100644 --- a/spec/build/bsps/aarch64/a53/optramori.yml +++ b/spec/build/bsps/aarch64/a53/optramori.yml @@ -7,8 +7,9 @@ actions: build-type: option copyrights: - Copyright (C) 2020 On-Line Applications Research (OAR) -default: 0x40000000 -default-by-variant: [] +default: +- enabled-by: true + value: 0x40000000 description: | base address of memory area available to the BSP enabled-by: true diff --git a/spec/build/bsps/aarch64/a53/tsta53.yml b/spec/build/bsps/aarch64/a53/tsta53.yml index c8a258acfe..a3d8c9810d 100644 --- a/spec/build/bsps/aarch64/a53/tsta53.yml +++ b/spec/build/bsps/aarch64/a53/tsta53.yml @@ -38,8 +38,7 @@ actions: build-type: option copyrights: - Copyright (C) 2020 On-Line Applications Research (OAR) -default: null -default-by-variant: [] +default: [] description: '' enabled-by: true links: [] -- cgit v1.2.3