Skip to content

Commit 892f60b

Browse files
gordonklausrlubos
authored andcommitted
[nrf noup] tests: bluetooth: tester: Enable PSA RNG on nRF54H20
The PSA is a cryptographically secure random number generator. It will be enabled by default, eventually, For now, enable it manually. Signed-off-by: Gordon Klaus <[email protected]> (cherry picked from commit 55f401b)
1 parent 730c36b commit 892f60b

File tree

6 files changed

+97
-7
lines changed

6 files changed

+97
-7
lines changed

tests/bluetooth/tester/boards/nrf54h20dk_nrf54h20_cpuapp.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ CONFIG_LOG_DEFAULT_LEVEL=3
2222
CONFIG_BTTESTER_LOG_LEVEL_DBG=y
2323

2424
CONFIG_UART_INTERRUPT_DRIVEN=y
25+
26+
# Enable PSA RNG
27+
CONFIG_PSA_CRYPTO_DRIVER_OBERON=n
28+
CONFIG_PSA_SSF_CRYPTO_CLIENT=y
29+
CONFIG_SSF_PSA_CRYPTO_SERVICE_ENABLED=y
30+
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
31+
CONFIG_NRF_SECURITY=y

tests/bluetooth/tester/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,17 @@
1212
status = "okay";
1313
hw-flow-control;
1414
};
15+
16+
// Enable PSA RNG
17+
/ {
18+
chosen {
19+
zephyr,entropy = &psa_rng;
20+
};
21+
22+
psa_rng: psa-rng {
23+
compatible = "zephyr,psa-crypto-rng";
24+
status = "okay";
25+
};
26+
27+
/delete-node/ prng;
28+
};

tests/bluetooth/tester/sysbuild.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ if(SB_CONFIG_NET_CORE_IMAGE_HCI_IPC)
1818
)
1919
endif()
2020

21-
if(SB_CONFIG_SOC_NRF54H20_CPUAPP)
22-
set(${NET_APP}_CONF_FILE
23-
${NET_APP_SRC_DIR}/nrf54h20_cpurad-bt_ll_softdevice.conf
24-
CACHE INTERNAL ""
25-
)
26-
endif()
27-
2821
set(${NET_APP}_EXTRA_CONF_FILE
2922
${APP_DIR}/overlay-bt_ll_sw_split.conf
3023
CACHE INTERNAL ""
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
CONFIG_IPC_SERVICE=y
2+
CONFIG_MBOX=y
3+
4+
CONFIG_ISR_STACK_SIZE=1024
5+
CONFIG_IDLE_STACK_SIZE=256
6+
CONFIG_MAIN_STACK_SIZE=1024
7+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
8+
CONFIG_IPC_SERVICE_BACKEND_RPMSG_WQ_STACK_SIZE=512
9+
CONFIG_HEAP_MEM_POOL_SIZE=8192
10+
11+
CONFIG_BT=y
12+
CONFIG_BT_HCI_RAW=y
13+
14+
CONFIG_BT_BUF_EVT_RX_COUNT=16
15+
CONFIG_BT_BUF_EVT_RX_SIZE=255
16+
CONFIG_BT_BUF_ACL_RX_SIZE=255
17+
CONFIG_BT_BUF_ACL_TX_SIZE=251
18+
CONFIG_BT_BUF_CMD_TX_SIZE=255
19+
20+
# Host
21+
CONFIG_BT_BROADCASTER=y
22+
CONFIG_BT_PERIPHERAL=y
23+
CONFIG_BT_OBSERVER=y
24+
CONFIG_BT_CENTRAL=y
25+
CONFIG_BT_EXT_ADV=y
26+
CONFIG_BT_PER_ADV=y
27+
CONFIG_BT_PER_ADV_SYNC=y
28+
29+
# Controller
30+
CONFIG_BT_LL_SW_SPLIT=n
31+
CONFIG_BT_LL_SOFTDEVICE=y
32+
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
33+
CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX=191
34+
35+
# Enable PSA RNG
36+
CONFIG_PSA_CRYPTO_DRIVER_OBERON=n
37+
CONFIG_PSA_SSF_CRYPTO_CLIENT=y
38+
CONFIG_SSF_PSA_CRYPTO_SERVICE_ENABLED=y
39+
CONFIG_MBEDTLS_PSA_CRYPTO_C=y
40+
CONFIG_NRF_SECURITY=y
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Enable PSA RNG
2+
/ {
3+
chosen {
4+
zephyr,entropy = &psa_rng;
5+
};
6+
7+
psa_rng: psa-rng {
8+
compatible = "zephyr,psa-crypto-rng";
9+
status = "okay";
10+
};
11+
12+
/delete-node/ prng;
13+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
CONFIG_IPC_SERVICE=y
2+
CONFIG_MBOX=y
3+
4+
CONFIG_HEAP_MEM_POOL_SIZE=4096
5+
6+
CONFIG_MAIN_STACK_SIZE=512
7+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
8+
9+
CONFIG_BT=y
10+
CONFIG_BT_HCI_RAW=y
11+
CONFIG_BT_MAX_CONN=16
12+
13+
14+
# Workaround: Unable to allocate command buffer when using K_NO_WAIT since
15+
# Host number of completed commands does not follow normal flow control.
16+
CONFIG_BT_BUF_CMD_TX_COUNT=10
17+
18+
# Enable and adjust the below value as necessary
19+
# CONFIG_BT_BUF_EVT_RX_COUNT=16
20+
# CONFIG_BT_BUF_EVT_RX_SIZE=255
21+
# CONFIG_BT_BUF_ACL_RX_SIZE=255
22+
# CONFIG_BT_BUF_ACL_TX_SIZE=251
23+
# CONFIG_BT_BUF_CMD_TX_SIZE=255

0 commit comments

Comments
 (0)