# Rockchip RK3582 SoC octa core 4-16GB SoC eMMC USB3 BOARD_NAME="Radxa E52C" BOARD_VENDOR="radxa" BOARDFAMILY="rockchip-rk3588" BOARD_MAINTAINER="amazingfate schwar3kat" BOOTCONFIG="radxa-e52c-rk3588s_defconfig" KERNEL_TARGET="vendor,current,edge" BOOT_FDT_FILE="rockchip/rk3588s-radxa-e52c.dtb" BOOT_SCENARIO="spl-blobs" BOOT_SOC="rk3588" DEFAULT_CONSOLE="serial" IMAGE_PARTITION_TABLE="gpt" HAS_VIDEO_OUTPUT="no" function post_family_tweaks_bsp__radxa_e52c_enable_leds() { display_alert "Creating board support LEDs config for radxa-e52c." cat <<- EOF > "${destination}"/etc/armbian-leds.conf [/sys/class/leds/lan-led] trigger=netdev interval=52 brightness=1 link=1 tx=0 rx=1 device_name=lan [/sys/class/leds/wan-led] trigger=netdev interval=52 brightness=1 link=1 tx=0 rx=1 device_name=wan [/sys/class/leds/mmc0::] trigger=mmc0 brightness=0 [/sys/class/leds/sys-led] trigger=heartbeat brightness=0 invert=0 EOF # add a network rule to rename interfaces to match device labeling. display_alert "Creating board support network rename rule to rename interfaces to match device labeling for radxa-e52c" mkdir -p "${destination}"/etc/udev/rules.d/ cat <<- EOF > "${destination}"/etc/udev/rules.d/70-rename-lan.rules SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="enP3p49s0", NAME="wan" SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", KERNEL=="enP4p65s0", NAME="lan" EOF } # Mainline U-Boot, only for non-vendor BRANCH function post_family_config__radxa_e52c_use_mainline_uboot() { [[ "${BRANCH}" == "vendor" ]] && return 0 declare -g BOOT_FDT_FILE="rockchip/rk3582-radxa-e52c.dtb" display_alert "$BOARD" "u-boot ${BOOTBRANCH_BOARD} overrides" "info" declare -g BOOTCONFIG="radxa-e52c-rk3582_defconfig" declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git" declare -g BOOTBRANCH="tag:v2026.01" declare -g BOOTPATCHDIR="v2026.01" 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" 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 } } # Mainline U-Boot, only for non-vendor BRANCH function post_config_uboot_target__extra_configs_for_radxa_e52c_mainline_uboot() { [[ "${BRANCH}" == "vendor" ]] && return 0 display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable BTRFS filesystem support" "info" run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS }