How to set values depending on BSP options in spec files?

Sebastian Huber sebastian.huber at
Thu Nov 26 13:15:08 UTC 2020

Hello Jan,

On 26/11/2020 13:41, Jan.Sommer at wrote:
> For 2.) I essentially only have to update the ARM_MMU_TRANSLATION_TABLE_SIZE to the right value.
> The default value of 16kiB is set in arm/optmmusz.yml. For option ARM_MMU_USE_SMALL_PAGES enabled this would need to be 4MiB+16kiB.
> How would I achieve to set the MMU table size dependent on the ARM_MMU_USE_SMALL_PAGES option?
> Would it be somewhere in xilinx-zynq/grp.yml?
no, this just collects build items.
> Or in the arm/optmmusz.yml somehow with the "default-by-variant" mechanism.
No, because you want to do something depending on a particular option 
value and not a BSP variant.
> Or would I create an new xilinx-zynq/optmmusz.yml and define it there?

You should give the user only one option to set a thing and not several 
which may result in conflicting values. So, I would derive the value of 
you can use a "script" action, see for example:


You could add a script to spec/build/bsps/arm/optmmusmallpages.yml:

SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
- get-boolean: null
- define-condition: null

- script: |
     if value:




build-type: option
- Copyright (C) 2020 embedded brains GmbH (
default: true
default-by-variant: []
description: |
   Use MMU with small pages (4KiB)
enabled-by: true
links: []
type: build

> Or something else?

You could also use a script item:


embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
email: sebastian.hubere at
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:

More information about the devel mailing list