How to set values depending on BSP options in spec files?
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Nov 26 13:15:08 UTC 2020
Hello Jan,
On 26/11/2020 13:41, Jan.Sommer at dlr.de 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
ARM_MMU_TRANSLATION_TABLE_SIZE from ARM_MMU_USE_SMALL_PAGES. For this
you can use a "script" action, see for example:
spec/build/bsps/arm/stm32h7/optvariant.yml
You could add a script to spec/build/bsps/arm/optmmusmallpages.yml:
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
actions:
- get-boolean: null
- define-condition: null
- script: |
if value:
...
else:
....
build-type: option
copyrights:
- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
default: true
default-by-variant: []
description: |
Use MMU with small pages (4KiB)
enabled-by: true
links: []
name: ARM_MMU_USE_SMALL_PAGES
type: build
> Or something else?
You could also use a script item:
spec/build/bsps/arm/stm32h7/linkcmdssdram.yml
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hubere at embedded-brains.de
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:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list