WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions config/boards/radxa-e24c.wip
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Rockchip RK3528 SoC GMAC1 RTL8367RB NVMe
BOARD_NAME="Radxa E24C"
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
}
4 changes: 4 additions & 0 deletions config/kernel/linux-rockchip64-edge.config
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,10 @@ CONFIG_NET_DSA_SJA1105=m
CONFIG_NET_DSA_XRS700X_I2C=m
CONFIG_NET_DSA_XRS700X_MDIO=m
CONFIG_NET_DSA_REALTEK=m
CONFIG_NET_DSA_REALTEK_MDIO=y
CONFIG_NET_DSA_REALTEK_SMI=y
CONFIG_NET_DSA_REALTEK_RTL8365MB=m
CONFIG_NET_DSA_REALTEK_RTL8366RB=m
CONFIG_NET_DSA_SMSC_LAN9303_I2C=m
CONFIG_NET_DSA_SMSC_LAN9303_MDIO=m
CONFIG_NET_DSA_VITESSE_VSC73XX_SPI=m
Expand Down
1 change: 1 addition & 0 deletions config/sources/families/include/rockchip64_common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ case "$BOOT_SOC" in
BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}"
DDR_BLOB="${DDR_BLOB:-"rk35/rk3528_ddr_1056MHz_v1.09.bin"}"
BL31_BLOB="${BL31_BLOB:-"rk35/rk3528_bl31_v1.17.elf"}"
ROCKUSB_BLOB="rk35/rk3528_spl_loader_v1.07.104.bin"
;;

rk3566)
Expand Down