1# Flash map abstraction module
2
3# Copyright (c) 2017 Nordic Semiconductor ASA
4# SPDX-License-Identifier: Apache-2.0
5
6#
7# Flash map
8#
9
10menuconfig FLASH_MAP
11	bool "Flash map abstraction module"
12	depends on FLASH_HAS_DRIVER_ENABLED
13	help
14	  Enable support of flash map abstraction.
15
16if FLASH_MAP
17
18config FLASH_MAP_SHELL
19	bool "Flash map shell interface"
20	depends on SHELL
21	imply FLASH_MAP_LABELS
22	help
23	  This enables shell commands to list and test flash maps.
24
25config FLASH_MAP_CUSTOM
26	bool "Custom flash map description"
27	help
28	  This option enables custom flash map description.
29	  User must provide such a description in place of default on
30	  if had enabled this option.
31
32config FLASH_AREA_CHECK_INTEGRITY
33	bool "Flash check functions"
34	help
35	  If enabled, there will be available the backend to check flash
36	  integrity using SHA-256 verification algorithm.
37
38config FLASH_MAP_LABELS
39	bool "Access flash area labels at runtime"
40	help
41	  If enabled the label property of the flash map can be retrieved
42	  at runtime. The available labels will also be displayed in the
43	  flash_map list shell command.
44
45if FLASH_AREA_CHECK_INTEGRITY
46choice FLASH_AREA_CHECK_INTEGRITY_BACKEND
47	prompt "Crypto backend for the flash check functions"
48	default FLASH_AREA_CHECK_INTEGRITY_TC
49
50config FLASH_AREA_CHECK_INTEGRITY_TC
51	bool "Use TinyCrypt"
52	select TINYCRYPT
53	select TINYCRYPT_SHA256
54	help
55	  Use TinyCrypt library to perform the integrity check.
56
57config FLASH_AREA_CHECK_INTEGRITY_MBEDTLS
58	bool "Use MBEDTLS"
59	select MBEDTLS
60	select MBEDTLS_MD
61	select MBEDTLS_MAC_SHA256_ENABLED
62	select MBEDTLS_ENABLE_HEAP
63	help
64	  Use MBEDTLS library to perform the integrity check.
65
66endchoice
67endif
68
69endif
70