mirror of
git://git.yoctoproject.org/meta-rockchip.git
synced 2025-07-04 20:54:48 +02:00

oe-core has completely re-written the fitImage support starting roughly at commit [1], update meta-rockchip to match. Most of the MACHINEs in meta-rockchip use a fitImage for the kernel, but some don't. Create a boolean variable (RK_KERNEL_FITIMAGE), enabled by default, to keep track of which ones do and which ones don't. Use this variable to decide how to configure various image-related fields. Build tested with all meta-rockchip MACHINEs both with and without RAUC. Run tested on the following with RAUC configured: - nanopi-m4b - nanopi-r2s - radxa-zero-3e - rock-pi-4b - rock-pi-e - rock-pi-s Run tested on the following without RAUC: - radxa-zero-3e - rock-pi-e - rock-pi-s [1] oe-core: 3442d9297dca ("oe-selftest: fitimage: test external dtb") Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Trevor Woerner <twoerner@gmail.com>
25 lines
1.3 KiB
C++
25 lines
1.3 KiB
C++
# KERNEL_DEVICETREE follows the pattern of
|
|
# 'rockchip/${SOC_FAMILY}-${BOARD}.dtb' which is required when compiling
|
|
# the kernel so the kernel's Makefile can find the device tree
|
|
#
|
|
# when using extlinux with a fitImage the device tree is contained in the
|
|
# fitImage
|
|
#
|
|
# however for non-fitImages it is not found at
|
|
# $UBOOT_EXTLINUX_FDTDIR/rockchip/$KERNEL_DEVICETREE but rather at
|
|
# $UBOOT_EXTLINUX_FDTDIR/$KERNEL_DEVICETREE therefore we need to strip off
|
|
# the 'rockchip/' part for extlinux non-fitImage builds
|
|
NONFITDT ?= "${@d.getVar('KERNEL_DEVICETREE').split()[0].split('/')[1]}"
|
|
|
|
UBOOT_EXTLINUX ?= "1"
|
|
UBOOT_EXTLINUX_ROOT ?= "root=PARTLABEL=rootfsA"
|
|
UBOOT_EXTLINUX_FDTDIR ?= "${@ '' if bb.utils.to_boolean(d.getVar('RK_KERNEL_FITIMAGE')) else '/boot'}"
|
|
UBOOT_EXTLINUX_FDT ?= "${@ '' if bb.utils.to_boolean(d.getVar('RK_KERNEL_FITIMAGE')) else '/boot/${NONFITDT}'}"
|
|
UBOOT_EXTLINUX_CONSOLE ?= "earlycon console=tty1 console=${RK_CONSOLE_DEVICE},${RK_CONSOLE_BAUD}n8"
|
|
UBOOT_EXTLINUX_KERNEL_ARGS ?= "rootwait rw rootfstype=ext4"
|
|
UBOOT_EXTLINUX_KERNEL_IMAGE ?= "/boot/${@ 'fitImage' if bb.utils.to_boolean(d.getVar('RK_KERNEL_FITIMAGE')) else '${KERNEL_IMAGETYPE}'}"
|
|
UBOOT_EXTLINUX_LABELS ?= "default"
|
|
UBOOT_EXTLINUX_MENU_DESCRIPTION:default ?= "${MACHINE}"
|
|
|
|
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "u-boot-extlinux"
|