From ce584a7b147e067c959c95dda88ffd01181c1d3e Mon Sep 17 00:00:00 2001 From: SuperKali Date: Fri, 28 Nov 2025 18:37:49 +0100 Subject: [PATCH] board: youyeetoo-r1-v3: fix boot order to prioritize SD card over eMMC (#9006) The device tree aliases show: - mmc0 = sdhci (eMMC, 8-bit, non-removable) - mmc1 = sdmmc (SD card, 4-bit, removable) Previous boot order (mmc0, nvme, mmc1) caused the system to always boot from eMMC when multiple storage devices were present, ignoring bootable SD cards. New boot order (mmc1, nvme, mmc0) now correctly prioritizes: 1. SD card 2. NVMe 3. eMMC This ensures consistent boot behavior when using SD card as primary boot device. --- config/boards/youyeetoo-r1-v3.csc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/boards/youyeetoo-r1-v3.csc b/config/boards/youyeetoo-r1-v3.csc index a55f3db63..44b2e78a0 100644 --- a/config/boards/youyeetoo-r1-v3.csc +++ b/config/boards/youyeetoo-r1-v3.csc @@ -54,13 +54,13 @@ function post_family_config__youyeetoo_r1_use_mainline_uboot() { } } -# "rockchip-common: boot SD card first, then NVMe, then mmc" +# "rockchip-common: boot SD card first, then NVMe, then eMMC" # include/configs/rockchip-common.h -# -#define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp" -# +#define BOOT_TARGETS "mmc0 nvme mmc1 scsi usb pxe dhcp" -# On Youyeetoo R1, mmc0 is the SD card, mmc1 is the eMMC slot +# -#define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp" (default) +# +#define BOOT_TARGETS "mmc1 nvme mmc0 scsi usb pxe dhcp" +# On Youyeetoo R1, mmc0 is the eMMC (sdhci), mmc1 is the SD card (sdmmc) function pre_config_uboot_target__youyeetoo_r1_patch_rockchip_common_boot_order() { - declare -a rockchip_uboot_targets=("mmc0" "nvme" "mmc1" "scsi" "usb" "pxe" "dhcp") # for future make-this-generic delight + declare -a rockchip_uboot_targets=("mmc1" "nvme" "mmc0" "scsi" "usb" "pxe" "dhcp") # mmc1=SD, mmc0=eMMC display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: adjust boot order to '${rockchip_uboot_targets[*]}'" "info" sed -i -e "s/#define BOOT_TARGETS.*/#define BOOT_TARGETS \"${rockchip_uboot_targets[*]}\"/" include/configs/rockchip-common.h regular_git diff -u include/configs/rockchip-common.h || true @@ -72,7 +72,7 @@ function post_family_tweaks__youyeetoo_r1 { [[ "${BRANCH}" == "vendor" ]] && return 0 display_alert "$BOARD" "Adjusting rtw89_8852be module" "info" - + cat <<- EOF > "${SDCARD}/etc/modprobe.d/rtw8852be.conf" options rtw89_pci disable_aspm_l1=y disable_aspm_l1ss=y options rtw89pci disable_aspm_l1=y disable_aspm_l1ss=y