@@ -16,15 +16,6 @@ BOOT_SPI_RKSPI_LOADER="yes"
1616
1717DEFAULT_OVERLAYS="nanopi-m6-display-dsi1-yx35" # Enable YX35 LCD
1818
19- function post_family_config__nanopi_m6_support_spi_boot() {
20- if [[ $BRANCH == "current" || $BRANCH == "edge" ]]; then
21- return
22- fi
23-
24- UBOOT_TARGET_MAP="nanopi-m6-rk3588s_defconfig BL31=$RKBIN_DIR/$BL31_BLOB spl/u-boot-spl.bin u-boot.dtb u-boot.itb;;idbloader.img u-boot.itb
25- nanopi-m6-spi-rk3588s_defconfig BL31=$RKBIN_DIR/$BL31_BLOB spl/u-boot-spl.bin u-boot.dtb u-boot.itb;;rkspi_loader.img"
26- }
27-
2819function post_family_tweaks__nanopim6_naming_udev_audios() {
2920 display_alert "$BOARD" "Renaming NanoPi M6 HDMI audio" "info"
3021
@@ -45,10 +36,6 @@ function post_family_tweaks__nanopim6_naming_udev_network_interfaces() {
4536}
4637
4738function pre_config_uboot_target__nanopi_m6_patch_uboot_bootconfig_hack_for_spi() {
48- if [[ $BRANCH == "vendor" ]]; then
49- return
50- fi
51-
5239 display_alert "u-boot for ${BOARD}" "u-boot: hack bootconfig for spi image" "info"
5340
5441 if [[ $target_make == *"nanopi-m6-spi-rk3588s_defconfig"* ]]; then
@@ -61,10 +48,6 @@ function pre_config_uboot_target__nanopi_m6_patch_uboot_bootconfig_hack_for_spi(
6148}
6249
6350function post_config_uboot_target__nanopi_m6_keep_spi_bootconfig() {
64- if [[ $BRANCH == "vendor" ]]; then
65- return
66- fi
67-
6851 display_alert "u-boot for ${BOARD}" "u-boot: hack bootconfig for spi image" "info"
6952
7053 if [[ $BOOTCONFIG == "nanopi-m6-spi-rk3588s_defconfig" ]]; then
@@ -73,10 +56,6 @@ function post_config_uboot_target__nanopi_m6_keep_spi_bootconfig() {
7356}
7457
7558function pre_package_uboot_image__nanopi_m6_copy_spiconfig_to_package() {
76- if [[ $BRANCH == "vendor" ]]; then
77- return
78- fi
79-
8059 if [[ -f "${uboottempdir}/.config.spi" ]]; then
8160 run_host_command_logged cp ${uboottempdir}/.config.spi "$uboottempdir/usr/lib/u-boot/nanopi-m6-spi-rk3588s_defconfig"
8261 run_host_command_logged rm ${uboottempdir}/.config.spi
@@ -85,10 +64,6 @@ function pre_package_uboot_image__nanopi_m6_copy_spiconfig_to_package() {
8564
8665
8766function post_family_config__nanopi_m6_use_mainline_uboot() {
88- if [[ $BRANCH == "vendor" ]]; then
89- return
90- fi
91-
9267 display_alert "$BOARD" "Mainline U-Boot overrides for $BOARD - $BRANCH" "info"
9368
9469 declare -g BOOTCONFIG="nanopi-m6-rk3588s_defconfig"
@@ -102,3 +77,10 @@ function post_family_config__nanopi_m6_use_mainline_uboot() {
10277 BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB} $BOOTCONFIG;;u-boot-rockchip.bin"
10378 unset uboot_custom_postprocess # disable stuff from rockchip64_common; we're using binman here which does all the work already
10479}
80+
81+ function pre_config_uboot_target__nanopi_m6_patch_rockchip_common_boot_order() {
82+ declare -a rockchip_uboot_targets=("mmc0" "nvme" "mmc1" "scsi" "usb" "pxe" "dhcp" "spi") # for future make-this-generic delight
83+ display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: adjust boot order to '${rockchip_uboot_targets[*]}'" "info"
84+ sed -i -e "s/#define BOOT_TARGETS.*/#define BOOT_TARGETS \"${rockchip_uboot_targets[*]}\"/" include/configs/rockchip-common.h
85+ regular_git diff -u include/configs/rockchip-common.h || true
86+ }
0 commit comments