Skip to content

Commit

Permalink
radxa-zero3: add edge branch (6.9.y) by picking DT from linux-rockc…
Browse files Browse the repository at this point in the history
…hip#for-next & using Kwiboo's 24.07 u-boot

- u-boot:
   - unset `BOOT_FDT_FILE` for edge branch; that lets Armbian bootscript use the fdtfile auto-detected and set by u-boot
   - unset `BOOTFS_TYPE`, since mainline u-boot can boot ext4 directly
- kernel DTs from https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/tree/arch/arm64/boot/dts/rockchip?h=84a3d3b435e7c109d2141c5bbb9eaab146c94df0

Co-authored-by: Jonas Karlman <[email protected]>
Co-authored-by: Ricardo Pardini <[email protected]> (null-patch to bare-dt)
  • Loading branch information
2 people authored and rpardini committed Jun 30, 2024
1 parent d78a5ad commit ec8c470
Show file tree
Hide file tree
Showing 4 changed files with 697 additions and 2 deletions.
24 changes: 22 additions & 2 deletions config/boards/radxa-zero3.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ BOARD_NAME="Radxa ZERO 3"
BOARDFAMILY="rk35xx"
BOARD_MAINTAINER="Radxa"
BOOTCONFIG="radxa-zero3-rk3566_defconfig"
KERNEL_TARGET="legacy,vendor"
KERNEL_TARGET="legacy,vendor,edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3566-radxa-zero3.dtb"
IMAGE_PARTITION_TABLE="gpt"
BOOT_SCENARIO="spl-blobs"
BOOTFS_TYPE="fat"
BOOTFS_TYPE="fat" # Only for vendor/legacy

function post_family_config_branch_edge__use_mainline_dtb_name() {
unset BOOT_FDT_FILE # boot.scr will use whatever u-boot detects and sets 'fdtfile' to
unset BOOTFS_TYPE # mainline u-boot can boot ext4 directly
}

# Override family config for this board; let's avoid conditionals in family config.
function post_family_config__radxa-zero3_use_vendor_uboot() {
Expand All @@ -25,3 +30,18 @@ function post_family_config__radxa-zero3_use_vendor_uboot() {
dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none
}
}

function post_family_config_branch_edge__radxa-zero3_use_kwiboo_uboot() {
BOOTCONFIG="radxa-zero-3-rk3566_defconfig"
BOOTSOURCE='https://github.com/Kwiboo/u-boot-rockchip.git'
BOOTBRANCH='branch:rk3xxx-2024.07'
BOOTPATCHDIR="u-boot-zero3" # Empty

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

function write_uboot_platform() {
dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none
}
}
Loading

0 comments on commit ec8c470

Please sign in to comment.