[PATCH v2 10/16] passage: Add a qemu test for ARM
Simon Glass
sjg at chromium.org
Mon Jan 17 16:04:22 CET 2022
Check that the standard passage works on ARM, by setting it up in SPL
and making sure that it comes through correctly in U-Boot proper.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Add a devicetree for qemu-arm so that qemu_arm_spl can work
arch/arm/Kconfig | 2 +-
configs/qemu_arm_spl_defconfig | 8 +++++++-
test/py/tests/test_passage.py | 11 +++++++++++
3 files changed, 19 insertions(+), 2 deletions(-)
create mode 100644 test/py/tests/test_passage.py
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 78c6b2e92dc..c4d06d2f1a0 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -974,7 +974,7 @@ config ARCH_QEMU
imply DM_RNG
imply DM_RTC
imply RTC_PL031
- imply OF_HAS_PRIOR_STAGE
+ imply OF_HAS_PRIOR_STAGE if !TARGET_QEMU_ARM_32BIT_SPL
config ARCH_RMOBILE
bool "Renesas ARM SoCs"
diff --git a/configs/qemu_arm_spl_defconfig b/configs/qemu_arm_spl_defconfig
index a6950584542..e91fed8f5e0 100644
--- a/configs/qemu_arm_spl_defconfig
+++ b/configs/qemu_arm_spl_defconfig
@@ -12,6 +12,7 @@ CONFIG_SYS_MALLOC_LEN=0x1000000
CONFIG_DEFAULT_DEVICE_TREE="qemu-arm"
CONFIG_TARGET_QEMU_ARM_32BIT_SPL=y
CONFIG_SPL_SERIAL=y
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x6000
CONFIG_DEBUG_UART_BASE=0x9000000
CONFIG_DEBUG_UART_CLOCK=0
CONFIG_ARMV7_LPAE=y
@@ -28,6 +29,11 @@ CONFIG_USE_PREBOOT=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_PCI_INIT_R=y
+CONFIG_BLOBLIST=y
+CONFIG_BLOBLIST_PASSAGE=y
+CONFIG_SPL_BLOBLIST_ALLOC=y
+CONFIG_BLOBLIST_SIZE=0x4000
+CONFIG_PASSAGE_IN=y
CONFIG_SPL_FRAMEWORK_BOARD_INIT_F=y
CONFIG_CMD_BOOTEFI_SELFTEST=y
CONFIG_CMD_NVEDIT_EFI=y
@@ -37,7 +43,7 @@ CONFIG_CMD_PCI=y
CONFIG_CMD_USB=y
CONFIG_CMD_MTDPARTS=y
CONFIG_SPL_OF_CONTROL=y
-CONFIG_OF_BOARD=y
+CONFIG_OF_PASSAGE=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0x4000000
CONFIG_SPL_DM=y
diff --git a/test/py/tests/test_passage.py b/test/py/tests/test_passage.py
new file mode 100644
index 00000000000..594dc3cc685
--- /dev/null
+++ b/test/py/tests/test_passage.py
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright 2021 Google LLC
+
+import pytest
+
+ at pytest.mark.buildconfigspec('target_qemu_arm_32bit_spl')
+def test_passage(u_boot_console):
+ """Test that the standard passage on ARM from SPL to U-Boot works."""
+
+ response = u_boot_console.run_command('bdinfo')
+ assert 'devicetree = passage' in response
--
2.34.1.703.g22d0c6ccf7-goog
More information about the U-Boot
mailing list