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.
This commit is contained in:
SuperKali 2025-11-28 18:37:49 +01:00 committed by GitHub
parent 7dbd7cab12
commit ce584a7b14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -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