From: Fabio Estevam Date: Tue, 12 Aug 2025 17:46:10 +0000 (-0300) Subject: env: fat: Add support for NVME X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=afbed1ba2f8776b06ef821212b14a3e34bdcd2bd;p=thirdparty%2Fu-boot.git env: fat: Add support for NVME Add support for retrieving the FAT environment from an NVME device, the same way it can be retrieved from MMC, SCSI, or VIRTIO. To use the FAT environment from an NVME device, pass CONFIG_ENV_FAT_INTERFACE="nvme" in the defconfig. Signed-off-by: Fabio Estevam --- diff --git a/env/fat.c b/env/fat.c index 65ee1c8e086..412d95dc305 100644 --- a/env/fat.c +++ b/env/fat.c @@ -14,8 +14,10 @@ #include #include #include +#include #include #include +#include #include #include #include @@ -136,6 +138,14 @@ static int env_fat_load(void) if (!strcmp(ifname, "virtio")) virtio_init(); #endif +#if defined(CONFIG_NVME) + if (!strcmp(ifname, "nvme")) { + if (IS_ENABLED(CONFIG_PCI)) + pci_init(); + + nvme_scan_namespace(); + } +#endif #endif part = blk_get_device_part_str(ifname, dev_and_part, &dev_desc, &info, 1);