mekotronics-r58x-pro: mainline u-boot v2026.04-rc2; mainline 6.19 kernel (edge)
- with its own defconfig (identical to r58x-4g) - own DT symlink - fix the vendor DT (was missing the `maizhuo` suffix - no dial gpio keys)
This commit is contained in:
parent
a1d85a2a3a
commit
692583a57c
@ -3,10 +3,109 @@ declare -g BOARD_NAME="Mekotronics R58X-Pro"
|
|||||||
declare -g BOARD_VENDOR="mekotronics"
|
declare -g BOARD_VENDOR="mekotronics"
|
||||||
declare -g BOARDFAMILY="rockchip-rk3588"
|
declare -g BOARDFAMILY="rockchip-rk3588"
|
||||||
declare -g BOARD_MAINTAINER=""
|
declare -g BOARD_MAINTAINER=""
|
||||||
declare -g KERNEL_TARGET="vendor"
|
declare -g KERNEL_TARGET="edge,vendor"
|
||||||
declare -g BOOTCONFIG="mekotronics_r58x-rk3588_defconfig" # vendor u-boot; with NVMe and a DTS
|
declare -g BOOT_FDT_FILE="rockchip/rk3588-mekotronics-r58x-pro.dtb" # mainline name; see below for vendor
|
||||||
declare -g BOOT_FDT_FILE="rockchip/rk3588-blueberry-edge-v12-maizhuo-linux.dtb" # Specific to this board
|
declare -g DISPLAY_MANAGER="wayland"
|
||||||
declare -g UEFI_EDK2_BOARD_ID="r58x" # This _only_ used for uefi-edk2-rk3588 extension
|
declare -g ASOUND_STATE="asound.state.rk3588hd"
|
||||||
|
declare -g BOOT_SOC="rk3588"
|
||||||
|
declare -g IMAGE_PARTITION_TABLE="gpt"
|
||||||
|
# Does not have a UEFI_EDK2_BOARD_ID
|
||||||
|
|
||||||
# Source vendor-specific configuration
|
if [[ "${BRANCH}" == "vendor" || "${BRANCH}" == "legacy" ]]; then
|
||||||
source "${SRC}/config/sources/vendors/mekotronics/mekotronics-rk3588.conf.sh"
|
display_alert "$BOARD" "vendor/legacy configuration applied for $BOARD / $BRANCH" "info"
|
||||||
|
declare -g BOOTCONFIG="mekotronics_r58x-rk3588_defconfig" # vendor u-boot; with NVMe and a DTS
|
||||||
|
declare -g BOOT_FDT_FILE="rockchip/rk3588-blueberry-edge-v12-maizhuo-linux.dtb" # different for vendor
|
||||||
|
# Source shared vendor configuration; it does BOOT_SCENARIO="spl-blobs" & hciattach - common to all vendor-kernel Meko's
|
||||||
|
source "${SRC}/config/sources/vendors/mekotronics/mekotronics-rk3588.conf.sh"
|
||||||
|
return 0 # this returns early so below code is only for current/edge branches
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For current/edge branches:
|
||||||
|
display_alert "$BOARD" "applying mainline configuration for $BOARD / $BRANCH" "info"
|
||||||
|
declare -g BOOT_SCENARIO="tpl-blob-atf-mainline" # Mainline ATF
|
||||||
|
|
||||||
|
function post_family_config__meko_r58x_pro_use_mainline_uboot() {
|
||||||
|
display_alert "$BOARD" "mainline u-boot overrides for $BOARD / $BRANCH" "info"
|
||||||
|
|
||||||
|
declare -g BOOTCONFIG="mekotronics-r58x-pro-rk3588_defconfig" # mainline
|
||||||
|
declare -g BOOTDELAY=1
|
||||||
|
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git"
|
||||||
|
declare -g BOOTBRANCH="tag:v2026.04-rc2"
|
||||||
|
declare -g BOOTPATCHDIR="v2026.04"
|
||||||
|
declare -g BOOTDIR="u-boot-${BOARD}"
|
||||||
|
|
||||||
|
declare -g UBOOT_TARGET_MAP="BL31=bl31.elf ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"
|
||||||
|
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd
|
||||||
|
|
||||||
|
function write_uboot_platform() {
|
||||||
|
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
|
||||||
|
}
|
||||||
|
|
||||||
|
declare -g PLYMOUTH="no" # Disable plymouth as that only causes more confusion
|
||||||
|
}
|
||||||
|
|
||||||
|
# "rockchip-common: boot NVMe, SATA, USB, then eMMC last before PXE"
|
||||||
|
# include/configs/rockchip-common.h
|
||||||
|
# On the meko r58x_pro: mmc0 is eMMC; there is no SDcard reader @TODO yes there is
|
||||||
|
# Enumerating usb is pretty slow so do it after nvme
|
||||||
|
function pre_config_uboot_target__meko_r58x_pro_patch_rockchip_common_boot_order() {
|
||||||
|
declare -a rockchip_uboot_targets=("nvme" "scsi" "usb" "mmc0" "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 pre_config_uboot_target__meko_r58x_pro_patch_uboot_dtsi_for_ums() {
|
||||||
|
[[ "${BRANCH}" == "vendor" ]] && return 0 # Not for 'vendor' branch, which uses 2017.09 vendor u-boot from Radxa
|
||||||
|
|
||||||
|
display_alert "u-boot for ${BOARD}" "u-boot: add to u-boot dtsi for UMS" "info" # avoid a patch, just append to the dtsi file
|
||||||
|
# Append to the t6 u-boot dtsi file with stuff for enabling gadget/otg/peripheral mode
|
||||||
|
cat <<- EOD >> arch/arm/dts/rk3588-mekotronics-r58x-pro-u-boot.dtsi
|
||||||
|
#include "rk3588-generic-u-boot.dtsi"
|
||||||
|
&u2phy0 { status = "okay"; };
|
||||||
|
&u2phy0_otg { status = "okay"; };
|
||||||
|
&usbdp_phy0 { status = "okay"; };
|
||||||
|
&usb_host0_xhci { dr_mode = "peripheral"; maximum-speed = "high-speed"; status = "okay"; };
|
||||||
|
EOD
|
||||||
|
}
|
||||||
|
|
||||||
|
function post_config_uboot_target__extra_configs_for_meko_r58x_pro_mainline_environment_in_spi() {
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable board-specific configs" "info"
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_CMD_MISC
|
||||||
|
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable preboot & flash user LED in preboot" "info"
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_USE_PREBOOT
|
||||||
|
run_host_command_logged scripts/config --set-str CONFIG_PREBOOT "'led 4G on; sleep 0.1; led LAN on; sleep 0.1; led PWR on; sleep 0.1; led 4G off; sleep 0.1; led LAN off; sleep 0.1;'" # double quotes required due to run_host_command_logged's quirks
|
||||||
|
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable EFI debugging commands" "info"
|
||||||
|
run_host_command_logged scripts/config --enable CMD_EFIDEBUG
|
||||||
|
run_host_command_logged scripts/config --enable CMD_NVEDIT_EFI
|
||||||
|
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more filesystems support" "info"
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS
|
||||||
|
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more compression support" "info"
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_LZO
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_BZIP2
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_ZSTD
|
||||||
|
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable gpio LED support" "info"
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_LED
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_LED_GPIO
|
||||||
|
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable networking cmds" "info"
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_CMD_NFS
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_CMD_WGET
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_CMD_DNS
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP
|
||||||
|
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP_SACK
|
||||||
|
|
||||||
|
# UMS, RockUSB, gadget stuff
|
||||||
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable UMS/RockUSB gadget" "info"
|
||||||
|
declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB" "CONFIG_CMD_USB_MASS_STORAGE")
|
||||||
|
for config in "${enable_configs[@]}"; do
|
||||||
|
run_host_command_logged scripts/config --enable "${config}"
|
||||||
|
done
|
||||||
|
# Auto-enabled by the above, force off...
|
||||||
|
run_host_command_logged scripts/config --disable USB_FUNCTION_FASTBOOT
|
||||||
|
}
|
||||||
|
|||||||
@ -0,0 +1,99 @@
|
|||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||||
|
CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||||
|
CONFIG_COUNTER_FREQUENCY=24000000
|
||||||
|
CONFIG_ARCH_ROCKCHIP=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3588-mekotronics-r58x-pro"
|
||||||
|
CONFIG_ROCKCHIP_RK3588=y
|
||||||
|
CONFIG_SPL_SERIAL=y
|
||||||
|
CONFIG_TARGET_ROCK5B_RK3588=y
|
||||||
|
CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||||
|
CONFIG_DEBUG_UART_BASE=0xFEB50000
|
||||||
|
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||||
|
CONFIG_PCI=y
|
||||||
|
CONFIG_DEBUG_UART=y
|
||||||
|
CONFIG_AHCI=y
|
||||||
|
CONFIG_FIT=y
|
||||||
|
CONFIG_FIT_VERBOSE=y
|
||||||
|
CONFIG_SPL_FIT_SIGNATURE=y
|
||||||
|
CONFIG_SPL_LOAD_FIT=y
|
||||||
|
CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||||
|
CONFIG_OF_BOARD_SETUP=y
|
||||||
|
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-mekotronics-r58x-pro.dtb"
|
||||||
|
# CONFIG_DISPLAY_CPUINFO is not set
|
||||||
|
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||||
|
CONFIG_SPL_MAX_SIZE=0x40000
|
||||||
|
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||||
|
CONFIG_SPL_ATF=y
|
||||||
|
CONFIG_CMD_TCPM=y
|
||||||
|
CONFIG_CMD_GPIO=y
|
||||||
|
CONFIG_CMD_GPT=y
|
||||||
|
CONFIG_CMD_I2C=y
|
||||||
|
CONFIG_CMD_MMC=y
|
||||||
|
CONFIG_CMD_PCI=y
|
||||||
|
CONFIG_CMD_USB=y
|
||||||
|
CONFIG_CMD_ROCKUSB=y
|
||||||
|
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||||
|
# CONFIG_CMD_SETEXPR is not set
|
||||||
|
CONFIG_CMD_REGULATOR=y
|
||||||
|
# CONFIG_SPL_DOS_PARTITION is not set
|
||||||
|
CONFIG_SPL_OF_CONTROL=y
|
||||||
|
CONFIG_OF_LIVE=y
|
||||||
|
CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||||
|
CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||||
|
CONFIG_SPL_REGMAP=y
|
||||||
|
CONFIG_SPL_SYSCON=y
|
||||||
|
CONFIG_AHCI_PCI=y
|
||||||
|
CONFIG_DWC_AHCI=y
|
||||||
|
CONFIG_SPL_CLK=y
|
||||||
|
# CONFIG_USB_FUNCTION_FASTBOOT is not set
|
||||||
|
CONFIG_ROCKCHIP_GPIO=y
|
||||||
|
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||||
|
CONFIG_LED=y
|
||||||
|
CONFIG_LED_GPIO=y
|
||||||
|
CONFIG_MISC=y
|
||||||
|
CONFIG_SUPPORT_EMMC_RPMB=y
|
||||||
|
CONFIG_MMC_DW=y
|
||||||
|
CONFIG_MMC_DW_ROCKCHIP=y
|
||||||
|
CONFIG_MMC_SDHCI=y
|
||||||
|
CONFIG_MMC_SDHCI_SDMA=y
|
||||||
|
CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||||
|
CONFIG_PHY_REALTEK=y
|
||||||
|
CONFIG_DWC_ETH_QOS=y
|
||||||
|
CONFIG_DWC_ETH_QOS_ROCKCHIP=y
|
||||||
|
CONFIG_NVME_PCI=y
|
||||||
|
CONFIG_PCIE_DW_ROCKCHIP=y
|
||||||
|
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||||
|
CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||||
|
CONFIG_PHY_ROCKCHIP_USBDP=y
|
||||||
|
CONFIG_SPL_PINCTRL=y
|
||||||
|
CONFIG_PWM_ROCKCHIP=y
|
||||||
|
CONFIG_SPL_RAM=y
|
||||||
|
CONFIG_SCSI=y
|
||||||
|
CONFIG_BAUDRATE=1500000
|
||||||
|
CONFIG_DEBUG_UART_SHIFT=2
|
||||||
|
CONFIG_SYS_NS16550_MEM32=y
|
||||||
|
CONFIG_SYSRESET=y
|
||||||
|
CONFIG_USB=y
|
||||||
|
CONFIG_USB_XHCI_HCD=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
CONFIG_USB_EHCI_GENERIC=y
|
||||||
|
CONFIG_USB_OHCI_HCD=y
|
||||||
|
CONFIG_USB_OHCI_GENERIC=y
|
||||||
|
CONFIG_USB_DWC3=y
|
||||||
|
CONFIG_USB_DWC3_GENERIC=y
|
||||||
|
CONFIG_SPL_USB_DWC3_GENERIC=y
|
||||||
|
CONFIG_TYPEC_TCPM=y
|
||||||
|
CONFIG_TYPEC_FUSB302=y
|
||||||
|
CONFIG_USB_HOST_ETHER=y
|
||||||
|
CONFIG_USB_ETHER_ASIX=y
|
||||||
|
CONFIG_USB_ETHER_ASIX88179=y
|
||||||
|
CONFIG_USB_ETHER_LAN75XX=y
|
||||||
|
CONFIG_USB_ETHER_LAN78XX=y
|
||||||
|
CONFIG_USB_ETHER_MCS7830=y
|
||||||
|
CONFIG_USB_ETHER_RTL8152=y
|
||||||
|
CONFIG_USB_ETHER_SMSC95XX=y
|
||||||
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||||
|
CONFIG_USB_FUNCTION_ROCKUSB=y
|
||||||
|
CONFIG_ERRNO_STR=y
|
||||||
@ -0,0 +1 @@
|
|||||||
|
../../../kernel/archive/rockchip64-6.19/dt/rk3588-mekotronics-r58x-pro.dts
|
||||||
Loading…
Reference in New Issue
Block a user