kumquat-buildroot/boot/ti-k3-image-gen/ti-k3-image-gen.mk
Xuanhao Shi 6134872d28 boot/ti-k3-image-gen: new package
This is the image generator that builds the initial boot binary,
tiboot3.bin, for the R5 core on TI's K3 family of devices.

This requires the R5 SPL output from the ti-k3-r5-loader package as
well as some boot firmware from ti-k3-boot-firmware.

Signed-off-by: Xuanhao Shi <x-shi@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Acked-by: Andrew Davis <afd@ti.com>
Tested-by: Bryan Brattlof <bb@ti.com>
Cc: Romain Naour <romain.naour@gmail.com>
Reviewed-by: Francois Perrad <francois.perrad@gadz.org>
Reviewed-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-22 12:01:08 +02:00

55 lines
1.8 KiB
Makefile

################################################################################
#
# ti-k3-image-gen
#
################################################################################
TI_K3_IMAGE_GEN_VERSION = 08.06.00.007
TI_K3_IMAGE_GEN_SITE = https://git.ti.com/cgit/k3-image-gen/k3-image-gen/snapshot
TI_K3_IMAGE_GEN_SOURCE = k3-image-gen-$(TI_K3_IMAGE_GEN_VERSION).tar.gz
TI_K3_IMAGE_GEN_LICENSE = BSD-3-Clause
TI_K3_IMAGE_GEN_LICENSE_FILES = LICENSE
TI_K3_IMAGE_GEN_INSTALL_IMAGES = YES
# - ti-k3-image-gen is used to build tiboot3.bin, using the
# r5-u-boot-spl.bin file from the ti-k3-r5-loader package. Hence the
# dependency on ti-k3-r5-loader.
# - the ti-k3-image-gen makefiles seem to need some feature from Make
# v4.0, similar to u-boot.
TI_K3_IMAGE_GEN_DEPENDENCIES = \
host-arm-gnu-toolchain \
host-python3 \
host-openssl \
host-uboot-tools \
ti-k3-r5-loader \
ti-k3-boot-firmware \
$(BR2_MAKE_HOST_DEPENDENCY)
TI_K3_IMAGE_GEN_FW_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_FW_TYPE))
TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
TI_K3_IMAGE_GEN_SECTYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SECTYPE))
TI_K3_IMAGE_GEN_SYSFW = $(TI_K3_IMAGE_GEN_FW_TYPE)-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SECTYPE).bin
define TI_K3_IMAGE_GEN_CONFIGURE_CMDS
cp $(BINARIES_DIR)/ti-sysfw/$(TI_K3_IMAGE_GEN_SYSFW) $(@D)
endef
define TI_K3_IMAGE_GEN_BUILD_CMDS
$(TARGET_MAKE_ENV) \
$(BR2_MAKE) -C $(@D) \
SOC=$(TI_K3_IMAGE_GEN_SOC) \
SOC_TYPE=$(TI_K3_IMAGE_GEN_SECTYPE) \
CONFIG=evm \
CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
O=$(@D)/tmp \
BIN_DIR=$(@D)
endef
define TI_K3_IMAGE_GEN_INSTALL_IMAGES_CMDS
cp $(@D)/tiboot3.bin $(BINARIES_DIR)
endef
$(eval $(generic-package))