summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-09-02 21:51:21 -0400
committerTom Rini <[email protected]>2022-09-02 21:53:36 -0400
commit98b3a998b31a83d8167f888b11ddd5cce8194f35 (patch)
tree91e5c815982e9f1823f86f61bc49e28d948d1b4c /include
parent2d7069126d11f8708ee38c68b1c6cafae5e50dae (diff)
parent21ddac140e3040b2693c1a5558a84c19a879c04f (diff)
Merge branch '2022-09-02-assorted-improvements' into next
- DM RTC improvements that should help in CI, allow disabling LTO from the make line, add extension (cape, etc) support to distro bootcmd, add a pause command and re-enable ARM v4T support.
Diffstat (limited to 'include')
-rw-r--r--include/config_distro_bootcmd.h32
-rw-r--r--include/test/test.h2
-rw-r--r--include/test/ut.h3
3 files changed, 36 insertions, 1 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index c6e9c497413..2157f3533e5 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -160,11 +160,13 @@
"scan_dev_for_efi=" \
"setenv efi_fdtfile ${fdtfile}; " \
BOOTENV_EFI_SET_FDTFILE_FALLBACK \
+ BOOTENV_RUN_EXTENSION_INIT \
"for prefix in ${efi_dtb_prefixes}; do " \
"if test -e ${devtype} " \
"${devnum}:${distro_bootpart} " \
"${prefix}${efi_fdtfile}; then " \
"run load_efi_dtb; " \
+ BOOTENV_RUN_EXTENSION_APPLY \
"fi;" \
"done;" \
"run boot_efi_bootmgr;" \
@@ -416,6 +418,34 @@
BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
#endif
+#if defined(CONFIG_CMD_EXTENSION)
+#define BOOTENV_RUN_EXTENSION_INIT "run extension_init; "
+#define BOOTENV_RUN_EXTENSION_APPLY "run extension_apply; "
+#define BOOTENV_SET_EXTENSION_NEED_INIT \
+ "extension_need_init=; " \
+ "setenv extension_overlay_addr ${fdtoverlay_addr_r}; "
+#define BOOTENV_SHARED_EXTENSION \
+ "extension_init=" \
+ "echo Extension init...; " \
+ "if ${extension_need_init}; then " \
+ "extension_need_init=false; " \
+ "extension scan; " \
+ "fi\0" \
+ \
+ "extension_overlay_cmd=" \
+ "load ${devtype} ${devnum}:${distro_bootpart} " \
+ "${extension_overlay_addr} ${prefix}${extension_overlay_name}\0" \
+ "extension_apply=" \
+ "if fdt addr -q ${fdt_addr_r}; then " \
+ "extension apply all; " \
+ "fi\0"
+#else
+#define BOOTENV_RUN_EXTENSION_INIT
+#define BOOTENV_RUN_EXTENSION_APPLY
+#define BOOTENV_SET_EXTENSION_NEED_INIT
+#define BOOTENV_SHARED_EXTENSION
+#endif
+
#define BOOTENV_DEV_NAME(devtypeu, devtypel, instance, ...) \
BOOTENV_DEV_NAME_##devtypeu(devtypeu, devtypel, instance, ## __VA_ARGS__)
#define BOOTENV_BOOT_TARGETS \
@@ -435,6 +465,7 @@
BOOTENV_SHARED_UBIFS \
BOOTENV_SHARED_EFI \
BOOTENV_SHARED_VIRTIO \
+ BOOTENV_SHARED_EXTENSION \
"boot_prefixes=/ /boot/\0" \
"boot_scripts=boot.scr.uimg boot.scr\0" \
"boot_script_dhcp=boot.scr.uimg\0" \
@@ -499,6 +530,7 @@
BOOTENV_SET_NVME_NEED_INIT \
BOOTENV_SET_IDE_NEED_INIT \
BOOTENV_SET_VIRTIO_NEED_INIT \
+ BOOTENV_SET_EXTENSION_NEED_INIT \
"for target in ${boot_targets}; do " \
"run bootcmd_${target}; " \
"done\0"
diff --git a/include/test/test.h b/include/test/test.h
index c888d68b1ed..2b68331b546 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -20,6 +20,7 @@
* @testdev: Test device
* @force_fail_alloc: Force all memory allocs to fail
* @skip_post_probe: Skip uclass post-probe processing
+ * @runs_per_test: Number of times to run each test (typically 1)
* @expect_str: Temporary string used to hold expected string value
* @actual_str: Temporary string used to hold actual string value
*/
@@ -32,6 +33,7 @@ struct unit_test_state {
struct udevice *testdev;
int force_fail_alloc;
int skip_post_probe;
+ int runs_per_test;
char expect_str[512];
char actual_str[512];
};
diff --git a/include/test/ut.h b/include/test/ut.h
index 18740f5807c..f7d1d18f7c1 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -403,9 +403,10 @@ void test_set_state(struct unit_test_state *uts);
* @count: Number of tests to run
* @select_name: Name of a single test to run (from the list provided). If NULL
* then all tests are run
+ * @runs_per_test: Number of times to run each test (typically 1)
* Return: 0 if all tests passed, -1 if any failed
*/
int ut_run_list(const char *name, const char *prefix, struct unit_test *tests,
- int count, const char *select_name);
+ int count, const char *select_name, int runs_per_test);
#endif