Files
BPI-CM9-Linux/build/patch/u-boot/u-boot-genio/3301-GENIO-mt8195-boot-order-SD-UFS-eMMC-USB-Network.patch

51 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <[email protected]>
Date: Sat, 3 Jan 2026 20:48:38 +0100
Subject: GENIO: mt8195: boot order: SD -> UFS -> eMMC -> USB -> Network
Quality of life improvement for users who want to try different OS's
using SD card. With this change, once u-boot is loaded (from BootRoM
to UFS, always), it will try to boot an OS in the following order:
SD -> SCSI 2 (UFS) -> eMMC -> USB -> PXE(pxelinux) -> DHCP (PXE-EFI)
Of course, if board in question doesn't have an eMMC, it won't boot
from there, and that's the most common case on mt8195. It could be
argued that USB should boot after SD, but that causes an USB scan
that is slow and seems prone to failure currently.
Network already works on mt8195, so add it to the end of the boot
order. For it to actually work, one needs to set a MAC address in
the u-boot environment, and save it (it will be stored on UFS LUN 1).
The kernel will also use the same MAC.
in-uboot prompt: `setenv ethaddr xx:...` and `saveenv`
in-kernel: use `fw_setenv` if available
Signed-off-by: Ricardo Pardini <[email protected]>
---
include/configs/mt8195.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/configs/mt8195.h b/include/configs/mt8195.h
index 111111111111..222222222222 100644
--- a/include/configs/mt8195.h
+++ b/include/configs/mt8195.h
@@ -121,9 +121,12 @@
#endif
#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
BOOT_TARGET_SCSI(func) \
- BOOT_TARGET_MMC(func) \
- BOOT_TARGET_USB(func)
+ func(MMC, mmc, 1) \
+ BOOT_TARGET_USB(func) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
#if !defined(CONFIG_EXTRA_ENV_SETTINGS)
--
Armbian