From: Andreas Dannenberg via buildroot <buildroot@buildroot.org>
To: <buildroot@buildroot.org>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Subject: [Buildroot] [PATCH v8 01/10] boot/ti-k3-r5-loader: allow for full build source customization
Date: Thu, 15 Jun 2023 19:23:50 -0500 [thread overview]
Message-ID: <20230616002359.4139814-2-dannenberg@ti.com> (raw)
In-Reply-To: <20230616002359.4139814-1-dannenberg@ti.com>
The TI K3 R5 loader package essentially is a wrapper to build a special
version of U-boot SPL used as part of a multi-stage boot flow on TI K3
devices, and as such needs full flexibility as to specifying the U-Boot
sources used for the build. To accomodate this, add the same options as
already available in the regular U-Boot package. For most use cases, the
same source settings (repo URL, versions, etc.) should be used for both
ti-k3-r5-loader and uboot packages.
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
---
boot/ti-k3-r5-loader/Config.in | 65 +++++++++++++++++++++++--
boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 28 ++++++++++-
2 files changed, 89 insertions(+), 4 deletions(-)
diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
index 10602c8df3..2419babe70 100644
--- a/boot/ti-k3-r5-loader/Config.in
+++ b/boot/ti-k3-r5-loader/Config.in
@@ -1,14 +1,73 @@
config BR2_TARGET_TI_K3_R5_LOADER
- bool "ti-k3-r5-loader"
+ bool "TI K3 R5 Loader"
depends on BR2_aarch64
help
- Separate U-Boot build for R5 cores on TI's k3 boards.
+ Separate U-Boot SPL build for R5 core on TI's K3 processors.
Usually used to build tiboot3.bin with k3-image-gen.
if BR2_TARGET_TI_K3_R5_LOADER
choice
- prompt "Configuration"
+ prompt "U-Boot Version"
+ help
+ Select the specific U-Boot version you want to use to build the
+ initial SPL running on the R5 core. Note that for most use cases
+ you'd want to use the exact same configuration here as it is used
+ to build the main U-Boot package.
+
+config BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION
+ bool "2022.10"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
+ bool "Custom version"
+ help
+ This option allows to use a specific official versions
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
+ bool "Custom tarball"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT
+ bool "Custom Git repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG
+ bool "Custom Mercurial repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
+ bool "Custom Subversion repository"
+
+endchoice
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE
+ string "U-Boot version"
+ depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION
+ string "URL of custom U-Boot tarball"
+ depends on BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
+
+if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL
+ string "URL of custom repository"
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_VERSION
+ string "Custom repository version"
+ help
+ Revision to use in the typical format used by
+ Git/Mercurial/Subversion E.G. a sha id, a tag, branch, ..
+
+endif
+
+config BR2_TARGET_TI_K3_R5_LOADER_VERSION
+ string
+ default "2022.10" if BR2_TARGET_TI_K3_R5_LOADER_LATEST_VERSION
+ default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE \
+ if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION
+ default "custom" if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL
+ default BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_VERSION \
+ if BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG || BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN
+choice
+ prompt "U-Boot Configuration"
default BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
config BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
index afa309aa98..fe403a5c44 100644
--- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -2,11 +2,37 @@
#
# ti-k3-r5-loader
#
+# The ti-k3-r5 loader package should really be built from the same U-Boot
+# sources as the uboot package itself, so for most users so all LOADER_SITE /
+# LOADER_SOURCE type definitions should be set the same for both packages.
+# However it still makes sense to keep the ti-k3-r5-loader package somewhat
+# separated and independent from the uboot package to allow for special use
+# cases such as Falcon boot (which would skip the uboot package completely).
+#
################################################################################
-TI_K3_R5_LOADER_VERSION = 2022.10
+TI_K3_R5_LOADER_VERSION = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_VERSION))
+
+ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL),y)
+# Handle custom U-Boot tarballs as specified by the configuration
+TI_K3_R5_LOADER_TARBALL = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_TARBALL_LOCATION))
+TI_K3_R5_LOADER_SITE = $(patsubst %/,%,$(dir $(TI_K3_R5_LOADER_TARBALL)))
+TI_K3_R5_LOADER_SOURCE = $(notdir $(TI_K3_R5_LOADER_TARBALL))
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT),y)
+TI_K3_R5_LOADER_SITE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))
+TI_K3_R5_LOADER_SITE_METHOD = git
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_HG),y)
+TI_K3_R5_LOADER_SITE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))
+TI_K3_R5_LOADER_SITE_METHOD = hg
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_SVN),y)
+TI_K3_R5_LOADER_SITE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL))
+TI_K3_R5_LOADER_SITE_METHOD = svn
+else
+# Handle stable official U-Boot versions
TI_K3_R5_LOADER_SITE = https://ftp.denx.de/pub/u-boot
TI_K3_R5_LOADER_SOURCE = u-boot-$(TI_K3_R5_LOADER_VERSION).tar.bz2
+endif
+
TI_K3_R5_LOADER_LICENSE = GPL-2.0+
TI_K3_R5_LOADER_LICENSE_FILES = Licenses/gpl-2.0.txt
TI_K3_R5_LOADER_CPE_ID_VENDOR = denx
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-06-16 0:25 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-16 0:23 [Buildroot] [PATCH v8 00/10] add support for TI's AM64x and AM62x boards Andreas Dannenberg via buildroot
2023-06-16 0:23 ` Andreas Dannenberg via buildroot [this message]
2023-06-16 1:39 ` [Buildroot] [PATCH v8 01/10] boot/ti-k3-r5-loader: allow for full build source customization Patrick Oppenlander
2023-06-16 2:25 ` Andreas Dannenberg via buildroot
2023-06-21 15:42 ` Andreas Dannenberg via buildroot
2023-06-21 23:35 ` Patrick Oppenlander
2023-08-22 10:16 ` Thomas Petazzoni via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 02/10] boot/ti-k3-image-gen: new package Andreas Dannenberg via buildroot
2023-08-22 10:29 ` Thomas Petazzoni via buildroot
2023-12-12 13:14 ` Romain Naour
2023-12-13 4:31 ` Bryan Brattlof via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 03/10] boot/uboot: add support for building the TI K3 DM into U-Boot Andreas Dannenberg via buildroot
2023-08-22 10:31 ` Thomas Petazzoni via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 04/10] board/ti/am64x_sk: add new board Andreas Dannenberg via buildroot
2023-08-22 10:32 ` Thomas Petazzoni via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 05/10] board/ti/am62x_sk: " Andreas Dannenberg via buildroot
2023-08-22 10:32 ` Thomas Petazzoni via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 06/10] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources Andreas Dannenberg via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 07/10] board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants Andreas Dannenberg via buildroot
2023-06-16 11:15 ` François Perrad
2023-06-16 12:02 ` Andreas Dannenberg via buildroot
2023-06-16 16:40 ` François Perrad
2023-06-16 22:13 ` Andreas Dannenberg via buildroot
2023-06-17 9:37 ` François Perrad
2023-06-18 12:37 ` Andreas Dannenberg via buildroot
2023-06-18 12:27 ` Arnout Vandecappelle via buildroot
2023-06-18 13:43 ` Andreas Dannenberg via buildroot
2023-06-19 17:39 ` Julien Olivain
2023-06-21 15:32 ` Andreas Dannenberg via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 08/10] package/ti-rogue-km: new package Andreas Dannenberg via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 09/10] package/ti-rogue-um: " Andreas Dannenberg via buildroot
2023-06-16 0:23 ` [Buildroot] [PATCH v8 10/10] configs/am62x_sk_defconfig: enable IMG Rogue graphics driver Andreas Dannenberg via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230616002359.4139814-2-dannenberg@ti.com \
--to=buildroot@buildroot.org \
--cc=dannenberg@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox