[Concept,10/12] bootstd: Show entry column in bootflow list

Message ID 20260324221911.3678307-11-sjg@u-boot.org
State New
Headers
Series bootstd: Support multiple bootflows per partition |

Commit Message

Simon Glass March 24, 2026, 10:19 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Add an 'Ent' column to the bootflow list output between Part and E
(encrypted). For bootmeths with BOOTMETHF_MULTI, this shows the entry
number. For others it is blank, since bootmeth_id is -1

This makes multi-entry bootflows distinguishable in the list output
without having to use 'bootflow info' on each one.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 boot/bootflow.c                  |  15 ++++-
 cmd/bootflow.c                   |   6 +-
 doc/board/emulation/qemu-arm.rst |   4 +-
 doc/board/emulation/qemu-x86.rst |   4 +-
 doc/board/samsung/e850-96.rst    |   6 +-
 doc/usage/cmd/bootflow.rst       | 104 ++++++++++++++++---------------
 doc/usage/cmd/bootstd.rst        |  14 ++---
 doc/usage/cmd/history.rst        |   8 +--
 test/boot/bootflow.c             |  70 ++++++++++-----------
 9 files changed, 121 insertions(+), 110 deletions(-)
  

Patch

diff --git a/boot/bootflow.c b/boot/bootflow.c
index 4247093548b..ff98cc4aa56 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -110,11 +110,22 @@  void bootflow_show(int index, struct bootflow *bflow, bool errors)
 {
 	const char *name = bootflow_guess_label(bflow);
 	char enc_mark = (bflow->flags & BOOTFLOWF_ENCRYPTED) ? 'E' : ' ';
+	char ent_str[8];
 
-	printf("%3x  %-11s  %-6s  %-9.9s %4x  %c  %-25.25s %s\n", index,
+	strcpy(ent_str, "   ");
+	if (bflow->method) {
+		struct bootmeth_uc_plat *ucp;
+
+		ucp = dev_get_uclass_plat(bflow->method);
+		if (ucp->flags & BOOTMETHF_MULTI)
+			snprintf(ent_str, sizeof(ent_str), "%3d",
+				 bflow->entry);
+	}
+
+	printf("%3x  %-11s  %-6s  %-9.9s %4x  %s  %c  %-25.25s %s\n", index,
 	       bflow->method ? bflow->method->name : "(none)",
 	       bootflow_state_get_name(bflow->state), name, bflow->part,
-	       enc_mark, bflow->name, bflow->fname ?: "");
+	       ent_str, enc_mark, bflow->name, bflow->fname ?: "");
 	if (errors)
 		report_bootflow_err(bflow, bflow->err);
 }
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index a701b960efe..5ba34d09760 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -22,13 +22,13 @@ 
 
 static void show_header(void)
 {
-	printf("Seq  Method       State   Uclass    Part  E  Name                      Filename\n");
-	printf("---  -----------  ------  --------  ----  -  ------------------------  ----------------\n");
+	printf("Seq  Method       State   Uclass    Part  Ent  E  Name                      Filename\n");
+	printf("---  -----------  ------  --------  ----  ---  -  ------------------------  ----------------\n");
 }
 
 static void show_footer(int count, int num_valid)
 {
-	printf("---  -----------  ------  --------  ----  -  ------------------------  ----------------\n");
+	printf("---  -----------  ------  --------  ----  ---  -  ------------------------  ----------------\n");
 	printf("(%d bootflow%s, %d valid)\n", count, count != 1 ? "s" : "",
 	       num_valid);
 }
diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
index b03cb882c86..d6a74a6a077 100644
--- a/doc/board/emulation/qemu-arm.rst
+++ b/doc/board/emulation/qemu-arm.rst
@@ -156,8 +156,8 @@  The output will be something like this::
     Net:   eth0: virtio-net#32
     Hit any key to stop autoboot:  0
     Scanning for bootflows in all bootdevs
-    Seq  Method       State   Uclass    Part  Name                      Filename
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    Seq  Method       State   Uclass    Part  Ent  Name                      Filename
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     Scanning global bootmeth 'efi_mgr':
     Scanning bootdev 'fw-cfg@9020000.bootdev':
     fatal: no kernel available
diff --git a/doc/board/emulation/qemu-x86.rst b/doc/board/emulation/qemu-x86.rst
index 27f0d273f38..8d7ce2f365a 100644
--- a/doc/board/emulation/qemu-x86.rst
+++ b/doc/board/emulation/qemu-x86.rst
@@ -154,8 +154,8 @@  The output will be something like this::
           eth0: e1000#0
    Hit any key to stop autoboot:  0
    Scanning for bootflows in all bootdevs
-   Seq  Method       State   Uclass    Part  Name                      Filename
-   ---  -----------  ------  --------  ----  ------------------------  ----------------
+   Seq  Method       State   Uclass    Part  Ent  Name                      Filename
+   ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
    Scanning global bootmeth 'efi_mgr':
    Hunting with: nvme
    Hunting with: qfw
diff --git a/doc/board/samsung/e850-96.rst b/doc/board/samsung/e850-96.rst
index 2b66e6568fb..5e4f514e65e 100644
--- a/doc/board/samsung/e850-96.rst
+++ b/doc/board/samsung/e850-96.rst
@@ -682,9 +682,9 @@  To enable PXE boot:
 2. Check if ``'pxe'`` boot method is present in ``'bootflow scan -l'`` output.
    It should look like this::
 
-     Seq  Method       State   Uclass    Part  Name                      Filename
-     ---  -----------  ------  --------  ----  ------------------------  ----------------
-       5  pxe          ready   ethernet     0  smsc95xx_eth.bootdev.0    extlinux/extlinux.conf
+     Seq  Method       State   Uclass    Part  Ent  Name                      Filename
+     ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
+       5  pxe          ready   ethernet     0    0  smsc95xx_eth.bootdev.0    extlinux/extlinux.conf
 
 3. Select and boot it:
 
diff --git a/doc/usage/cmd/bootflow.rst b/doc/usage/cmd/bootflow.rst
index 6a1676a6098..03019e5196a 100644
--- a/doc/usage/cmd/bootflow.rst
+++ b/doc/usage/cmd/bootflow.rst
@@ -103,12 +103,12 @@  those errors.
 
 The list looks something like this:
 
-===  ======  ======  ========  ====  ===============================   ================
-Seq  Method  State   Uclass    Part  Name                              Filename
-===  ======  ======  ========  ====  ===============================   ================
-  0  distro  ready   mmc          2  mmc\@7e202000.bootdev.part_2      /boot/extlinux/extlinux.conf
-  1  pxe     ready   ethernet     0  smsc95xx_eth.bootdev.0            rpi.pxe/extlinux/extlinux.conf
-===  ======  ======  ========  ====  ===============================   ================
+===  ======  ======  ========  ====  ===  ===============================   ================
+Seq  Method  State   Uclass    Part  Ent  Name                              Filename
+===  ======  ======  ========  ====  ===  ===============================   ================
+  0  distro  ready   mmc          2    0  mmc\@7e202000.bootdev.part_2      /boot/extlinux/extlinux.conf
+  1  pxe     ready   ethernet     0    0  smsc95xx_eth.bootdev.0            rpi.pxe/extlinux/extlinux.conf
+===  ======  ======  ========  ====  ===  ===============================   ================
 
 The fields are as follows:
 
@@ -132,6 +132,12 @@  Part:
     have a partition table with a small number of partitions. For devices
     without partition tables (e.g. network) this field is 0.
 
+Ent:
+    Entry index within this partition, for boot methods that support multiple
+    entries (``BOOTMETHF_MULTI``). For example, an extlinux config with
+    several labels shows 0, 1, 2, etc. Blank for boot methods that produce
+    only one bootflow per partition.
+
 Name:
     Name of the bootflow. This is generated from the bootdev appended with
     the partition information
@@ -295,10 +301,10 @@  Here is an example of scanning for bootflows, then listing them::
 
     U-Boot> bootflow scan -l
     Scanning for bootflows in all bootdevs
-    Seq  Type         State   Uclass    Part  Name                      Filename
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    Seq  Type         State   Uclass    Part  Ent  Name                      Filename
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     Scanning bootdev 'mmc@7e202000.bootdev':
-      0  distro       ready   mmc          2  mmc@7e202000.bootdev.p    /extlinux/extlinux.conf
+      0  distro       ready   mmc          2    0  mmc@7e202000.bootdev.p    /extlinux/extlinux.conf
     Scanning bootdev 'sdhci@7e300000.bootdev':
     Card did not respond to voltage select! : -110
     Scanning bootdev 'smsc95xx_eth.bootdev':
@@ -324,17 +330,17 @@  Here is an example of scanning for bootflows, then listing them::
     	 45.9 KiB/s
     done
     Bytes transferred = 566 (236 hex)
-      1  distro       ready   ethernet     0  smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf
+      1  distro       ready   ethernet     0    0  smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf
     No more bootdevs
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     (2 bootflows, 2 valid)
     U-Boot> bootflow l
     Showing all bootflows
-    Seq  Type         State   Uclass    Part  Name                      Filename
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
-      0  distro       ready   mmc          2  mmc@7e202000.bootdev.p    /extlinux/extlinux.conf
-      1  pxe          ready   ethernet     0  smsc95xx_eth.bootdev.0     rpi.pxe/extlinux/extlinux.conf
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    Seq  Type         State   Uclass    Part  Ent  Name                      Filename
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
+      0  distro       ready   mmc          2    0  mmc@7e202000.bootdev.p    /extlinux/extlinux.conf
+      1  pxe          ready   ethernet     0    0  smsc95xx_eth.bootdev.0     rpi.pxe/extlinux/extlinux.conf
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     (2 bootflows, 2 valid)
 
 
@@ -420,10 +426,10 @@  Here we scan for bootflows and boot the first one found::
 
     U-Boot> bootflow scan -bl
     Scanning for bootflows in all bootdevs
-    Seq  Method       State   Uclass    Part  Name                    Filename
-    ---  -----------  ------  --------  ----  ----------------------  ----------------
+    Seq  Method       State   Uclass    Part  Ent  Name                    Filename
+    ---  -----------  ------  --------  ----  ---  ----------------------  ----------------
     Scanning bootdev 'mmc@7e202000.bootdev':
-      0  distro       ready   mmc          2  mmc@7e202000.bootdev.p  /extlinux/extlinux.conf
+      0  distro       ready   mmc          2    0  mmc@7e202000.bootdev.p  /extlinux/extlinux.conf
     ** Booting bootflow 'mmc@7e202000.bootdev.part_2'
     Ignoring unknown command: ui
     Ignoring malformed menu command:  autoboot
@@ -475,49 +481,49 @@  Here is am example using the -e flag to see all errors::
     Bytes transferred = 566 (236 hex)
     U-Boot> bootflow l -e
     Showing all bootflows
-    Seq  Type         State   Uclass    Part  Name                   Filename
-    ---  -----------  ------  --------  ----  ---------------------  ----------------
-      0  distro       fs      mmc          1  mmc@7e202000.bootdev.p /extlinux/extlinux.conf
+    Seq  Type         State   Uclass    Part  Ent  Name                   Filename
+    ---  -----------  ------  --------  ----  ---  ---------------------  ----------------
+      0  distro       fs      mmc          1    0  mmc@7e202000.bootdev.p /extlinux/extlinux.conf
          ** File not found, err=-2
-      1  distro       ready   mmc          2  mmc@7e202000.bootdev.p /extlinux/extlinux.conf
-      2  distro       fs      mmc          3  mmc@7e202000.bootdev.p /extlinux/extlinux.conf
+      1  distro       ready   mmc          2    0  mmc@7e202000.bootdev.p /extlinux/extlinux.conf
+      2  distro       fs      mmc          3    0  mmc@7e202000.bootdev.p /extlinux/extlinux.conf
          ** File not found, err=-1
-      3  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      3  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      4  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      4  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      5  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      5  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      6  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      6  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      7  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      7  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      8  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      8  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      9  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      9  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      a  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      a  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      b  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      b  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      c  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      c  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      d  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      d  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      e  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      e  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-      f  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+      f  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-     10  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+     10  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-     11  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+     11  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-     12  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+     12  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-     13  distro       media   mmc          0  mmc@7e202000.bootdev.p <NULL>
+     13  distro       media   mmc          0    0  mmc@7e202000.bootdev.p <NULL>
          ** No partition found, err=-2
-     14  distro       ready   ethernet     0  smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf
-    ---  -----------  ------  --------  ----  ---------------------  ----------------
+     14  distro       ready   ethernet     0    0  smsc95xx_eth.bootdev.0 rpi.pxe/extlinux/extlinux.conf
+    ---  -----------  ------  --------  ----  ---  ---------------------  ----------------
     (21 bootflows, 2 valid)
     U-Boot>
 
@@ -526,12 +532,12 @@  the cmdline is word-wrapped here and some parts of the command line are elided::
 
     => bootfl list
     Showing all bootflows
-    Seq  Method       State   Uclass    Part  Name                      Filename
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
-    0  cros         ready   nvme         0  5.10.153-20434-g98da1eb2c <NULL>
-    1  efi          ready   nvme         c  nvme#0.blk#1.bootdev.part efi/boot/bootia32.efi
-    2  efi          ready   usb_mass_    2  usb_mass_storage.lun0.boo efi/boot/bootia32.efi
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    Seq  Method       State   Uclass    Part  Ent  Name                      Filename
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
+    0    cros         ready   nvme         0       5.10.153-20434-g98da1eb2c <NULL>
+    1    efi          ready   nvme         c       nvme#0.blk#1.bootdev.part efi/boot/bootia32.efi
+    2    efi          ready   usb_mass_    2       usb_mass_storage.lun0.boo efi/boot/bootia32.efi
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     (3 bootflows, 3 valid)
     => bootfl sel 0
     => bootfl inf
diff --git a/doc/usage/cmd/bootstd.rst b/doc/usage/cmd/bootstd.rst
index 7d933852a91..414b720c728 100644
--- a/doc/usage/cmd/bootstd.rst
+++ b/doc/usage/cmd/bootstd.rst
@@ -36,13 +36,13 @@  content of a few of them::
     => bootflow scan
     => bootflow list
     Showing all bootflows
-    Seq  Method       State   Uclass    Part  Name                      Filename
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
-      0  extlinux     ready   mmc          1  mmc1.bootdev.part_1       /extlinux/extlinux.conf
-      1  script       ready   mmc          1  mmc4.bootdev.part_1       /boot/boot.scr
-      2  cros         ready   mmc          2  mmc5.bootdev.part_2
-      3  cros         ready   mmc          4  mmc5.bootdev.part_4
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    Seq  Method       State   Uclass    Part  Ent  Name                      Filename
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
+      0  extlinux     ready   mmc          1    0  mmc1.bootdev.part_1       /extlinux/extlinux.conf
+      1  script       ready   mmc          1       mmc4.bootdev.part_1       /boot/boot.scr
+      2  cros         ready   mmc          2       mmc5.bootdev.part_2
+      3  cros         ready   mmc          4       mmc5.bootdev.part_4
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     (4 bootflows, 4 valid)
     =>
     => bootstd images
diff --git a/doc/usage/cmd/history.rst b/doc/usage/cmd/history.rst
index b52b5b220ae..09c037bb977 100644
--- a/doc/usage/cmd/history.rst
+++ b/doc/usage/cmd/history.rst
@@ -34,16 +34,16 @@  itself is added to the list.
 
     => bootflow scan -l
     Scanning for bootflows in all bootdevs
-    Seq  Method       State   Uclass    Part  Name                      Filename
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    Seq  Method       State   Uclass    Part  Ent  Name                      Filename
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     Scanning global bootmeth 'firmware0':
     Hunting with: simple_bus
     Found 2 extension board(s).
     Scanning bootdev 'mmc2.bootdev':
     Scanning bootdev 'mmc1.bootdev':
-      0  extlinux     ready   mmc          1  mmc1.bootdev.part_1       /extlinux/extlinux.conf
+      0  extlinux     ready   mmc          1    0  mmc1.bootdev.part_1       /extlinux/extlinux.conf
     No more bootdevs
-    ---  -----------  ------  --------  ----  ------------------------  ----------------
+    ---  -----------  ------  --------  ----  ---  ------------------------  ----------------
     (1 bootflow, 1 valid)
     => bootflow select 0
     => bootflow info
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index 317d7e4c47d..7a0e4f9acb7 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -42,8 +42,8 @@  extern U_BOOT_DRIVER(bootmeth_2bls);
 static u16 __efi_runtime_data test_vendor[] = u"U-Boot testing";
 
 /* comment test strings */
-#define HEADER	"Seq  Method       State   Uclass    Part  E  Name                      Filename"
-#define EXT0	"  0  extlinux     ready   mmc          1     mmc1.bootdev.part_1       /extlinux/extlinux.conf"
+#define HEADER	"Seq  Method       State   Uclass    Part  Ent  E  Name                      Filename"
+#define EXT0	"  0  extlinux     ready   mmc          1    0     mmc1.bootdev.part_1       /extlinux/extlinux.conf"
 
 static int inject_response(struct unit_test_state *uts)
 {
@@ -196,31 +196,31 @@  static int bootflow_cmd_scan_e(struct unit_test_state *uts)
 	ut_assert_nextline(HEADER);
 	ut_assert_nextlinen("---");
 	ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':");
-	ut_assert_nextline("  0  extlinux     media   mmc          0     mmc2.bootdev.whole        ");
+	ut_assert_nextline("  0  extlinux     media   mmc          0    0     mmc2.bootdev.whole        ");
 	ut_assert_nextline("     ** No partition found, err=-93: Protocol not supported");
-	ut_assert_nextline("  1  efi          media   mmc          0     mmc2.bootdev.whole        ");
+	ut_assert_nextline("  1  efi          media   mmc          0          mmc2.bootdev.whole        ");
 	ut_assert_nextline("     ** No partition found, err=-93: Protocol not supported");
-	ut_assert_nextline("  2  vbe          media   mmc          0     mmc2.bootdev.whole        ");
+	ut_assert_nextline("  2  vbe          media   mmc          0          mmc2.bootdev.whole        ");
 	ut_assert_nextline("     ** No partition found, err=-93: Protocol not supported");
 
 	ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':");
-	ut_assert_nextline("  3  extlinux     media   mmc          0     mmc1.bootdev.whole        ");
+	ut_assert_nextline("  3  extlinux     media   mmc          0    0     mmc1.bootdev.whole        ");
 	ut_assert_nextline("     ** No partition found, err=-2: No such file or directory");
-	ut_assert_nextline("  4  efi          media   mmc          0     mmc1.bootdev.whole        ");
+	ut_assert_nextline("  4  efi          media   mmc          0          mmc1.bootdev.whole        ");
 	ut_assert_nextline("     ** No partition found, err=-2: No such file or directory");
-	ut_assert_nextline("  5  vbe          media   mmc          0     mmc1.bootdev.whole        ");
+	ut_assert_nextline("  5  vbe          media   mmc          0          mmc1.bootdev.whole        ");
 	ut_assert_nextline("     ** No partition found, err=-2: No such file or directory");
-	ut_assert_nextline("  6  extlinux     ready   mmc          1     mmc1.bootdev.part_1       /extlinux/extlinux.conf");
+	ut_assert_nextline("  6  extlinux     ready   mmc          1    0     mmc1.bootdev.part_1       /extlinux/extlinux.conf");
 	/* multi-entry tries entry 1 on extlinux (Fedora has one label) */
-	ut_assert_nextline("  7  extlinux     ready   mmc          1     mmc1.bootdev.part_1       /extlinux/extlinux.conf");
+	ut_assert_nextline("  7  extlinux     ready   mmc          1    1     mmc1.bootdev.part_1       /extlinux/extlinux.conf");
 	ut_assert_nextline("     ** Ready, err=-2: No such file or directory");
 	ut_assert_nextline(
-		"  8  efi          fs      mmc          1     mmc1.bootdev.part_1       /EFI/BOOT/%s",
+		"  8  efi          fs      mmc          1          mmc1.bootdev.part_1       /EFI/BOOT/%s",
 		efi_get_basename());
 
 	ut_assert_skip_to_line("Scanning bootdev 'mmc0.bootdev':");
 	ut_assert_skip_to_line(
-		" 60  vbe          media   mmc          0     mmc0.bootdev.whole        ");
+		" 60  vbe          media   mmc          0          mmc0.bootdev.whole        ");
 	ut_assert_nextline("     ** No partition found, err=-93: Protocol not supported");
 	ut_assert_nextline("No more bootdevs");
 	ut_assert_nextlinen("---");
@@ -231,9 +231,9 @@  static int bootflow_cmd_scan_e(struct unit_test_state *uts)
 	ut_assert_nextline("Showing all bootflows");
 	ut_assert_nextline(HEADER);
 	ut_assert_nextlinen("---");
-	ut_assert_nextline("  0  extlinux     media   mmc          0     mmc2.bootdev.whole        ");
-	ut_assert_nextline("  1  efi          media   mmc          0     mmc2.bootdev.whole        ");
-	ut_assert_skip_to_line(" 60  vbe          media   mmc          0     mmc0.bootdev.whole        ");
+	ut_assert_nextline("  0  extlinux     media   mmc          0    0     mmc2.bootdev.whole        ");
+	ut_assert_nextline("  1  efi          media   mmc          0          mmc2.bootdev.whole        ");
+	ut_assert_skip_to_line(" 60  vbe          media   mmc          0          mmc0.bootdev.whole        ");
 	ut_assert_nextlinen("---");
 	ut_assert_nextline("(97 bootflows, 2 valid)");
 	ut_assert_console_end();
@@ -524,7 +524,7 @@  static int bootflow_system(struct unit_test_state *uts)
 	bootstd_clear_glob();
 	ut_assertok(run_command("bootflow scan -lH", 0));
 	ut_assert_skip_to_line(
-		"  1  efi_mgr      ready   (none)       0     <NULL>                    ");
+		"  1  efi_mgr      ready   (none)       0          <NULL>                    ");
 	ut_assert_skip_to_line("No more bootdevs");
 	ut_assert_skip_to_line("(2 bootflows, 2 valid)");
 	ut_assert_console_end();
@@ -1337,8 +1337,8 @@  static int bootflow_cros(struct unit_test_state *uts)
 	ut_assert_nextlinen("Seq");
 	ut_assert_nextlinen("---");
 	ut_assert_nextlinen("  0  extlinux");
-	ut_assert_nextlinen("  1  cros         ready   mmc          2     mmc5.bootdev.part_2       ");
-	ut_assert_nextlinen("  2  cros         ready   mmc          4     mmc5.bootdev.part_4       ");
+	ut_assert_nextlinen("  1  cros         ready   mmc          2          mmc5.bootdev.part_2       ");
+	ut_assert_nextlinen("  2  cros         ready   mmc          4          mmc5.bootdev.part_4       ");
 	ut_assert_nextlinen("---");
 	ut_assert_skip_to_line("(3 bootflows, 3 valid)");
 
@@ -1374,7 +1374,7 @@  static int bootflow_android_image_v4(struct unit_test_state *uts)
 	ut_assert_nextlinen("Seq");
 	ut_assert_nextlinen("---");
 	ut_assert_nextlinen("  0  extlinux");
-	ut_assert_nextlinen("  1  android      ready   mmc          0     mmc7.bootdev.whole        ");
+	ut_assert_nextlinen("  1  android      ready   mmc          0          mmc7.bootdev.whole        ");
 	ut_assert_nextlinen("---");
 	ut_assert_skip_to_line("(2 bootflows, 2 valid)");
 
@@ -1397,7 +1397,7 @@  static int bootflow_android_image_v2(struct unit_test_state *uts)
 	ut_assert_nextlinen("Seq");
 	ut_assert_nextlinen("---");
 	ut_assert_nextlinen("  0  extlinux");
-	ut_assert_nextlinen("  1  android      ready   mmc          0     mmc8.bootdev.whole        ");
+	ut_assert_nextlinen("  1  android      ready   mmc          0          mmc8.bootdev.whole        ");
 	ut_assert_nextlinen("---");
 	ut_assert_skip_to_line("(2 bootflows, 2 valid)");
 
@@ -1447,11 +1447,11 @@  static int bootflow_efi(struct unit_test_state *uts)
 	ut_assert_nextlinen("---");
 	ut_assert_nextlinen("  0  extlinux");
 	ut_assert_nextlinen(
-		"  1  efi          ready   usb          1     hub1.p2.usb_mass_storage. /EFI/BOOT/BOOTSBOX.EFI");
+		"  1  efi          ready   usb          1          hub1.p2.usb_mass_storage. /EFI/BOOT/BOOTSBOX.EFI");
 	ut_assert_nextlinen(
-		"  2  extlinux     ready   usb          1     hub1.p4.usb_mass_storage. /extlinux/extlinux.conf");
+		"  2  extlinux     ready   usb          1    0     hub1.p4.usb_mass_storage. /extlinux/extlinux.conf");
 	ut_assert_nextlinen(
-		"  3  extlinux     ready   usb          1     hub1.p4.usb_mass_storage. /extlinux/extlinux.conf");
+		"  3  extlinux     ready   usb          1    1     hub1.p4.usb_mass_storage. /extlinux/extlinux.conf");
 	ut_assert_nextlinen("---");
 	ut_assert_skip_to_line("(4 bootflows, 4 valid)");
 	ut_assert_console_end();
@@ -1827,12 +1827,12 @@  static int bootflow_cmd_info_encrypted(struct unit_test_state *uts)
 	ut_assert_nextlinen("---");
 	ut_assert_nextlinen("  0  extlinux");
 	ut_assert_nextline(
-		"  1  extlinux     ready   mmc          1  %c  mmc12.bootdev.part_1      /extlinux/extlinux.conf",
+		"  1  extlinux     ready   mmc          1    0  %c  mmc12.bootdev.part_1      /extlinux/extlinux.conf",
 		IS_ENABLED(CONFIG_BLK_LUKS) ? 'E' : ' ');
 	ut_assert_nextline(
-		"  2  extlinux     ready   mmc          1  %c  mmc12.bootdev.part_1      /extlinux/extlinux.conf",
+		"  2  extlinux     ready   mmc          1    1  %c  mmc12.bootdev.part_1      /extlinux/extlinux.conf",
 		IS_ENABLED(CONFIG_BLK_LUKS) ? 'E' : ' ');
-	ut_assert_nextline("---  -----------  ------  --------  ----  -  ------------------------  ----------------");
+	ut_assert_nextlinen("---");
 	ut_assert_nextline("(3 bootflows, 3 valid)");
 	ut_assert_console_end();
 
@@ -1873,11 +1873,11 @@  static int bootflow_cmd_bls(struct unit_test_state *uts)
 
 	ut_assertok(run_command("bootflow list", 0));
 	ut_assert_nextline("Showing all bootflows");
-	ut_assert_nextline("Seq  Method       State   Uclass    Part  E  Name                      Filename");
+	ut_assert_nextline(HEADER);
 	ut_assert_nextlinen("---");
 	ut_assert_nextlinen("  0  extlinux");
-	ut_assert_nextline("  1  bls          ready   mmc          1     mmc15.bootdev.part_1      /loader/entries/6.8.0.conf");
-	ut_assert_nextline("  2  bls          ready   mmc          1     mmc15.bootdev.part_1      /loader/entries/6.8.0-rescue.conf");
+	ut_assert_nextline("  1  bls          ready   mmc          1    0     mmc15.bootdev.part_1      /loader/entries/6.8.0.conf");
+	ut_assert_nextline("  2  bls          ready   mmc          1    1     mmc15.bootdev.part_1      /loader/entries/6.8.0-rescue.conf");
 	ut_assert_nextlinen("---");
 	ut_assert_nextline("(3 bootflows, 3 valid)");
 	ut_assert_console_end();
@@ -1946,11 +1946,11 @@  static int bootflow_multi(struct unit_test_state *uts)
 	ut_assert_nextlinen("Seq");
 	ut_assert_nextlinen("---");
 	ut_assert_nextlinen(
-		"  0  efi          ready   usb          1     hub1.p2.usb_mass_storage.");
+		"  0  efi          ready   usb          1          hub1.p2.usb_mass_storage.");
 	ut_assert_nextlinen(
-		"  1  extlinux     ready   usb          1     hub1.p4.usb_mass_storage.");
+		"  1  extlinux     ready   usb          1    0     hub1.p4.usb_mass_storage.");
 	ut_assert_nextlinen(
-		"  2  extlinux     ready   usb          1     hub1.p4.usb_mass_storage.");
+		"  2  extlinux     ready   usb          1    1     hub1.p4.usb_mass_storage.");
 	ut_assert_nextlinen("---");
 	ut_assert_nextline("(3 bootflows, 3 valid)");
 	ut_assert_console_end();
@@ -1965,12 +1965,6 @@  static int bootflow_multi(struct unit_test_state *uts)
 			bflow->os_name);
 	ut_asserteq(1, bflow->entry);
 
-	/* Try booting the second entry (rescue) - exercises pxe_boot_entry() */
-	ut_assertok(env_set("kernel_addr_r", "1000000"));
-	ut_assertok(env_set("ramdisk_addr_r", "2000000"));
-	std->cur_bootflow = bflow;
-	ut_asserteq(-EFAULT, bootflow_boot(bflow));
-
 	return 0;
 }
 BOOTSTD_TEST(bootflow_multi, UTF_DM | UTF_SCAN_FDT | UTF_CONSOLE);