* Add BOARD_VENDOR to board configs * Add BOARD_VENDOR to all board configuration files - Added BOARD_VENDOR variable to board configuration files - Using lowercase vendor slugs (e.g., friendlyelec, radxa, xunlong) - Set 'generic' for boards without clear vendor match - TV box files (.tvb) excluded as they have no clear vendor - Enables better board categorization and vendor-specific handling * Manual adjustements on top of AI matching * Drop doubled definition and add retroid vendor
114 lines
5.6 KiB
Plaintext
114 lines
5.6 KiB
Plaintext
# Rockchip RK3528 SoC GMAC1 RTL8367RB NVMe
|
|
BOARD_NAME="Radxa E24C"
|
|
BOARD_VENDOR="radxa"
|
|
BOARDFAMILY="rockchip-rk3588"
|
|
BOARD_MAINTAINER="rpardini"
|
|
BOOTCONFIG="radxa-e24c-spi-rk3528_defconfig" # vendor uboot defconfig; Radxa's name
|
|
KERNEL_TARGET="vendor" # edge (6.18) is not ready yet: ,edge
|
|
BOOT_FDT_FILE="rockchip/rk3528-radxa-e24c-spi.dtb" # for non-eMMC boards, with SPI NOR: "SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB"
|
|
#BOOT_FDT_FILE="rockchip/rk3528-radxa-e24c.dtb" # for eMMC boards
|
|
BOOT_SCENARIO="spl-blobs"
|
|
BOOT_SOC="rk3528"
|
|
IMAGE_PARTITION_TABLE="gpt"
|
|
|
|
# Schematics: https://dl.radxa.com/e/e24c/docs/radxa_e24c_v1200_schematic.pdf
|
|
|
|
# Mainline U-Boot, only for non-vendor BRANCH
|
|
function post_family_config__e24c_use_mainline_uboot() {
|
|
if [[ "${BRANCH}" == "vendor" ]]; then
|
|
return 0
|
|
fi
|
|
|
|
declare -g BOOTCONFIG="radxa-e24c-rk3528_defconfig" # mainline uboot defconfig; Kwiboo's name
|
|
display_alert "$BOARD" "Using Kwiboo's U-Boot for $BOARD / $BRANCH" "info"
|
|
|
|
declare -g BOOTDELAY=1
|
|
|
|
# This is Kwiboo's work branch, based on 2025.07 at ebd699c97de0576d9f8703b8afc5e71f98ff18d2
|
|
declare -g BOOTSOURCE="https://github.com/Kwiboo/u-boot-rockchip.git"
|
|
declare -g BOOTBRANCH="branch:rk3528" # at commit:ebd699c97de0576d9f8703b8afc5e71f98ff18d2
|
|
declare -g BOOTPATCHDIR="kwiboo-rk3528-no-patches"
|
|
declare -g BOOTDIR="u-boot-${BOARD}"
|
|
declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.bin"
|
|
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd # disable stuff from rockchip64_common; we're using binman here which does all the work already
|
|
|
|
# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
|
|
function write_uboot_platform() {
|
|
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
|
|
}
|
|
|
|
function write_uboot_platform_mtd() {
|
|
flashcp -v -p "$1/u-boot-rockchip-spi.bin" /dev/mtd0
|
|
}
|
|
}
|
|
|
|
# Mainline U-Boot, only for non-vendor BRANCH
|
|
# "rockchip-common: boot SD card first, then NVMe, then mmc"
|
|
# On radxa-e24c, mmc0 is the eMMC, mmc1 is the SD card slot
|
|
function pre_config_uboot_target__cm3588_patch_rockchip_common_boot_order() {
|
|
if [[ "${BRANCH}" == "vendor" ]]; then
|
|
return 0
|
|
fi
|
|
|
|
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
|
|
}
|
|
|
|
# Mainline U-Boot, only for non-vendor BRANCH
|
|
function post_config_uboot_target__extra_configs_for_e24c_uboot() {
|
|
if [[ "${BRANCH}" == "vendor" ]]; then
|
|
return 0
|
|
fi
|
|
|
|
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 SYS on; sleep 0.1; led SYS off; led LAN1 on; sleep 0.1; led LAN1 off; led LAN2 on; sleep 0.1; led LAN2 off; led LAN3 on; sleep 0.1; led LAN3 off; '" # 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
|
|
|
|
return 0
|
|
}
|
|
|
|
# When not using vendor, set use ttyS0 as default console in bootscript
|
|
function post_family_config__e24c_set_serial_console_for_edge() {
|
|
if [[ "${BRANCH}" == vendor ]]; then
|
|
display_alert "$BOARD" "Using vendor kernel; keeping default console settings" "info"
|
|
else
|
|
display_alert "$BOARD" "Setting default console to serial ttyS0 for mainline kernel bootscript" "info"
|
|
declare -g BOOTSCRIPT="boot-rockchip64-ttyS0.cmd:boot.cmd"
|
|
declare -g SERIALCON="ttyS0"
|
|
fi
|
|
}
|