summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-08-03 17:45:38 -0400
committerTom Rini <trini@konsulko.com>2023-08-03 17:45:38 -0400
commit989892f5805dc205033c4723bc8e024472564d16 (patch)
tree9e95ad9c42383955460fc39eb095bcedb333b846
parent6cdd4b8108f57252b8849e71aa46e3a2d227c98d (diff)
parent11158aef8939bb6e54361e4dae3809a9cbe78cff (diff)
downloadu-boot-989892f5805dc205033c4723bc8e024472564d16.tar.gz
u-boot-989892f5805dc205033c4723bc8e024472564d16.tar.bz2
u-boot-989892f5805dc205033c4723bc8e024472564d16.zip
Merge branch '2023-08-03-assorted-fixes'
- More MAINTAINERS file updates, bootstd fixes, a fat fix and debug message fix
-rw-r--r--board/armltd/vexpress64/MAINTAINERS7
-rw-r--r--board/dhelectronics/dh_imx8mp/MAINTAINERS12
-rw-r--r--board/freescale/ls1012afrdm/MAINTAINERS2
-rw-r--r--board/freescale/ls1012aqds/MAINTAINERS1
-rw-r--r--board/freescale/ls1012ardb/MAINTAINERS1
-rw-r--r--board/freescale/ls1028a/MAINTAINERS2
-rw-r--r--board/freescale/ls1043aqds/MAINTAINERS1
-rw-r--r--board/freescale/ls1043ardb/MAINTAINERS1
-rw-r--r--board/freescale/ls1046aqds/MAINTAINERS1
-rw-r--r--board/freescale/ls1046ardb/MAINTAINERS1
-rw-r--r--board/freescale/ls1088a/MAINTAINERS2
-rw-r--r--board/freescale/ls2080aqds/MAINTAINERS1
-rw-r--r--board/freescale/ls2080ardb/MAINTAINERS1
-rw-r--r--board/freescale/t104xrdb/MAINTAINERS5
-rw-r--r--board/freescale/t208xrdb/MAINTAINERS5
-rw-r--r--board/schneider/rzn1-snarc/MAINTAINERS9
-rw-r--r--boot/bootmeth-uclass.c23
-rw-r--r--boot/bootmeth_efi.c76
-rw-r--r--boot/bootmeth_pxe.c3
-rw-r--r--drivers/virtio/virtio-uclass.c2
-rw-r--r--fs/fat/fat_write.c6
-rw-r--r--include/bootmeth.h13
22 files changed, 100 insertions, 75 deletions
diff --git a/board/armltd/vexpress64/MAINTAINERS b/board/armltd/vexpress64/MAINTAINERS
index b3ecc9bba0..c38ab520c5 100644
--- a/board/armltd/vexpress64/MAINTAINERS
+++ b/board/armltd/vexpress64/MAINTAINERS
@@ -1,9 +1,10 @@
-VEXPRESS64 BOARD
+VEXPRESS64 PLATFORM
M: David Feng <fenghua@phytium.com.cn>
+M: Linus Walleij <linus.walleij@linaro.org>
+M: Peter Hoyes <Peter.Hoyes@arm.com>
S: Maintained
F: board/armltd/vexpress64/
-F: include/configs/vexpress_aemv8a.h
-F: configs/vexpress_aemv8a_defconfig
+F: include/configs/vexpress_aemv8.h
VEXPRESS_AEMV8A_SEMI BOARD
M: Linus Walleij <linus.walleij@linaro.org>
diff --git a/board/dhelectronics/dh_imx8mp/MAINTAINERS b/board/dhelectronics/dh_imx8mp/MAINTAINERS
index 7c70cfdd94..db69781a85 100644
--- a/board/dhelectronics/dh_imx8mp/MAINTAINERS
+++ b/board/dhelectronics/dh_imx8mp/MAINTAINERS
@@ -1,8 +1,8 @@
-DH electronics DHCOM Premium Developer Kit (2) i.MX8M Plus
+DH electronics DHCOM i.MX8M Plus and matching carrier boards
M: Marek Vasut <marex@denx.de>
+L: u-boot@dh-electronics.com
S: Maintained
-F: arch/arm/dts/imx8mp-dhcom-pdk2.dts
-F: arch/arm/dts/imx8mp-dhcom-pdk2-u-boot.dtsi
-F: board/dhelectronics/imx8mp_dhcom_pdk2/
-F: configs/imx8mp_dhcom_pdk2_defconfig
-F: include/configs/imx8mp_dhcom_pdk2.h
+F: arch/arm/dts/imx8mp-dhcom*
+F: board/dhelectronics/dh_imx8mp/
+F: configs/imx8mp_dhcom*defconfig
+F: include/configs/imx8mp_dhcom*
diff --git a/board/freescale/ls1012afrdm/MAINTAINERS b/board/freescale/ls1012afrdm/MAINTAINERS
index 5fc7e93850..89d1085b00 100644
--- a/board/freescale/ls1012afrdm/MAINTAINERS
+++ b/board/freescale/ls1012afrdm/MAINTAINERS
@@ -1,5 +1,5 @@
LS1012AFRDM BOARD
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
+M: Pramod Kumar <pramod.kumar_1@nxp.com>
S: Maintained
F: board/freescale/ls1012afrdm/
F: include/configs/ls1012afrdm.h
diff --git a/board/freescale/ls1012aqds/MAINTAINERS b/board/freescale/ls1012aqds/MAINTAINERS
index c1bb8d5150..eabf580576 100644
--- a/board/freescale/ls1012aqds/MAINTAINERS
+++ b/board/freescale/ls1012aqds/MAINTAINERS
@@ -1,5 +1,4 @@
LS1012AQDS BOARD
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
M: Pramod Kumar <pramod.kumar_1@nxp.com>
S: Maintained
F: board/freescale/ls1012aqds/
diff --git a/board/freescale/ls1012ardb/MAINTAINERS b/board/freescale/ls1012ardb/MAINTAINERS
index b0c008b5fc..ce2f9a16cc 100644
--- a/board/freescale/ls1012ardb/MAINTAINERS
+++ b/board/freescale/ls1012ardb/MAINTAINERS
@@ -1,5 +1,4 @@
LS1012ARDB BOARD
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
M: Pramod Kumar <pramod.kumar_1@nxp.com>
S: Maintained
F: board/freescale/ls1012ardb/
diff --git a/board/freescale/ls1028a/MAINTAINERS b/board/freescale/ls1028a/MAINTAINERS
index 9e7b0697ff..551f6a0865 100644
--- a/board/freescale/ls1028a/MAINTAINERS
+++ b/board/freescale/ls1028a/MAINTAINERS
@@ -1,5 +1,4 @@
LS1028AQDS BOARD
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
M: Tang Yuantian <andy.tang@nxp.com>
S: Maintained
F: board/freescale/ls1028a/
@@ -9,7 +8,6 @@ F: configs/ls1028aqds_tfa_defconfig
F: configs/ls1028aqds_tfa_lpuart_defconfig
LS1028ARDB BOARD
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
M: Tang Yuantian <andy.tang@nxp.com>
S: Maintained
F: board/freescale/ls1028a/
diff --git a/board/freescale/ls1043aqds/MAINTAINERS b/board/freescale/ls1043aqds/MAINTAINERS
index 9fb6cc85cd..f7420ecd30 100644
--- a/board/freescale/ls1043aqds/MAINTAINERS
+++ b/board/freescale/ls1043aqds/MAINTAINERS
@@ -1,6 +1,5 @@
LS1043AQDS BOARD
M: Mingkai Hu <mingkai.hu@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1043aqds/
F: include/configs/ls1043aqds.h
diff --git a/board/freescale/ls1043ardb/MAINTAINERS b/board/freescale/ls1043ardb/MAINTAINERS
index 8e14ba3608..06b23889f6 100644
--- a/board/freescale/ls1043ardb/MAINTAINERS
+++ b/board/freescale/ls1043ardb/MAINTAINERS
@@ -1,6 +1,5 @@
LS1043A BOARD
M: Mingkai Hu <mingkai.hu@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1043ardb/
F: include/configs/ls1043ardb.h
diff --git a/board/freescale/ls1046aqds/MAINTAINERS b/board/freescale/ls1046aqds/MAINTAINERS
index 72c4253fcf..e1db2aaa8e 100644
--- a/board/freescale/ls1046aqds/MAINTAINERS
+++ b/board/freescale/ls1046aqds/MAINTAINERS
@@ -1,6 +1,5 @@
LS1046AQDS BOARD
M: Mingkai Hu <Mingkai.Hu@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1046aqds/
F: include/configs/ls1046aqds.h
diff --git a/board/freescale/ls1046ardb/MAINTAINERS b/board/freescale/ls1046ardb/MAINTAINERS
index 3c8cfe720d..d5a6b26151 100644
--- a/board/freescale/ls1046ardb/MAINTAINERS
+++ b/board/freescale/ls1046ardb/MAINTAINERS
@@ -1,6 +1,5 @@
LS1046A BOARD
M: Mingkai Hu <mingkai.hu@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1046ardb/
F: board/freescale/ls1046ardb/ls1046ardb.c
diff --git a/board/freescale/ls1088a/MAINTAINERS b/board/freescale/ls1088a/MAINTAINERS
index 5c7925a95f..95a14149e4 100644
--- a/board/freescale/ls1088a/MAINTAINERS
+++ b/board/freescale/ls1088a/MAINTAINERS
@@ -1,6 +1,5 @@
LS1088ARDB BOARD
M: Ashish Kumar <Ashish.Kumar@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1088a/
F: include/configs/ls1088ardb.h
@@ -11,7 +10,6 @@ F: configs/ls1088ardb_tfa_SECURE_BOOT_defconfig
LS1088AQDS BOARD
M: Ashish Kumar <Ashish.Kumar@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
S: Maintained
F: board/freescale/ls1088a/
F: include/configs/ls1088aqds.h
diff --git a/board/freescale/ls2080aqds/MAINTAINERS b/board/freescale/ls2080aqds/MAINTAINERS
index 39d02ae3f4..fdad199ec2 100644
--- a/board/freescale/ls2080aqds/MAINTAINERS
+++ b/board/freescale/ls2080aqds/MAINTAINERS
@@ -1,6 +1,5 @@
LS2080A BOARD
M: Priyanka Jain <priyanka.jain@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
M: Wasim Khan <wasim.khan@nxp.com>
S: Maintained
F: board/freescale/ls2080aqds/
diff --git a/board/freescale/ls2080ardb/MAINTAINERS b/board/freescale/ls2080ardb/MAINTAINERS
index f49d26af3a..f2f834ffbd 100644
--- a/board/freescale/ls2080ardb/MAINTAINERS
+++ b/board/freescale/ls2080ardb/MAINTAINERS
@@ -10,7 +10,6 @@ F: configs/ls2080ardb_nand_defconfig
LS2088A_QSPI-boot BOARD
M: Priyanka Jain <priyanka.jain@nxp.com>
-M: Rajesh Bhagat <rajesh.bhagat@nxp.com>
M: Wasim Khan <wasim.khan@nxp.com>
S: Maintained
F: configs/ls2088ardb_qspi_defconfig
diff --git a/board/freescale/t104xrdb/MAINTAINERS b/board/freescale/t104xrdb/MAINTAINERS
index 4e82f7f2ee..55fdb600a1 100644
--- a/board/freescale/t104xrdb/MAINTAINERS
+++ b/board/freescale/t104xrdb/MAINTAINERS
@@ -24,8 +24,3 @@ F: configs/T1040RDB_SDCARD_defconfig
F: configs/T1040D4RDB_SDCARD_defconfig
F: configs/T1042D4RDB_SDCARD_defconfig
F: configs/T1042RDB_PI_SDCARD_defconfig
-
-T1042D4RDB_SECURE_BOOT BOARD
-M: Ruchika Gupta <ruchika.gupta@nxp.com>
-S: Maintained
-F: configs/T1042D4RDB_SECURE_BOOT_defconfig
diff --git a/board/freescale/t208xrdb/MAINTAINERS b/board/freescale/t208xrdb/MAINTAINERS
index 6e9b25fa04..5be7a25c03 100644
--- a/board/freescale/t208xrdb/MAINTAINERS
+++ b/board/freescale/t208xrdb/MAINTAINERS
@@ -12,8 +12,3 @@ F: configs/T2080RDB_revD_defconfig
F: configs/T2080RDB_revD_NAND_defconfig
F: configs/T2080RDB_revD_SDCARD_defconfig
F: configs/T2080RDB_revD_SPIFLASH_defconfig
-
-T2080RDB_SECURE_BOOT BOARD
-M: Ruchika Gupta <ruchika.gupta@nxp.com>
-S: Maintained
-F: configs/T2080RDB_SECURE_BOOT_defconfig
diff --git a/board/schneider/rzn1-snarc/MAINTAINERS b/board/schneider/rzn1-snarc/MAINTAINERS
new file mode 100644
index 0000000000..a39b96c116
--- /dev/null
+++ b/board/schneider/rzn1-snarc/MAINTAINERS
@@ -0,0 +1,9 @@
+RZN1 SNARC
+M: Ralph Siemsen <ralph.siemsen@linaro.org>
+S: Maintained
+F: board/schneider/rzn1-snarc/
+F: arch/arm/dts/r9a06g032-ddr.dtsi
+F: arch/arm/dts/r9a06g032-rzn1-snarc-u-boot.dtsi
+F: arch/arm/dts/r9a06g032-rzn1-snarc.dts
+F: configs/rzn1_snarc_defconfig
+F: include/configs/rzn1-snarc.h
diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c
index eeded08dd4..175eb1de5e 100644
--- a/boot/bootmeth-uclass.c
+++ b/boot/bootmeth-uclass.c
@@ -240,18 +240,7 @@ int bootmeth_set_order(const char *order_str)
return 0;
}
-/**
- * setup_fs() - Set up read to read a file
- *
- * We must redo the setup before each filesystem operation. This function
- * handles that, including setting the filesystem type if a block device is not
- * being used
- *
- * @bflow: Information about file to try
- * @desc: Block descriptor to read from (NULL if not a block device)
- * Return: 0 if OK, -ve on error
- */
-static int setup_fs(struct bootflow *bflow, struct blk_desc *desc)
+int bootmeth_setup_fs(struct bootflow *bflow, struct blk_desc *desc)
{
int ret;
@@ -288,7 +277,7 @@ int bootmeth_try_file(struct bootflow *bflow, struct blk_desc *desc,
log_debug(" %s - err=%d\n", path, ret);
/* Sadly FS closes the file after fs_size() so we must redo this */
- ret2 = setup_fs(bflow, desc);
+ ret2 = bootmeth_setup_fs(bflow, desc);
if (ret2)
return log_msg_ret("fs", ret2);
@@ -337,14 +326,14 @@ int bootmeth_alloc_other(struct bootflow *bflow, const char *fname,
if (bflow->blk)
desc = dev_get_uclass_plat(bflow->blk);
- ret = setup_fs(bflow, desc);
+ ret = bootmeth_setup_fs(bflow, desc);
if (ret)
return log_msg_ret("fs", ret);
ret = fs_size(path, &size);
log_debug(" %s - err=%d\n", path, ret);
- ret = setup_fs(bflow, desc);
+ ret = bootmeth_setup_fs(bflow, desc);
if (ret)
return log_msg_ret("fs", ret);
@@ -369,7 +358,7 @@ int bootmeth_common_read_file(struct udevice *dev, struct bootflow *bflow,
if (bflow->blk)
desc = dev_get_uclass_plat(bflow->blk);
- ret = setup_fs(bflow, desc);
+ ret = bootmeth_setup_fs(bflow, desc);
if (ret)
return log_msg_ret("fs", ret);
@@ -379,7 +368,7 @@ int bootmeth_common_read_file(struct udevice *dev, struct bootflow *bflow,
if (size > *sizep)
return log_msg_ret("spc", -ENOSPC);
- ret = setup_fs(bflow, desc);
+ ret = bootmeth_setup_fs(bflow, desc);
if (ret)
return log_msg_ret("fs", ret);
diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c
index af31fbfc85..1c9f2b1e2f 100644
--- a/boot/bootmeth_efi.c
+++ b/boot/bootmeth_efi.c
@@ -21,6 +21,7 @@
#include <mmc.h>
#include <net.h>
#include <pxe_utils.h>
+#include <linux/sizes.h>
#define EFI_DIRNAME "efi/boot/"
@@ -94,6 +95,20 @@ static int get_efi_pxe_vci(char *str, int max_len)
return 0;
}
+/**
+ * bootmeth_uses_network() - check if the media device is Ethernet
+ *
+ * @bflow: Bootflow to check
+ * Returns: true if the media device is Ethernet, else false
+ */
+static bool bootmeth_uses_network(struct bootflow *bflow)
+{
+ const struct udevice *media = dev_get_parent(bflow->dev);
+
+ return IS_ENABLED(CONFIG_CMD_DHCP) &&
+ device_get_uclass_id(media) == UCLASS_ETH;
+}
+
static void set_efi_bootdev(struct blk_desc *desc, struct bootflow *bflow)
{
const struct udevice *media_dev;
@@ -129,13 +144,24 @@ static void set_efi_bootdev(struct blk_desc *desc, struct bootflow *bflow)
efi_set_bootdev(dev_name, devnum_str, bflow->fname, bflow->buf, size);
}
-static int efiload_read_file(struct blk_desc *desc, struct bootflow *bflow)
+static int efiload_read_file(struct bootflow *bflow, ulong addr)
{
+ struct blk_desc *desc = NULL;
+ loff_t bytes_read;
int ret;
- ret = bootmeth_alloc_file(bflow, 0x2000000, 0x10000);
+ if (bflow->blk)
+ desc = dev_get_uclass_plat(bflow->blk);
+ ret = bootmeth_setup_fs(bflow, desc);
+ if (ret)
+ return log_msg_ret("set", ret);
+
+ ret = fs_read(bflow->fname, addr, 0, bflow->size, &bytes_read);
if (ret)
return log_msg_ret("read", ret);
+ bflow->buf = map_sysmem(addr, bflow->size);
+
+ set_efi_bootdev(desc, bflow);
return 0;
}
@@ -209,7 +235,18 @@ static int distro_efi_get_fdt_name(char *fname, int size, int seq)
return 0;
}
-static int distro_efi_read_bootflow_file(struct udevice *dev,
+/*
+ * distro_efi_try_bootflow_files() - Check that files are present
+ *
+ * This reads any FDT file and checks whether the bootflow file is present, for
+ * later reading. We avoid reading the bootflow now, since it is likely large,
+ * it may take a long time and we want to avoid needing to allocate memory for
+ * it
+ *
+ * @dev: bootmeth device to use
+ * @bflow: bootflow to update
+ */
+static int distro_efi_try_bootflow_files(struct udevice *dev,
struct bootflow *bflow)
{
struct blk_desc *desc = NULL;
@@ -233,9 +270,8 @@ static int distro_efi_read_bootflow_file(struct udevice *dev,
if (ret)
return log_msg_ret("try", ret);
- ret = efiload_read_file(desc, bflow);
- if (ret)
- return log_msg_ret("read", ret);
+ /* Since we can access the file, let's call it ready */
+ bflow->state = BOOTFLOWST_READY;
fdt_addr = env_get_hex("fdt_addr_r", 0);
@@ -246,9 +282,12 @@ static int distro_efi_read_bootflow_file(struct udevice *dev,
ret = distro_efi_get_fdt_name(fname, sizeof(fname), seq);
if (ret == -EALREADY)
bflow->flags = BOOTFLOWF_USE_PRIOR_FDT;
- if (!ret)
+ if (!ret) {
+ /* Limit FDT files to 4MB */
+ size = SZ_4M;
ret = bootmeth_common_read_file(dev, bflow, fname,
fdt_addr, &size);
+ }
}
if (*fname) {
@@ -354,17 +393,15 @@ static int distro_efi_read_bootflow_net(struct bootflow *bflow)
static int distro_efi_read_bootflow(struct udevice *dev, struct bootflow *bflow)
{
- const struct udevice *media = dev_get_parent(bflow->dev);
int ret;
- if (IS_ENABLED(CONFIG_CMD_DHCP) &&
- device_get_uclass_id(media) == UCLASS_ETH) {
+ if (bootmeth_uses_network(bflow)) {
/* we only support reading from one device, so ignore 'dev' */
ret = distro_efi_read_bootflow_net(bflow);
if (ret)
return log_msg_ret("net", ret);
} else {
- ret = distro_efi_read_bootflow_file(dev, bflow);
+ ret = distro_efi_try_bootflow_files(dev, bflow);
if (ret)
return log_msg_ret("blk", ret);
}
@@ -376,17 +413,13 @@ int distro_efi_boot(struct udevice *dev, struct bootflow *bflow)
{
ulong kernel, fdt;
char cmd[50];
+ int ret;
- /* A non-zero buffer indicates the kernel is there */
- if (bflow->buf) {
- /* Set the EFI bootdev again, since reading an FDT loses it! */
- if (bflow->blk) {
- struct blk_desc *desc = dev_get_uclass_plat(bflow->blk);
-
- set_efi_bootdev(desc, bflow);
- }
-
- kernel = (ulong)map_to_sysmem(bflow->buf);
+ kernel = env_get_hex("kernel_addr_r", 0);
+ if (!bootmeth_uses_network(bflow)) {
+ ret = efiload_read_file(bflow, kernel);
+ if (ret)
+ return log_msg_ret("read", ret);
/*
* use the provided device tree if available, else fall back to
@@ -405,7 +438,6 @@ int distro_efi_boot(struct udevice *dev, struct bootflow *bflow)
* But this is the same behaviour for distro boot, so it can be
* fixed here.
*/
- kernel = env_get_hex("kernel_addr_r", 0);
fdt = env_get_hex("fdt_addr_r", 0);
}
diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c
index ce986bd260..8d489a11aa 100644
--- a/boot/bootmeth_pxe.c
+++ b/boot/bootmeth_pxe.c
@@ -31,6 +31,9 @@ static int extlinux_pxe_getfile(struct pxe_context *ctx, const char *file_path,
int ret;
addr = simple_strtoul(file_addr, NULL, 16);
+
+ /* Allow up to 1GB */
+ *sizep = 1 << 30;
ret = bootmeth_read_file(info->dev, info->bflow, file_path, addr,
sizep);
if (ret)
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 31bb21c534..f2b3ef1d8b 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -238,7 +238,7 @@ static int virtio_uclass_post_probe(struct udevice *udev)
ret = device_bind_driver(udev, name, str, &vdev);
if (ret == -ENOENT) {
- debug("(%s): no driver configured\n", udev->name);
+ debug("(%s): %s driver not configured\n", udev->name, name);
return 0;
}
if (ret) {
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index e2a9913f80..a6294419b8 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -132,9 +132,9 @@ static int set_name(fat_itr *itr, const char *filename, char *shortname)
return period_location;
if (*dirent.name == ' ')
*dirent.name = '_';
- /* 0xe5 signals a deleted directory entry. Replace it by 0x05. */
- if (*dirent.name == 0xe5)
- *dirent.name = 0x05;
+ /* Substitute character 0xe5 signaling deletetion by character 0x05 */
+ if (*dirent.name == DELETED_FLAG)
+ *dirent.name = aRING;
/* If filename and short name are the same, quit. */
sprintf(buf, "%.*s.%.3s", period_location, dirent.name, dirent.ext);
diff --git a/include/bootmeth.h b/include/bootmeth.h
index c3df9702e8..7cb7da33de 100644
--- a/include/bootmeth.h
+++ b/include/bootmeth.h
@@ -263,6 +263,19 @@ int bootmeth_setup_iter_order(struct bootflow_iter *iter, bool include_global);
int bootmeth_set_order(const char *order_str);
/**
+ * bootmeth_setup_fs() - Set up read to read a file
+ *
+ * We must redo the setup before each filesystem operation. This function
+ * handles that, including setting the filesystem type if a block device is not
+ * being used
+ *
+ * @bflow: Information about file to try
+ * @desc: Block descriptor to read from (NULL if not a block device)
+ * Return: 0 if OK, -ve on error
+ */
+int bootmeth_setup_fs(struct bootflow *bflow, struct blk_desc *desc);
+
+/**
* bootmeth_try_file() - See we can access a given file
*
* Check for a file with a given name. If found, the filename is allocated in