[PATCH] board: sifive: unmatched: enable booting on a second NVME device

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Jan 8 00:02:59 CET 2023


On 1/7/23 23:32, Aurelien Jarno wrote:
> The HiFive Unmatched board has a M2 slot for NVME and a PCIe slot that
> can also be used for NVME. Enable support for a second NVME device, so
> that software RAID-1 configurations can be supported at the u-boot
> level.
>
> Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
> ---
>   include/configs/sifive-unmatched.h | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/include/configs/sifive-unmatched.h b/include/configs/sifive-unmatched.h
> index 85fab92719..9261932af9 100644
> --- a/include/configs/sifive-unmatched.h
> +++ b/include/configs/sifive-unmatched.h
> @@ -19,6 +19,7 @@
>
>   #define BOOT_TARGET_DEVICES(func) \
>   	func(NVME, nvme, 0) \
> +	func(NVME, nvme, 1) \

We can have up to three NVMe drives directly connected. Just put an
adapter into the 2230 m.2 slot (e.g.
https://www.aliexpress.com/item/32968036136.html, NGFF M.2 Key M to Key
A+E Extension Cable NGFF Key M to A+E Adapter Card Board).

>   	func(USB, usb, 0) \
>   	func(MMC, mmc, 0) \
>   	func(SCSI, scsi, 0) \

It is a generic problem that include/config_distro_bootcmd.h requires
explicitly enumerating the device numbers instead of scanning all devices.

With a SATA adapter you can have more than one instance of SCSI too (cf.
IOCREST M.2 NGFF to Sata3 Adapter Card A-Key + E-Key to 2 Ports SATA
6Gb/S
https://www.walmart.ca/en/ip/IOCREST-M-2-NGFF-to-Sata3-Adapter-Card-A-Key-E-Key-to-2-Ports-SATA-6Gb-S-Free-Driver-PCIe-3-0-Bus-for-Wifi-SSD-HDD-PC-Black/PRD67D114EQV1VO).

Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>


More information about the U-Boot mailing list