diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index affe0d3..696efb4 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -12,7 +12,6 @@
 #include <bootflow.h>
 #include <bootmeth.h>
 #include <bootstd.h>
-#include <env.h>
 #include <fs.h>
 #include <log.h>
 #include <malloc.h>
@@ -504,34 +503,13 @@
 	const char *overflow_target = NULL;
 	const char *const *labels;
 	struct udevice *dev;
-	const char *targets;
 	int i, ret, count;
+	bool ok;
 
-	targets = env_get("boot_targets");
-	labels = IS_ENABLED(CONFIG_BOOTSTD_FULL) ?
-		bootstd_get_bootdev_order(bootstd) : NULL;
-	if (targets) {
-		char str[BOOT_TARGETS_MAX_LEN];
-		char *target;
-
-		if (strlen(targets) >= BOOT_TARGETS_MAX_LEN)
-			return log_msg_ret("len", -E2BIG);
-
-		/* make a copy of the string, since strok() will change it */
-		strcpy(str, targets);
-		for (i = 0, target = strtok(str, " "); target;
-		     target = strtok(NULL, " ")) {
-			ret = bootdev_find_by_label(target, &dev);
-			if (!ret) {
-				if (i == max_count) {
-					overflow_target = target;
-					break;
-				}
-				order[i++] = dev;
-			}
-		}
-		count = i;
-	} else if (labels) {
+	labels = bootstd_get_bootdev_order(bootstd, &ok);
+	if (!ok)
+		return log_msg_ret("ord", -ENOMEM);
+	if (labels) {
 		int upto;
 
 		upto = 0;
diff --git a/boot/bootstd-uclass.c b/boot/bootstd-uclass.c
index 7887acd..81555d3 100644
--- a/boot/bootstd-uclass.c
+++ b/boot/bootstd-uclass.c
@@ -10,6 +10,7 @@
 #include <bootflow.h>
 #include <bootstd.h>
 #include <dm.h>
+#include <env.h>
 #include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
@@ -72,9 +73,23 @@
 	return 0;
 }
 
-const char *const *const bootstd_get_bootdev_order(struct udevice *dev)
+const char *const *const bootstd_get_bootdev_order(struct udevice *dev,
+						   bool *okp)
 {
 	struct bootstd_priv *std = dev_get_priv(dev);
+	const char *targets = env_get("boot_targets");
+
+	*okp = true;
+	log_debug("- targets %s %p\n", targets, std->bootdev_order);
+	if (targets && *targets) {
+		str_free_list(std->env_order);
+		std->env_order = str_to_list(targets);
+		if (!std->env_order) {
+			*okp = false;
+			return NULL;
+		}
+		return std->env_order;
+	}
 
 	return std->bootdev_order;
 }
diff --git a/include/bootstd.h b/include/bootstd.h
index 4fa0d53..bd30509 100644
--- a/include/bootstd.h
+++ b/include/bootstd.h
@@ -22,7 +22,10 @@
  * @prefixes: NULL-terminated list of prefixes to use for bootflow filenames,
  *	e.g. "/", "/boot/"; NULL if none
  * @bootdev_order: Order to use for bootdevs (or NULL if none), with each item
- *	being a bootdev label, e.g. "mmc2", "mmc1";
+ *	being a bootdev label, e.g. "mmc2", "mmc1" (NULL terminated)
+ * @env_order: Order as specified by the boot_targets env var (or NULL if none),
+ *	with each item being a bootdev label, e.g. "mmc2", "mmc1" (NULL
+ *	terminated)
  * @cur_bootdev: Currently selected bootdev (for commands)
  * @cur_bootflow: Currently selected bootflow (for commands)
  * @glob_head: Head for the global list of all bootflows across all bootdevs
@@ -34,6 +37,7 @@
 struct bootstd_priv {
 	const char **prefixes;
 	const char **bootdev_order;
+	const char **env_order;
 	struct udevice *cur_bootdev;
 	struct bootflow *cur_bootflow;
 	struct list_head glob_head;
@@ -51,9 +55,13 @@
  * The list is alloced by the bootstd driver so should not be freed. That is the
  * reason for all the const stuff in the function signature
  *
- * Return: list of string points, terminated by NULL; or NULL if no boot order
+ * @dev: bootstd device
+ * @okp: returns true if OK, false if out of memory
+ * Return: list of string pointers, terminated by NULL; or NULL if no boot
+ * order. Note that this returns NULL in the case of an empty list
  */
-const char *const *const bootstd_get_bootdev_order(struct udevice *dev);
+const char *const *const bootstd_get_bootdev_order(struct udevice *dev,
+						   bool *okp);
 
 /**
  * bootstd_get_prefixes() - Get the filename-prefixes list
