diff --git a/config/boards/nanopct6.conf b/config/boards/nanopct6.conf index 8c6be3e520..9b8dd58ecc 100644 --- a/config/boards/nanopct6.conf +++ b/config/boards/nanopct6.conf @@ -89,6 +89,18 @@ function pre_config_uboot_target__nanoptc6_patch_uboot_dtsi_for_ums() { run_host_command_logged env -i "${common_envs[@]@Q}" "${commit_envs[@]@Q}" git "${git_params[@]@Q}" commit "${commit_params[@]@Q}" -m "'Update OF upstream to v6.13-rc5-dts and accept theirs on all conflicts'" } +# "rockchip-common: boot SD card first, then NVMe, then mmc" +# include/configs/rockchip-common.h +# -#define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp spi" +# +#define BOOT_TARGETS "mmc0 nvme mmc1 scsi usb pxe dhcp spi" +# On nanopct6, mmc0 is the eMMC, mmc1 is the SD card slot +function pre_config_uboot_target__nanopct6_patch_rockchip_common_boot_order() { + declare -a rockchip_uboot_targets=("mmc1" "nvme" "mmc0" "scsi" "usb" "pxe" "dhcp" "spi") # for future make-this-generic delight + 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 +} + function post_config_uboot_target__extra_configs_for_nanopct6_mainline_environment_in_spi() { [[ "${BRANCH}" != "edge" ]] && return 0