All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards
@ 2022-12-06 17:17 Anand Gadiyar via buildroot
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package Anand Gadiyar via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Anand Gadiyar via buildroot @ 2022-12-06 17:17 UTC (permalink / raw)
  To: buildroot
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, Giulio Benetti, Romain Naour

This series introduces support for TI's AM64x SK boards.

We would like to add support for the AM62x SK as well, but are
currently blocked by availability of some firmware. That's still
on the list, as is the SK-TDA4VM. We should also be able to
enable the beagleboard-ai64 alongside that at the same time.


This series was previously sent out by Xuanhao in August and
was reviewed by Giulio Benetti up to v5 (Thanks!).

This series addresses further review comments for v5 from Romain
Naour and for v6 from François Perrad. Thanks for the reviews
Romain and François!

Andrew Davis acked the previous series, except for one new change
that I've addressed in this version.

I addressed all of Romain's comments except one - I couldn't get
the sha256sum for the k3-image-gen package to be updated in the
source repository, so for now it's still manually computed. I'll
see what I can do about getting the repository owners to generate
these automatically at release time.

Changes in v7:
- changes per François Perrad's review comments

Changes in v6:
- rebased to latest next branch and retested
- updated u-boot and kernel to latest released versions as of today
From Andrew's comments:
- added a new SOC_TYPE option for k3-image-gen, as requested by Andrew
  Davis in a review comment.
From Romain's comments:
- use "if" instead of "depends on" for sub-options
- move TI K3 R5 Loader defconfig selection to Kconfig
- use $(HOST_DIR) instead of $(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR)
- Retain Xuanhao's gmail ID in the MAINTAINERs file, but drop his TI
  email from CC list as it will be inactive till he rejoins TI
- Add a plain-text license file into the k3-image-gen repository and use
  it instead of the HTML manifest file. Confirmed that this is still
  BSD-3-Clause license.
- Add comments in the ti-k3-image-gen.mk file for a couple of options

Changes in v5:
- None (resubmission of Xuanhao's series)

Changes in v4:
- rebased to latest master and retested
- dropped OPTEE CUSTOM* options as we don't need them.

Changes in v3:
- Fix boot/ti-k3-r5-loader package's build options and dependencies.
- Fix boot/ti-k3-image-gen package's config
- Add more details in board/ti/am64x_sk's readme
- Trim configs/am64x_sk's toolchain options and 
  fix uboot and genimage dependencies.
- Remove board/ti/am62x_sk and configs/am62x_sk for now due to some
  firmware dependency problems. Will be added back in the future.

Changes in v2:
- Revert arm-gnu-toolchain back to version 10.x due to a bug.
  When the pre-packaged GCC was built, it could be targeting
  a newer x86_64 architecture than the processor being used.
- Add boot/ti-k3-r5-loader package that builds a separate U-Boot
  for the R5 cores on TI's K3 devices.
- Add boot/ti-k3-image-gen package that builds the full boot binary
  tiboot3.bin from the spl built from ti-k3-r5-loader.
- Add board/ti directory to include sdcard config and board information
  for AM64x_sk and AM62x_sk boards.
- Add the Buildroot defconfigs for AM64x_sk and AM62x_sk.
- Add to DEVELOPERS list.

Xuanhao Shi (3):
  boot/ti-k3-r5-loader: add new package
  boot/ti-k3-image-gen: add new package
  board/ti/am64x_sk: add new board

 DEVELOPERS                                | 12 ++++++
 board/ti/am64x_sk/genimage.cfg            | 27 +++++++++++++
 board/ti/am64x_sk/readme.txt              | 49 +++++++++++++++++++++++
 boot/Config.in                            |  2 +
 boot/ti-k3-image-gen/Config.in            | 30 ++++++++++++++
 boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 42 +++++++++++++++++++
 boot/ti-k3-r5-loader/Config.in            | 32 +++++++++++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  2 +
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 49 +++++++++++++++++++++++
 configs/am64x_sk_defconfig                | 44 ++++++++++++++++++++
 11 files changed, 291 insertions(+)
 create mode 100644 board/ti/am64x_sk/genimage.cfg
 create mode 100644 board/ti/am64x_sk/readme.txt
 create mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
 create mode 100644 boot/ti-k3-r5-loader/Config.in
 create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
 create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
 create mode 100644 configs/am64x_sk_defconfig

-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package
  2022-12-06 17:17 [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards Anand Gadiyar via buildroot
@ 2022-12-06 17:17 ` Anand Gadiyar via buildroot
  2022-12-06 20:18   ` François Perrad
  2022-12-11 20:06   ` Thomas Petazzoni via buildroot
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: " Anand Gadiyar via buildroot
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board Anand Gadiyar via buildroot
  2 siblings, 2 replies; 19+ messages in thread
From: Anand Gadiyar via buildroot @ 2022-12-06 17:17 UTC (permalink / raw)
  To: buildroot
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, Giulio Benetti, Romain Naour

From: Xuanhao Shi <x-shi@ti.com>

This is a separate U-Boot package that would build
the intermediate spl binary for the R5 core on TI's k3 boards.
Usually, the resulting spl will be used for k3-image-gen
to build the full R5 boot binary tiboot3.bin.

Signed-off-by: Xuanhao Shi <x-shi@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@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>
Cc: Francois Perrad <francois.perrad@gadz.org>
---
 DEVELOPERS                                |  6 +++
 boot/Config.in                            |  1 +
 boot/ti-k3-r5-loader/Config.in            | 32 +++++++++++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  2 +
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 49 +++++++++++++++++++++++
 5 files changed, 90 insertions(+)
 create mode 100644 boot/ti-k3-r5-loader/Config.in
 create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
 create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 233fda4c71..62d77b6c4b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -128,6 +128,9 @@ F:	package/dcron/
 F:	package/libxmlrpc/
 F:	package/python-docopt/
 
+N:	Anand Gadiyar <gadiyar@ti.com>
+F:	boot/ti-k3-r5-loader/
+
 N:	André Zwing <nerv@dawncrow.de>
 F:	package/libkrb5/
 F:	package/openal/
@@ -3055,6 +3058,9 @@ F:	package/python-pyusb/
 N:	Wojciech Niziński <niziak@spox.org>
 F:	package/fwup/
 
+N:	Xuanhao Shi <X15000177@gmail.com>
+F:	boot/ti-k3-r5-loader/
+
 N:	Yair Ben Avraham <yairba@protonmail.com>
 F:	package/casync/
 F:	package/gloox/
diff --git a/boot/Config.in b/boot/Config.in
index 40472ae07d..ce17b2df6b 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -22,6 +22,7 @@ source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/sun20i-d1-spl/Config.in"
 source "boot/syslinux/Config.in"
+source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
 
diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
new file mode 100644
index 0000000000..bb6140f8a6
--- /dev/null
+++ b/boot/ti-k3-r5-loader/Config.in
@@ -0,0 +1,32 @@
+config BR2_TARGET_TI_K3_R5_LOADER
+	bool "ti-k3-r5-loader"
+	help
+	  Separate U-Boot build for R5 cores on TI's k3 boards.
+	  Usually used to build tiboot3.bin with k3-image-gen.
+
+if BR2_TARGET_TI_K3_R5_LOADER
+choice
+	prompt "K3 R5 Loader configuration"
+	default BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
+
+config BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
+	bool "Using an in-tree board defconfig file"
+
+config BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG
+	bool "Using a custom board (def)config file"
+
+endchoice
+
+config BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG
+	string "Board defconfig"
+	depends on BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
+	help
+	  Name of the board for which TI K3 R5 Loader should be
+	  built, without the _defconfig suffix.
+
+config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE
+	string "Configuration file path"
+	depends on BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG
+	help
+	  Path to the TI K3 R5 Loader configuration file.
+endif
diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
new file mode 100644
index 0000000000..fb6ce7c2a6
--- /dev/null
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  6d69d5e4635cb3fa7852bf15f88ca342ef7740196e71961d3572deb58ba44bea  u-boot-2022.10-rc1.tar.bz2
diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
new file mode 100644
index 0000000000..8a2a3fdad4
--- /dev/null
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -0,0 +1,49 @@
+################################################################################
+#
+# ti-k3-r5-loader.mk
+#
+################################################################################
+
+TI_K3_R5_LOADER_VERSION = 2022.10
+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
+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
+TI_K3_R5_LOADER_CPE_ID_PRODUCT = u-boot
+TI_K3_R5_LOADER_INSTALL_IMAGES = YES
+TI_K3_R5_LOADER_DEPENDENCIES = \
+	host-pkgconf \
+	$(BR2_MAKE_HOST_DEPENDENCY) \
+	host-arm-gnu-toolchain \
+	host-openssl
+
+TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
+TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
+TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
+	host-arm-gnu-toolchain \
+	$(BR2_MAKE_HOST_DEPENDENCY) \
+	$(BR2_BISON_HOST_DEPENDENCY) \
+	$(BR2_FLEX_HOST_DEPENDENCY)
+
+TI_K3_R5_LOADER_BOARD = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD))
+ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
+TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
+else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
+TI_K3_R5_LOADER_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE))
+endif # BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
+TI_K3_R5_LOADER_MAKE_OPTS = \
+	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
+	ARCH=arm \
+	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
+	HOSTLDFLAGS="$(HOST_LDFLAGS)"
+
+define TI_K3_R5_LOADER_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
+endef
+
+define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
+	cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
+endef
+
+$(eval $(kconfig-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: add new package
  2022-12-06 17:17 [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards Anand Gadiyar via buildroot
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package Anand Gadiyar via buildroot
@ 2022-12-06 17:17 ` Anand Gadiyar via buildroot
  2022-12-06 20:19   ` François Perrad
                     ` (2 more replies)
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board Anand Gadiyar via buildroot
  2 siblings, 3 replies; 19+ messages in thread
From: Anand Gadiyar via buildroot @ 2022-12-06 17:17 UTC (permalink / raw)
  To: buildroot
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, Giulio Benetti, Romain Naour

From: Xuanhao Shi <x-shi@ti.com>

This is the image generator that builds the full boot binary,
tiboot3.bin, for the R5 core on TI's k3 devices.
This requires the R5 spl output from the ti-k3-r5-loader package.

https://git.ti.com/cgit/k3-image-gen/k3-image-gen

Signed-off-by: Xuanhao Shi <x-shi@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@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>
Cc: Francois Perrad <francois.perrad@gadz.org>
---
 DEVELOPERS                                |  2 ++
 boot/Config.in                            |  1 +
 boot/ti-k3-image-gen/Config.in            | 30 ++++++++++++++++
 boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 ++
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 42 +++++++++++++++++++++++
 5 files changed, 77 insertions(+)
 create mode 100644 boot/ti-k3-image-gen/Config.in
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
 create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 62d77b6c4b..b5b6cd0a99 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -129,6 +129,7 @@ F:	package/libxmlrpc/
 F:	package/python-docopt/
 
 N:	Anand Gadiyar <gadiyar@ti.com>
+F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
 
 N:	André Zwing <nerv@dawncrow.de>
@@ -3059,6 +3060,7 @@ N:	Wojciech Niziński <niziak@spox.org>
 F:	package/fwup/
 
 N:	Xuanhao Shi <X15000177@gmail.com>
+F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
 
 N:	Yair Ben Avraham <yairba@protonmail.com>
diff --git a/boot/Config.in b/boot/Config.in
index ce17b2df6b..1b25bacfee 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -22,6 +22,7 @@ source "boot/s500-bootloader/Config.in"
 source "boot/shim/Config.in"
 source "boot/sun20i-d1-spl/Config.in"
 source "boot/syslinux/Config.in"
+source "boot/ti-k3-image-gen/Config.in"
 source "boot/ti-k3-r5-loader/Config.in"
 source "boot/uboot/Config.in"
 source "boot/vexpress-firmware/Config.in"
diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in
new file mode 100644
index 0000000000..02018f2f78
--- /dev/null
+++ b/boot/ti-k3-image-gen/Config.in
@@ -0,0 +1,30 @@
+config BR2_TARGET_TI_K3_IMAGE_GEN
+	bool "ti-k3-image-gen"
+	select BR2_TARGET_TI_K3_R5_LOADER
+	help
+	  Use TI's k3-image-gen to build a separate bare metal
+	  boot binary from a separate spl. Currently supports
+	  version 08.05.00.004 as default.
+
+	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
+
+if BR2_TARGET_TI_K3_IMAGE_GEN
+config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
+	string "SOC type for image gen"
+	help
+	  The target SoC option for image gen.
+	  For example, "am64x" for AM64X boards.
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE
+	string "SOC security type for image gen"
+	help
+	  The security type option for image gen.
+	  Options are "gp", "hs-fs", or "hs-se".
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
+	string "CONFIG type for image gen"
+	help
+	  The board config option for image gen.
+	  Usually "sk" or "evm".
+endif
+
diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.hash b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
new file mode 100644
index 0000000000..82c5b17060
--- /dev/null
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  d13e9556bfba32d14071e172589683e48f6fea705a0b05ddd7fe984002089888  k3-image-gen-08.05.00.004.tar.gz
diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
new file mode 100644
index 0000000000..f8e6105bfb
--- /dev/null
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
@@ -0,0 +1,42 @@
+################################################################################
+#
+# ti-k3-image-gen
+#
+################################################################################
+
+TI_K3_IMAGE_GEN_VERSION = 08.05.00.004
+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.
+TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader
+
+# The ti-k3-image-gen makefiles seem to need some feature from Make v4.0,
+# similar to u-boot. Explicitly use $(BR2_MAKE) here, as the build
+# otherwise fails with some misleading error message.
+TI_K3_IMAGE_GEN_MAKE = $(BR2_MAKE)
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
+TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE))
+TI_K3_IMAGE_GEN_CONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))
+TI_K3_IMAGE_GEN_MAKE_OPTS = \
+	SOC=$(TI_K3_IMAGE_GEN_SOC) \
+	SOC_TYPE=$(TI_K3_IMAGE_GEN_SOC_TYPE) \
+	CONFIG=$(TI_K3_IMAGE_GEN_CONFIG) \
+	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
+	SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
+	O=$(@D)/tmp \
+	BIN_DIR=$(@D)
+
+define TI_K3_IMAGE_GEN_BUILD_CMDS
+	$(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
+endef
+
+define TI_K3_IMAGE_GEN_INSTALL_IMAGES_CMDS
+	cp $(@D)/tiboot3.bin $(BINARIES_DIR)
+endef
+
+$(eval $(generic-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board
  2022-12-06 17:17 [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards Anand Gadiyar via buildroot
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package Anand Gadiyar via buildroot
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: " Anand Gadiyar via buildroot
@ 2022-12-06 17:17 ` Anand Gadiyar via buildroot
  2022-12-06 20:19   ` François Perrad
                     ` (2 more replies)
  2 siblings, 3 replies; 19+ messages in thread
From: Anand Gadiyar via buildroot @ 2022-12-06 17:17 UTC (permalink / raw)
  To: buildroot
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, Giulio Benetti, Romain Naour

From: Xuanhao Shi <x-shi@ti.com>

Adds support for ti's am64x_sk board.
Adds the configs for generating output sdcard image.
Adds the defconfigs for am64x_sk.

The AM64x_sk board is designed for the AM642 SoC with
two ARM Cortex-A53 and four ARM Cortex-R5. It also
supports RJ 45 Ethernet, Wi-Fi, and Bluetooth.

More information about the board can be found at:
https://www.ti.com/tool/SK-AM64

Signed-off-by: Xuanhao Shi <x-shi@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@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>
Cc: Francois Perrad <francois.perrad@gadz.org>
---
 DEVELOPERS                     |  4 +++
 board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++
 board/ti/am64x_sk/readme.txt   | 49 ++++++++++++++++++++++++++++++++++
 configs/am64x_sk_defconfig     | 44 ++++++++++++++++++++++++++++++
 4 files changed, 124 insertions(+)
 create mode 100644 board/ti/am64x_sk/genimage.cfg
 create mode 100644 board/ti/am64x_sk/readme.txt
 create mode 100644 configs/am64x_sk_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index b5b6cd0a99..84886e1fa4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -129,8 +129,10 @@ F:	package/libxmlrpc/
 F:	package/python-docopt/
 
 N:	Anand Gadiyar <gadiyar@ti.com>
+F:	board/ti/am64x_sk/
 F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
+F:	configs/am64x_sk_defconfig
 
 N:	André Zwing <nerv@dawncrow.de>
 F:	package/libkrb5/
@@ -3060,8 +3062,10 @@ N:	Wojciech Niziński <niziak@spox.org>
 F:	package/fwup/
 
 N:	Xuanhao Shi <X15000177@gmail.com>
+F:	board/ti/am64x_sk/
 F:	boot/ti-k3-image-gen/
 F:	boot/ti-k3-r5-loader/
+F:	configs/am64x_sk_defconfig
 
 N:	Yair Ben Avraham <yairba@protonmail.com>
 F:	package/casync/
diff --git a/board/ti/am64x_sk/genimage.cfg b/board/ti/am64x_sk/genimage.cfg
new file mode 100644
index 0000000000..26304fe98f
--- /dev/null
+++ b/board/ti/am64x_sk/genimage.cfg
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"tiboot3.bin",
+			"tispl.bin",
+			"u-boot.img",
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
diff --git a/board/ti/am64x_sk/readme.txt b/board/ti/am64x_sk/readme.txt
new file mode 100644
index 0000000000..8096fcb2d4
--- /dev/null
+++ b/board/ti/am64x_sk/readme.txt
@@ -0,0 +1,49 @@
+Texas Instuments AM64x SK Test and Development Board
+
+Description
+===========
+
+These configurations will build a complete image and
+device tree blobs for the the TI AM64x_sk board.
+
+How to build it
+===============
+
+Select the default configuration for the target:
+$ make am64x_sk_defconfig
+
+Optional: modify the configuration:
+$ make menuconfig
+
+Build:
+$ make
+
+Result of the build:
+===================
+output/images/
++-- soc
++-- ti-connectivity
++-- bl31.bin
++-- boot.vfat
++-- Image
++-- k3-am642-sk.dtb
++-- r5-u-boot-spl.bin
++-- rootfs.ext2
++-- rootfs.ext4
++-- rootfs.tar
++-- sdcard.img
++-- tee.bin
++-- tee-header_v2.bin
++-- tee-pageable_v2.bin
++-- tee-pager_v2.bin
++-- tiboot3.bin
++-- tispl.bin
++-- u-boot.img
+
+To copy the image file to the sdcard use dd:
+$ dd if=output/images/sdcard.img of=/dev/sdX
+
+Insert the SDcard into the AM64x_sk board, and power it up with
+a USB Type-C connector. The system should come up. You can use
+a micro-USB to connect to the connector labled MAIN_UART0 to
+communicate with the board.
diff --git a/configs/am64x_sk_defconfig b/configs/am64x_sk_defconfig
new file mode 100644
index 0000000000..b8ad2fb68a
--- /dev/null
+++ b/configs/am64x_sk_defconfig
@@ -0,0 +1,44 @@
+BR2_aarch64=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am64x_sk/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.0.9"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
+BR2_TARGET_OPTEE_OS=y
+BR2_TARGET_OPTEE_OS_PLATFORM="k3"
+BR2_TARGET_TI_K3_IMAGE_GEN=y
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"
+BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE="gp"
+BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
+BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am64x_evm_a53"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package Anand Gadiyar via buildroot
@ 2022-12-06 20:18   ` François Perrad
  2022-12-11 20:06   ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 19+ messages in thread
From: François Perrad @ 2022-12-06 20:18 UTC (permalink / raw)
  To: Anand Gadiyar
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, buildroot,
	Giulio Benetti, Romain Naour


[-- Attachment #1.1: Type: text/plain, Size: 6610 bytes --]

Le mar. 6 déc. 2022 à 18:41, Anand Gadiyar <gadiyar@ti.com> a écrit :

> From: Xuanhao Shi <x-shi@ti.com>
>
> This is a separate U-Boot package that would build
> the intermediate spl binary for the R5 core on TI's k3 boards.
> Usually, the resulting spl will be used for k3-image-gen
> to build the full R5 boot binary tiboot3.bin.
>
> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>

Reviewed-by: Francois Perrad <francois.perrad@gadz.org>


> Acked-by: Andrew Davis <afd@ti.com>
> Tested-by: Bryan Brattlof <bb@ti.com>
> Cc: Romain Naour <romain.naour@gmail.com>
> Cc: Francois Perrad <francois.perrad@gadz.org>
> ---
>  DEVELOPERS                                |  6 +++
>  boot/Config.in                            |  1 +
>  boot/ti-k3-r5-loader/Config.in            | 32 +++++++++++++++
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  2 +
>  boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 49 +++++++++++++++++++++++
>  5 files changed, 90 insertions(+)
>  create mode 100644 boot/ti-k3-r5-loader/Config.in
>  create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
>  create mode 100644 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 233fda4c71..62d77b6c4b 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -128,6 +128,9 @@ F:  package/dcron/
>  F:     package/libxmlrpc/
>  F:     package/python-docopt/
>
> +N:     Anand Gadiyar <gadiyar@ti.com>
> +F:     boot/ti-k3-r5-loader/
> +
>  N:     André Zwing <nerv@dawncrow.de>
>  F:     package/libkrb5/
>  F:     package/openal/
> @@ -3055,6 +3058,9 @@ F:        package/python-pyusb/
>  N:     Wojciech Niziński <niziak@spox.org>
>  F:     package/fwup/
>
> +N:     Xuanhao Shi <X15000177@gmail.com>
> +F:     boot/ti-k3-r5-loader/
> +
>  N:     Yair Ben Avraham <yairba@protonmail.com>
>  F:     package/casync/
>  F:     package/gloox/
> diff --git a/boot/Config.in b/boot/Config.in
> index 40472ae07d..ce17b2df6b 100644
> --- a/boot/Config.in
> +++ b/boot/Config.in
> @@ -22,6 +22,7 @@ source "boot/s500-bootloader/Config.in"
>  source "boot/shim/Config.in"
>  source "boot/sun20i-d1-spl/Config.in"
>  source "boot/syslinux/Config.in"
> +source "boot/ti-k3-r5-loader/Config.in"
>  source "boot/uboot/Config.in"
>  source "boot/vexpress-firmware/Config.in"
>
> diff --git a/boot/ti-k3-r5-loader/Config.in
> b/boot/ti-k3-r5-loader/Config.in
> new file mode 100644
> index 0000000000..bb6140f8a6
> --- /dev/null
> +++ b/boot/ti-k3-r5-loader/Config.in
> @@ -0,0 +1,32 @@
> +config BR2_TARGET_TI_K3_R5_LOADER
> +       bool "ti-k3-r5-loader"
> +       help
> +         Separate U-Boot build for R5 cores on TI's k3 boards.
> +         Usually used to build tiboot3.bin with k3-image-gen.
> +
> +if BR2_TARGET_TI_K3_R5_LOADER
> +choice
> +       prompt "K3 R5 Loader configuration"
> +       default BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
> +
> +config BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
> +       bool "Using an in-tree board defconfig file"
> +
> +config BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG
> +       bool "Using a custom board (def)config file"
> +
> +endchoice
> +
> +config BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG
> +       string "Board defconfig"
> +       depends on BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
> +       help
> +         Name of the board for which TI K3 R5 Loader should be
> +         built, without the _defconfig suffix.
> +
> +config BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE
> +       string "Configuration file path"
> +       depends on BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG
> +       help
> +         Path to the TI K3 R5 Loader configuration file.
> +endif
> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
> b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
> new file mode 100644
> index 0000000000..fb6ce7c2a6
> --- /dev/null
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
> @@ -0,0 +1,2 @@
> +# Locally computed:
> +sha256  6d69d5e4635cb3fa7852bf15f88ca342ef7740196e71961d3572deb58ba44bea
> u-boot-2022.10-rc1.tar.bz2
> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> new file mode 100644
> index 0000000000..8a2a3fdad4
> --- /dev/null
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -0,0 +1,49 @@
>
> +################################################################################
> +#
> +# ti-k3-r5-loader.mk
> +#
>
> +################################################################################
> +
> +TI_K3_R5_LOADER_VERSION = 2022.10
> +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
> +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
> +TI_K3_R5_LOADER_CPE_ID_PRODUCT = u-boot
> +TI_K3_R5_LOADER_INSTALL_IMAGES = YES
> +TI_K3_R5_LOADER_DEPENDENCIES = \
> +       host-pkgconf \
> +       $(BR2_MAKE_HOST_DEPENDENCY) \
> +       host-arm-gnu-toolchain \
> +       host-openssl
> +
> +TI_K3_R5_LOADER_MAKE = $(BR2_MAKE)
> +TI_K3_R5_LOADER_MAKE_ENV = $(TARGET_MAKE_ENV)
> +TI_K3_R5_LOADER_KCONFIG_DEPENDENCIES = \
> +       host-arm-gnu-toolchain \
> +       $(BR2_MAKE_HOST_DEPENDENCY) \
> +       $(BR2_BISON_HOST_DEPENDENCY) \
> +       $(BR2_FLEX_HOST_DEPENDENCY)
> +
> +TI_K3_R5_LOADER_BOARD = $(call qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD))
> +ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG),y)
> +TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(call
> qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG))_defconfig
> +else ifeq ($(BR2_TARGET_TI_K3_R5_LOADER_USE_CUSTOM_CONFIG),y)
> +TI_K3_R5_LOADER_KCONFIG_FILE = $(call
> qstrip,$(BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_CONFIG_FILE))
> +endif # BR2_TARGET_TI_K3_R5_LOADER_USE_DEFCONFIG
> +TI_K3_R5_LOADER_MAKE_OPTS = \
> +       CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
> +       ARCH=arm \
> +       HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem
> /,$(HOST_CFLAGS)))" \
> +       HOSTLDFLAGS="$(HOST_LDFLAGS)"
> +
> +define TI_K3_R5_LOADER_BUILD_CMDS
> +       $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D)
> $(TI_K3_R5_LOADER_MAKE_OPTS)
> +endef
> +
> +define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
> +       cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> +endef
> +
> +$(eval $(kconfig-package))
> --
> 2.34.1
>
>

[-- Attachment #1.2: Type: text/html, Size: 9150 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: add new package
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: " Anand Gadiyar via buildroot
@ 2022-12-06 20:19   ` François Perrad
  2022-12-11 20:09   ` Thomas Petazzoni via buildroot
  2022-12-19 20:56   ` Julien Olivain
  2 siblings, 0 replies; 19+ messages in thread
From: François Perrad @ 2022-12-06 20:19 UTC (permalink / raw)
  To: Anand Gadiyar
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, buildroot,
	Giulio Benetti, Romain Naour


[-- Attachment #1.1: Type: text/plain, Size: 6317 bytes --]

Le mar. 6 déc. 2022 à 18:41, Anand Gadiyar <gadiyar@ti.com> a écrit :

> From: Xuanhao Shi <x-shi@ti.com>
>
> This is the image generator that builds the full boot binary,
> tiboot3.bin, for the R5 core on TI's k3 devices.
> This requires the R5 spl output from the ti-k3-r5-loader package.
>
> https://git.ti.com/cgit/k3-image-gen/k3-image-gen
>
> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>

Reviewed-by: Francois Perrad <francois.perrad@gadz.org>


> Acked-by: Andrew Davis <afd@ti.com>
> Tested-by: Bryan Brattlof <bb@ti.com>
> Cc: Romain Naour <romain.naour@gmail.com>
> Cc: Francois Perrad <francois.perrad@gadz.org>
> ---
>  DEVELOPERS                                |  2 ++
>  boot/Config.in                            |  1 +
>  boot/ti-k3-image-gen/Config.in            | 30 ++++++++++++++++
>  boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 ++
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 42 +++++++++++++++++++++++
>  5 files changed, 77 insertions(+)
>  create mode 100644 boot/ti-k3-image-gen/Config.in
>  create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>  create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 62d77b6c4b..b5b6cd0a99 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -129,6 +129,7 @@ F:  package/libxmlrpc/
>  F:     package/python-docopt/
>
>  N:     Anand Gadiyar <gadiyar@ti.com>
> +F:     boot/ti-k3-image-gen/
>  F:     boot/ti-k3-r5-loader/
>
>  N:     André Zwing <nerv@dawncrow.de>
> @@ -3059,6 +3060,7 @@ N:        Wojciech Niziński <niziak@spox.org>
>  F:     package/fwup/
>
>  N:     Xuanhao Shi <X15000177@gmail.com>
> +F:     boot/ti-k3-image-gen/
>  F:     boot/ti-k3-r5-loader/
>
>  N:     Yair Ben Avraham <yairba@protonmail.com>
> diff --git a/boot/Config.in b/boot/Config.in
> index ce17b2df6b..1b25bacfee 100644
> --- a/boot/Config.in
> +++ b/boot/Config.in
> @@ -22,6 +22,7 @@ source "boot/s500-bootloader/Config.in"
>  source "boot/shim/Config.in"
>  source "boot/sun20i-d1-spl/Config.in"
>  source "boot/syslinux/Config.in"
> +source "boot/ti-k3-image-gen/Config.in"
>  source "boot/ti-k3-r5-loader/Config.in"
>  source "boot/uboot/Config.in"
>  source "boot/vexpress-firmware/Config.in"
> diff --git a/boot/ti-k3-image-gen/Config.in
> b/boot/ti-k3-image-gen/Config.in
> new file mode 100644
> index 0000000000..02018f2f78
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/Config.in
> @@ -0,0 +1,30 @@
> +config BR2_TARGET_TI_K3_IMAGE_GEN
> +       bool "ti-k3-image-gen"
> +       select BR2_TARGET_TI_K3_R5_LOADER
> +       help
> +         Use TI's k3-image-gen to build a separate bare metal
> +         boot binary from a separate spl. Currently supports
> +         version 08.05.00.004 as default.
> +
> +         https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
> +
> +if BR2_TARGET_TI_K3_IMAGE_GEN
> +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
> +       string "SOC type for image gen"
> +       help
> +         The target SoC option for image gen.
> +         For example, "am64x" for AM64X boards.
> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE
> +       string "SOC security type for image gen"
> +       help
> +         The security type option for image gen.
> +         Options are "gp", "hs-fs", or "hs-se".
> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
> +       string "CONFIG type for image gen"
> +       help
> +         The board config option for image gen.
> +         Usually "sk" or "evm".
> +endif
> +
> diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.hash
> b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
> new file mode 100644
> index 0000000000..82c5b17060
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256  d13e9556bfba32d14071e172589683e48f6fea705a0b05ddd7fe984002089888
> k3-image-gen-08.05.00.004.tar.gz
> diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> new file mode 100644
> index 0000000000..f8e6105bfb
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> @@ -0,0 +1,42 @@
>
> +################################################################################
> +#
> +# ti-k3-image-gen
> +#
>
> +################################################################################
> +
> +TI_K3_IMAGE_GEN_VERSION = 08.05.00.004
> +TI_K3_IMAGE_GEN_SITE =
> https://git.ti.com/cgit/k3-image-gen/k3-image-gen/snapshot
> +TI_K3_IMAGE_GEN_SOURCE
> <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.
> +TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader
> +
> +# The ti-k3-image-gen makefiles seem to need some feature from Make v4.0,
> +# similar to u-boot. Explicitly use $(BR2_MAKE) here, as the build
> +# otherwise fails with some misleading error message.
> +TI_K3_IMAGE_GEN_MAKE = $(BR2_MAKE)
> +TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
> +TI_K3_IMAGE_GEN_SOC_TYPE = $(call
> qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE))
> +TI_K3_IMAGE_GEN_CONFIG = $(call
> qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))
> +TI_K3_IMAGE_GEN_MAKE_OPTS = \
> +       SOC=$(TI_K3_IMAGE_GEN_SOC) \
> +       SOC_TYPE=$(TI_K3_IMAGE_GEN_SOC_TYPE) \
> +       CONFIG=$(TI_K3_IMAGE_GEN_CONFIG) \
> +       CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
> +       SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
> +       O=$(@D)/tmp \
> +       BIN_DIR=$(@D)
> +
> +define TI_K3_IMAGE_GEN_BUILD_CMDS
> +       $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
> +endef
> +
> +define TI_K3_IMAGE_GEN_INSTALL_IMAGES_CMDS
> +       cp $(@D)/tiboot3.bin $(BINARIES_DIR)
> +endef
> +
> +$(eval $(generic-package))
> --
> 2.34.1
>
>

[-- Attachment #1.2: Type: text/html, Size: 8925 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board Anand Gadiyar via buildroot
@ 2022-12-06 20:19   ` François Perrad
  2022-12-11 20:12   ` Thomas Petazzoni via buildroot
  2022-12-19 21:12   ` Julien Olivain
  2 siblings, 0 replies; 19+ messages in thread
From: François Perrad @ 2022-12-06 20:19 UTC (permalink / raw)
  To: Anand Gadiyar
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, buildroot,
	Giulio Benetti, Romain Naour


[-- Attachment #1.1: Type: text/plain, Size: 6512 bytes --]

Le mar. 6 déc. 2022 à 18:41, Anand Gadiyar <gadiyar@ti.com> a écrit :

> From: Xuanhao Shi <x-shi@ti.com>
>
> Adds support for ti's am64x_sk board.
> Adds the configs for generating output sdcard image.
> Adds the defconfigs for am64x_sk.
>
> The AM64x_sk board is designed for the AM642 SoC with
> two ARM Cortex-A53 and four ARM Cortex-R5. It also
> supports RJ 45 Ethernet, Wi-Fi, and Bluetooth.
>
> More information about the board can be found at:
> https://www.ti.com/tool/SK-AM64
>
> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>

Reviewed-by: Francois Perrad <francois.perrad@gadz.org>


> Acked-by: Andrew Davis <afd@ti.com>
> Tested-by: Bryan Brattlof <bb@ti.com>
> Cc: Romain Naour <romain.naour@gmail.com>
> Cc: Francois Perrad <francois.perrad@gadz.org>
> ---
>  DEVELOPERS                     |  4 +++
>  board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++
>  board/ti/am64x_sk/readme.txt   | 49 ++++++++++++++++++++++++++++++++++
>  configs/am64x_sk_defconfig     | 44 ++++++++++++++++++++++++++++++
>  4 files changed, 124 insertions(+)
>  create mode 100644 board/ti/am64x_sk/genimage.cfg
>  create mode 100644 board/ti/am64x_sk/readme.txt
>  create mode 100644 configs/am64x_sk_defconfig
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index b5b6cd0a99..84886e1fa4 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -129,8 +129,10 @@ F: package/libxmlrpc/
>  F:     package/python-docopt/
>
>  N:     Anand Gadiyar <gadiyar@ti.com>
> +F:     board/ti/am64x_sk/
>  F:     boot/ti-k3-image-gen/
>  F:     boot/ti-k3-r5-loader/
> +F:     configs/am64x_sk_defconfig
>
>  N:     André Zwing <nerv@dawncrow.de>
>  F:     package/libkrb5/
> @@ -3060,8 +3062,10 @@ N:       Wojciech Niziński <niziak@spox.org>
>  F:     package/fwup/
>
>  N:     Xuanhao Shi <X15000177@gmail.com>
> +F:     board/ti/am64x_sk/
>  F:     boot/ti-k3-image-gen/
>  F:     boot/ti-k3-r5-loader/
> +F:     configs/am64x_sk_defconfig
>
>  N:     Yair Ben Avraham <yairba@protonmail.com>
>  F:     package/casync/
> diff --git a/board/ti/am64x_sk/genimage.cfg
> b/board/ti/am64x_sk/genimage.cfg
> new file mode 100644
> index 0000000000..26304fe98f
> --- /dev/null
> +++ b/board/ti/am64x_sk/genimage.cfg
> @@ -0,0 +1,27 @@
> +image boot.vfat {
> +       vfat {
> +               files = {
> +                       "tiboot3.bin",
> +                       "tispl.bin",
> +                       "u-boot.img",
> +               }
> +       }
> +
> +       size = 16M
> +}
> +
> +image sdcard.img {
> +       hdimage {
> +       }
> +
> +       partition u-boot {
> +               partition-type = 0xC
> +               bootable = "true"
> +               image = "boot.vfat"
> +       }
> +
> +       partition rootfs {
> +               partition-type = 0x83
> +               image = "rootfs.ext4"
> +       }
> +}
> diff --git a/board/ti/am64x_sk/readme.txt b/board/ti/am64x_sk/readme.txt
> new file mode 100644
> index 0000000000..8096fcb2d4
> --- /dev/null
> +++ b/board/ti/am64x_sk/readme.txt
> @@ -0,0 +1,49 @@
> +Texas Instuments AM64x SK Test and Development Board
> +
> +Description
> +===========
> +
> +These configurations will build a complete image and
> +device tree blobs for the the TI AM64x_sk board.
> +
> +How to build it
> +===============
> +
> +Select the default configuration for the target:
> +$ make am64x_sk_defconfig
> +
> +Optional: modify the configuration:
> +$ make menuconfig
> +
> +Build:
> +$ make
> +
> +Result of the build:
> +===================
> +output/images/
> ++-- soc
> ++-- ti-connectivity
> ++-- bl31.bin
> ++-- boot.vfat
> ++-- Image
> ++-- k3-am642-sk.dtb
> ++-- r5-u-boot-spl.bin
> ++-- rootfs.ext2
> ++-- rootfs.ext4
> ++-- rootfs.tar
> ++-- sdcard.img
> ++-- tee.bin
> ++-- tee-header_v2.bin
> ++-- tee-pageable_v2.bin
> ++-- tee-pager_v2.bin
> ++-- tiboot3.bin
> ++-- tispl.bin
> ++-- u-boot.img
> +
> +To copy the image file to the sdcard use dd:
> +$ dd if=output/images/sdcard.img of=/dev/sdX
> +
> +Insert the SDcard into the AM64x_sk board, and power it up with
> +a USB Type-C connector. The system should come up. You can use
> +a micro-USB to connect to the connector labled MAIN_UART0 to
> +communicate with the board.
> diff --git a/configs/am64x_sk_defconfig b/configs/am64x_sk_defconfig
> new file mode 100644
> index 0000000000..b8ad2fb68a
> --- /dev/null
> +++ b/configs/am64x_sk_defconfig
> @@ -0,0 +1,44 @@
> +BR2_aarch64=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am64x_sk/genimage.cfg"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.0.9"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +BR2_PACKAGE_LINUX_FIRMWARE=y
> +BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
> +BR2_TARGET_OPTEE_OS=y
> +BR2_TARGET_OPTEE_OS_PLATFORM="k3"
> +BR2_TARGET_TI_K3_IMAGE_GEN=y
> +BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"
> +BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE="gp"
> +BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
> +BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5"
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am64x_evm_a53"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
> +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
> +# BR2_TARGET_UBOOT_FORMAT_BIN is not set
> +BR2_TARGET_UBOOT_FORMAT_IMG=y
> +BR2_TARGET_UBOOT_SPL=y
> +BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
> +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_MTOOLS=y
> --
> 2.34.1
>
>

[-- Attachment #1.2: Type: text/html, Size: 8758 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package Anand Gadiyar via buildroot
  2022-12-06 20:18   ` François Perrad
@ 2022-12-11 20:06   ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 19+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-11 20:06 UTC (permalink / raw)
  To: Anand Gadiyar via buildroot
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, Giulio Benetti,
	Romain Naour, Anand Gadiyar

On Tue, 6 Dec 2022 11:17:17 -0600
Anand Gadiyar via buildroot <buildroot@buildroot.org> wrote:

> diff --git a/boot/ti-k3-r5-loader/Config.in b/boot/ti-k3-r5-loader/Config.in
> new file mode 100644
> index 0000000000..bb6140f8a6
> --- /dev/null
> +++ b/boot/ti-k3-r5-loader/Config.in
> @@ -0,0 +1,32 @@
> +config BR2_TARGET_TI_K3_R5_LOADER
> +	bool "ti-k3-r5-loader"

Added:

	depends on BR2_aarch64

> +	help
> +	  Separate U-Boot build for R5 cores on TI's k3 boards.
> +	  Usually used to build tiboot3.bin with k3-image-gen.
> +
> +if BR2_TARGET_TI_K3_R5_LOADER
> +choice
> +	prompt "K3 R5 Loader configuration"

Simplified to just "Configuration".


> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
> new file mode 100644
> index 0000000000..fb6ce7c2a6
> --- /dev/null
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.hash
> @@ -0,0 +1,2 @@
> +# Locally computed:
> +sha256  6d69d5e4635cb3fa7852bf15f88ca342ef7740196e71961d3572deb58ba44bea  u-boot-2022.10-rc1.tar.bz2

You didn't test the build, as this hash file doesn't match the .mk
file: the .mk file refers to 2022.10, the hash file to 2022.10-rc1.

Another thing: the hash of the license file was missing.

I fixed up those small issues, and applied. Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: add new package
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: " Anand Gadiyar via buildroot
  2022-12-06 20:19   ` François Perrad
@ 2022-12-11 20:09   ` Thomas Petazzoni via buildroot
  2022-12-11 20:41     ` François Perrad
  2022-12-19 20:56   ` Julien Olivain
  2 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-11 20:09 UTC (permalink / raw)
  To: Anand Gadiyar via buildroot
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, Giulio Benetti,
	Romain Naour, Anand Gadiyar

Hello,

On Tue, 6 Dec 2022 11:17:18 -0600
Anand Gadiyar via buildroot <buildroot@buildroot.org> wrote:

> From: Xuanhao Shi <x-shi@ti.com>
> 
> This is the image generator that builds the full boot binary,
> tiboot3.bin, for the R5 core on TI's k3 devices.
> This requires the R5 spl output from the ti-k3-r5-loader package.
> 
> https://git.ti.com/cgit/k3-image-gen/k3-image-gen

The commit title should just be:

	boot/ti-k3-image-gen: new package

(not "add new package")


> diff --git a/boot/ti-k3-image-gen/Config.in b/boot/ti-k3-image-gen/Config.in
> new file mode 100644
> index 0000000000..02018f2f78
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/Config.in
> @@ -0,0 +1,30 @@
> +config BR2_TARGET_TI_K3_IMAGE_GEN
> +	bool "ti-k3-image-gen"
> +	select BR2_TARGET_TI_K3_R5_LOADER

Should be a:

	depends on BR2_TARGET_TI_K3_R5_LOADER

> +if BR2_TARGET_TI_K3_IMAGE_GEN
> +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
> +	string "SOC type for image gen"

	string "SoC"

> +	help
> +	  The target SoC option for image gen.
> +	  For example, "am64x" for AM64X boards.
> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE
> +	string "SOC security type for image gen"

	string "SoC security type"

> +	help
> +	  The security type option for image gen.
> +	  Options are "gp", "hs-fs", or "hs-se".
> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
> +	string "CONFIG type for image gen"

	string "config type"


> +define TI_K3_IMAGE_GEN_BUILD_CMDS
> +	$(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
> +endef

There is a serious problem: the build process of this package downloads
stuff:

Connecting to git.ti.com (git.ti.com)|198.47.28.208|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/blobs/raw/59d6f921b3b562e0aa1f42ce322e4645b1bfc52c/ti-sysfw/ti-sci-firmware-am64x-gp.bin [following]
--2022-12-11 20:53:58--  https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/blobs/raw/59d6f921b3b562e0aa1f42ce322e4645b1bfc52c/ti-sysfw/ti-sci-firmware-am64x-gp.bin
Reusing existing connection to git.ti.com:443.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/plain/ti-sysfw/ti-sci-firmware-am64x-gp.bin?id=59d6f921b3b562e0aa1f42ce322e4645b1bfc52c [following]
--2022-12-11 20:53:59--  https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/plain/ti-sysfw/ti-sci-firmware-am64x-gp.bin?id=59d6f921b3b562e0aa1f42ce322e4645b1bfc52c
Reusing existing connection to git.ti.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 225248 (220K) [application/octet-stream]
Saving to: ‘ti-sci-firmware-am64x-gp.bin’

ti-sci-firmware-am64x-gp.bin  100%[==============================================>] 219,97K   114KB/s    in 1,9s    

2022-12-11 20:54:01 (114 KB/s) - ‘ti-sci-firmware-am64x-gp.bin’ saved [225248/225248]

Download SUCCESS!

This is not acceptable as it circumvents the download infrastructure of
Buildroot, but also the legal information collection infrastructure.

This needs to be fixed by downloading this file, either through a
separate package, or as an _EXTRA_DOWNLOADS of this package, and the
Makefile needs to be changed to not download this file. My impression
is that the Makefile will not download the files if they are already
available. So you could have _EXTRA_DOWNLOADS + some post-extract logic
to put the files at the right place.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board Anand Gadiyar via buildroot
  2022-12-06 20:19   ` François Perrad
@ 2022-12-11 20:12   ` Thomas Petazzoni via buildroot
  2022-12-19 21:12   ` Julien Olivain
  2 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-11 20:12 UTC (permalink / raw)
  To: Anand Gadiyar via buildroot
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, Giulio Benetti,
	Romain Naour, Anand Gadiyar

Hello,

Commit title should be:

	configs/am64x_sk: new defconfig

On Tue, 6 Dec 2022 11:17:19 -0600
Anand Gadiyar via buildroot <buildroot@buildroot.org> wrote:

> From: Xuanhao Shi <x-shi@ti.com>
> 
> Adds support for ti's am64x_sk board.
> Adds the configs for generating output sdcard image.
> Adds the defconfigs for am64x_sk.
> 
> The AM64x_sk board is designed for the AM642 SoC with
> two ARM Cortex-A53 and four ARM Cortex-R5. It also
> supports RJ 45 Ethernet, Wi-Fi, and Bluetooth.

Please use some better wording:

This commit adds a new defconfig that allows to build a minimal
Buildroot system for the A64x_sk board, which is based on the TI AM642
SoC, featuring ....


> diff --git a/board/ti/am64x_sk/readme.txt b/board/ti/am64x_sk/readme.txt
> new file mode 100644
> index 0000000000..8096fcb2d4
> --- /dev/null
> +++ b/board/ti/am64x_sk/readme.txt
> @@ -0,0 +1,49 @@
> +Texas Instuments AM64x SK Test and Development Board
> +
> +Description
> +===========
> +
> +These configurations will build a complete image and
> +device tree blobs for the the TI AM64x_sk board.

These configurations => This configuration

No need to have "and device tree blobs", this is implied by "complete
image".


> diff --git a/configs/am64x_sk_defconfig b/configs/am64x_sk_defconfig
> new file mode 100644
> index 0000000000..b8ad2fb68a
> --- /dev/null
> +++ b/configs/am64x_sk_defconfig
> @@ -0,0 +1,44 @@
> +BR2_aarch64=y

Please specify explicitly the Cortex-A53 core.

Please also add:

BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_0=y

> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am64x_sk/genimage.cfg"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.0.9"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +BR2_PACKAGE_LINUX_FIRMWARE=y
> +BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
> +BR2_TARGET_OPTEE_OS=y
> +BR2_TARGET_OPTEE_OS_PLATFORM="k3"

Could you make the OP-TEE version explicit, so that we build a
known-working version?

Thanks a lot!

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: add new package
  2022-12-11 20:09   ` Thomas Petazzoni via buildroot
@ 2022-12-11 20:41     ` François Perrad
  2022-12-11 21:22       ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 19+ messages in thread
From: François Perrad @ 2022-12-11 20:41 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi,
	Anand Gadiyar via buildroot, Giulio Benetti, Romain Naour,
	Anand Gadiyar


[-- Attachment #1.1: Type: text/plain, Size: 4423 bytes --]

Le dim. 11 déc. 2022 à 21:09, Thomas Petazzoni via buildroot <
buildroot@buildroot.org> a écrit :

> Hello,
>
> On Tue, 6 Dec 2022 11:17:18 -0600
> Anand Gadiyar via buildroot <buildroot@buildroot.org> wrote:
>
> > From: Xuanhao Shi <x-shi@ti.com>
> >
> > This is the image generator that builds the full boot binary,
> > tiboot3.bin, for the R5 core on TI's k3 devices.
> > This requires the R5 spl output from the ti-k3-r5-loader package.
> >
> > https://git.ti.com/cgit/k3-image-gen/k3-image-gen
>
> The commit title should just be:
>
>         boot/ti-k3-image-gen: new package
>
> (not "add new package")
>
>
> > diff --git a/boot/ti-k3-image-gen/Config.in
> b/boot/ti-k3-image-gen/Config.in
> > new file mode 100644
> > index 0000000000..02018f2f78
> > --- /dev/null
> > +++ b/boot/ti-k3-image-gen/Config.in
> > @@ -0,0 +1,30 @@
> > +config BR2_TARGET_TI_K3_IMAGE_GEN
> > +     bool "ti-k3-image-gen"
> > +     select BR2_TARGET_TI_K3_R5_LOADER
>
> Should be a:
>
>         depends on BR2_TARGET_TI_K3_R5_LOADER
>
> > +if BR2_TARGET_TI_K3_IMAGE_GEN
> > +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
> > +     string "SOC type for image gen"
>
>         string "SoC"
>
> > +     help
> > +       The target SoC option for image gen.
> > +       For example, "am64x" for AM64X boards.
> > +
> > +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE
> > +     string "SOC security type for image gen"
>
>         string "SoC security type"
>
> > +     help
> > +       The security type option for image gen.
> > +       Options are "gp", "hs-fs", or "hs-se".
> > +
> > +config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
> > +     string "CONFIG type for image gen"
>
>         string "config type"
>
>
> > +define TI_K3_IMAGE_GEN_BUILD_CMDS
> > +     $(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
> > +endef
>
> There is a serious problem: the build process of this package downloads
> stuff:
>
> Connecting to git.ti.com (git.ti.com)|198.47.28.208|:443... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location:
> https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/blobs/raw/59d6f921b3b562e0aa1f42ce322e4645b1bfc52c/ti-sysfw/ti-sci-firmware-am64x-gp.bin
> [following]
> --2022-12-11 20:53:58--
> https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/blobs/raw/59d6f921b3b562e0aa1f42ce322e4645b1bfc52c/ti-sysfw/ti-sci-firmware-am64x-gp.bin
> Reusing existing connection to git.ti.com:443.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location:
> https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/plain/ti-sysfw/ti-sci-firmware-am64x-gp.bin?id=59d6f921b3b562e0aa1f42ce322e4645b1bfc52c
> [following]
> --2022-12-11 20:53:59--
> https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/plain/ti-sysfw/ti-sci-firmware-am64x-gp.bin?id=59d6f921b3b562e0aa1f42ce322e4645b1bfc52c
> Reusing existing connection to git.ti.com:443.
> HTTP request sent, awaiting response... 200 OK
> Length: 225248 (220K) [application/octet-stream]
> Saving to: ‘ti-sci-firmware-am64x-gp.bin’
>
> ti-sci-firmware-am64x-gp.bin
> 100%[==============================================>] 219,97K   114KB/s
> in 1,9s
>
> 2022-12-11 20:54:01 (114 KB/s) - ‘ti-sci-firmware-am64x-gp.bin’ saved
> [225248/225248]
>
> Download SUCCESS!
>
> This is not acceptable as it circumvents the download infrastructure of
> Buildroot, but also the legal information collection infrastructure.
>
> This needs to be fixed by downloading this file, either through a
> separate package, or as an _EXTRA_DOWNLOADS of this package, and the
> Makefile needs to be changed to not download this file. My impression
> is that the Makefile will not download the files if they are already
> available. So you could have _EXTRA_DOWNLOADS + some post-extract logic
> to put the files at the right place.
>
>
see
https://patchwork.ozlabs.org/project/buildroot/patch/20221211203826.3117784-1-francois.perrad@gadz.org/
this patch does this rework.

François


> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
>

[-- Attachment #1.2: Type: text/html, Size: 7068 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: add new package
  2022-12-11 20:41     ` François Perrad
@ 2022-12-11 21:22       ` Thomas Petazzoni via buildroot
  2022-12-12 22:35         ` Gadiyar, Anand via buildroot
  0 siblings, 1 reply; 19+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-11 21:22 UTC (permalink / raw)
  To: François Perrad
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi,
	Anand Gadiyar via buildroot, Giulio Benetti, Romain Naour,
	Anand Gadiyar

On Sun, 11 Dec 2022 21:41:11 +0100
François Perrad <francois.perrad@gadz.org> wrote:

> see
> https://patchwork.ozlabs.org/project/buildroot/patch/20221211203826.3117784-1-francois.perrad@gadz.org/
> this patch does this rework.

Thanks, but it needs to be integrated in a v8 of the patch series.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: add new package
  2022-12-11 21:22       ` Thomas Petazzoni via buildroot
@ 2022-12-12 22:35         ` Gadiyar, Anand via buildroot
  0 siblings, 0 replies; 19+ messages in thread
From: Gadiyar, Anand via buildroot @ 2022-12-12 22:35 UTC (permalink / raw)
  To: Thomas Petazzoni, François Perrad
  Cc: Brattlof, Bryan, Davis, Andrew, Xuanhao Shi,
	Anand Gadiyar via buildroot, Giulio Benetti, Romain Naour

> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Sunday, December 11, 2022 3:22 PM
> 
> On Sun, 11 Dec 2022 21:41:11 +0100
> François Perrad <francois.perrad@gadz.org> wrote:
> 
> > see
> >
> https://patchwork.ozlabs.org/project/buildroot/patch/20221211203826.3117784-1-francois.perrad@gadz.org/
> > this patch does this rework.
> 
> Thanks, but it needs to be integrated in a v8 of the patch series.
> 
> Thanks!
> 
> Thomas

Thanks for the comments Thomas and I apologize for not
catching these points earlier. We did build but didn't read the
log messages obviously.

I will rework and resubmit v8 shortly.

Best Regards,
Anand

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: add new package
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: " Anand Gadiyar via buildroot
  2022-12-06 20:19   ` François Perrad
  2022-12-11 20:09   ` Thomas Petazzoni via buildroot
@ 2022-12-19 20:56   ` Julien Olivain
  2 siblings, 0 replies; 19+ messages in thread
From: Julien Olivain @ 2022-12-19 20:56 UTC (permalink / raw)
  To: Anand Gadiyar
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, buildroot,
	Giulio Benetti, Romain Naour

Hi Anand,

On 06/12/2022 18:17, Anand Gadiyar via buildroot wrote:
> From: Xuanhao Shi <x-shi@ti.com>
> 
> This is the image generator that builds the full boot binary,
> tiboot3.bin, for the R5 core on TI's k3 devices.
> This requires the R5 spl output from the ti-k3-r5-loader package.
> 
> https://git.ti.com/cgit/k3-image-gen/k3-image-gen
> 
> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Reviewed-by: Julien Olivain <ju.o@free.fr>

> Acked-by: Andrew Davis <afd@ti.com>
> Tested-by: Bryan Brattlof <bb@ti.com>
> Cc: Romain Naour <romain.naour@gmail.com>
> Cc: Francois Perrad <francois.perrad@gadz.org>
> ---
>  DEVELOPERS                                |  2 ++
>  boot/Config.in                            |  1 +
>  boot/ti-k3-image-gen/Config.in            | 30 ++++++++++++++++
>  boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 ++
>  boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 42 +++++++++++++++++++++++
>  5 files changed, 77 insertions(+)
>  create mode 100644 boot/ti-k3-image-gen/Config.in
>  create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.hash
>  create mode 100644 boot/ti-k3-image-gen/ti-k3-image-gen.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 62d77b6c4b..b5b6cd0a99 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -129,6 +129,7 @@ F:	package/libxmlrpc/
>  F:	package/python-docopt/
> 
>  N:	Anand Gadiyar <gadiyar@ti.com>
> +F:	boot/ti-k3-image-gen/
>  F:	boot/ti-k3-r5-loader/
> 
>  N:	André Zwing <nerv@dawncrow.de>
> @@ -3059,6 +3060,7 @@ N:	Wojciech Niziński <niziak@spox.org>
>  F:	package/fwup/
> 
>  N:	Xuanhao Shi <X15000177@gmail.com>
> +F:	boot/ti-k3-image-gen/
>  F:	boot/ti-k3-r5-loader/
> 
>  N:	Yair Ben Avraham <yairba@protonmail.com>
> diff --git a/boot/Config.in b/boot/Config.in
> index ce17b2df6b..1b25bacfee 100644
> --- a/boot/Config.in
> +++ b/boot/Config.in
> @@ -22,6 +22,7 @@ source "boot/s500-bootloader/Config.in"
>  source "boot/shim/Config.in"
>  source "boot/sun20i-d1-spl/Config.in"
>  source "boot/syslinux/Config.in"
> +source "boot/ti-k3-image-gen/Config.in"
>  source "boot/ti-k3-r5-loader/Config.in"
>  source "boot/uboot/Config.in"
>  source "boot/vexpress-firmware/Config.in"
> diff --git a/boot/ti-k3-image-gen/Config.in 
> b/boot/ti-k3-image-gen/Config.in
> new file mode 100644
> index 0000000000..02018f2f78
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/Config.in
> @@ -0,0 +1,30 @@
> +config BR2_TARGET_TI_K3_IMAGE_GEN
> +	bool "ti-k3-image-gen"
> +	select BR2_TARGET_TI_K3_R5_LOADER
> +	help
> +	  Use TI's k3-image-gen to build a separate bare metal
> +	  boot binary from a separate spl. Currently supports
> +	  version 08.05.00.004 as default.

Why putting the version in the Config.in? Buildroot package usually 
don't
include the version here. It may be missed later, when the package is
updated. Is there anything special about this version?
If not, consider removing the version here.

> +
> +	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
> +
> +if BR2_TARGET_TI_K3_IMAGE_GEN
> +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
> +	string "SOC type for image gen"
> +	help
> +	  The target SoC option for image gen.
> +	  For example, "am64x" for AM64X boards.
> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE
> +	string "SOC security type for image gen"
> +	help
> +	  The security type option for image gen.
> +	  Options are "gp", "hs-fs", or "hs-se".

Comment says: Options are "gp", "hs-fs", or "hs-se".

If those are the only choices, why not using a Kconfig "choice" instead?

Moreover, when trying with a SK-AM64B board, I needed to set "hs-fs" 
(because B board
seems to include a Silicon Revision 2.0, which requires "hs-fs"). In 
that case,
compilation failed with:

ti-k3-image-gen 08.05.00.004 Building
Makefile:67: *** TI_SECURE_DEV_PKG must be set for HS, defaults will not 
work.  Stop.

This "hs-fs" seems to be broken, for now.

A note could be added here, about the meaning of "gp" (General Purpose), 
and
"hs-fs" High-Security Field Securable and how it is linked to some 
silicon revision.
Ex:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1158018/faq-processor-sdk-am64x-am64x-am243x-sr-2-0-device-type-transition

> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
> +	string "CONFIG type for image gen"
> +	help
> +	  The board config option for image gen.
> +	  Usually "sk" or "evm".
> +endif
> +

The empty line at end of Config.in file generate "make check-package" 
warning:

boot/ti-k3-image-gen/Config.in:30: empty line at end of file
...
1 warnings generated
make[1]: *** [Makefile:1257: check-package] Error 1
make: *** [Makefile:84: _all] Error 2

Please remove it.

> diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.hash
> b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
> new file mode 100644
> index 0000000000..82c5b17060
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256
> d13e9556bfba32d14071e172589683e48f6fea705a0b05ddd7fe984002089888
> k3-image-gen-08.05.00.004.tar.gz

"make legal-info" shows:
ti-k3-image-gen 08.05.00.004 Collecting legal info
ERROR: No hash found for LICENSE

Please add a hash for the LICENSE file declared.

> diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> new file mode 100644
> index 0000000000..f8e6105bfb
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> @@ -0,0 +1,42 @@
> +################################################################################
> +#
> +# ti-k3-image-gen
> +#
> +################################################################################
> +
> +TI_K3_IMAGE_GEN_VERSION = 08.05.00.004

There is a newer version 08.05.00.007 available. See:
https://git.ti.com/cgit/k3-image-gen/k3-image-gen/tag/?h=08.05.00.007
Consider taking the latest version in the next patch version, unless 
there is a
specific reason for taking the proposed one (in that case, please add a 
comment).

> +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.
> +TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader
> +
> +# The ti-k3-image-gen makefiles seem to need some feature from Make 
> v4.0,
> +# similar to u-boot. Explicitly use $(BR2_MAKE) here, as the build
> +# otherwise fails with some misleading error message.
> +TI_K3_IMAGE_GEN_MAKE = $(BR2_MAKE)
> +TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
> +TI_K3_IMAGE_GEN_SOC_TYPE = $(call
> qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE))
> +TI_K3_IMAGE_GEN_CONFIG = $(call 
> qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))
> +TI_K3_IMAGE_GEN_MAKE_OPTS = \
> +	SOC=$(TI_K3_IMAGE_GEN_SOC) \
> +	SOC_TYPE=$(TI_K3_IMAGE_GEN_SOC_TYPE) \
> +	CONFIG=$(TI_K3_IMAGE_GEN_CONFIG) \
> +	CROSS_COMPILE=$(HOST_DIR)/bin/arm-none-eabi- \
> +	SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
> +	O=$(@D)/tmp \
> +	BIN_DIR=$(@D)
> +
> +define TI_K3_IMAGE_GEN_BUILD_CMDS
> +	$(TI_K3_IMAGE_GEN_MAKE) -C $(@D) $(TI_K3_IMAGE_GEN_MAKE_OPTS)
> +endef
> +
> +define TI_K3_IMAGE_GEN_INSTALL_IMAGES_CMDS
> +	cp $(@D)/tiboot3.bin $(BINARIES_DIR)
> +endef
> +
> +$(eval $(generic-package))
> --
> 2.34.1

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board
  2022-12-06 17:17 ` [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board Anand Gadiyar via buildroot
  2022-12-06 20:19   ` François Perrad
  2022-12-11 20:12   ` Thomas Petazzoni via buildroot
@ 2022-12-19 21:12   ` Julien Olivain
  2022-12-20 19:29     ` Gadiyar, Anand via buildroot
  2 siblings, 1 reply; 19+ messages in thread
From: Julien Olivain @ 2022-12-19 21:12 UTC (permalink / raw)
  To: Anand Gadiyar
  Cc: Bryan Brattlof, Andrew Davis, Xuanhao Shi, buildroot,
	Giulio Benetti, Romain Naour

Hi Anand,

On 06/12/2022 18:17, Anand Gadiyar via buildroot wrote:
> From: Xuanhao Shi <x-shi@ti.com>
> 
> Adds support for ti's am64x_sk board.
> Adds the configs for generating output sdcard image.
> Adds the defconfigs for am64x_sk.
> 
> The AM64x_sk board is designed for the AM642 SoC with
> two ARM Cortex-A53 and four ARM Cortex-R5. It also
> supports RJ 45 Ethernet, Wi-Fi, and Bluetooth.
> 
> More information about the board can be found at:
> https://www.ti.com/tool/SK-AM64
> 
> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Reviewed-by: Julien Olivain <ju.o@free.fr>

> Acked-by: Andrew Davis <afd@ti.com>
> Tested-by: Bryan Brattlof <bb@ti.com>
> Cc: Romain Naour <romain.naour@gmail.com>
> Cc: Francois Perrad <francois.perrad@gadz.org>
> ---
>  DEVELOPERS                     |  4 +++
>  board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++
>  board/ti/am64x_sk/readme.txt   | 49 ++++++++++++++++++++++++++++++++++
>  configs/am64x_sk_defconfig     | 44 ++++++++++++++++++++++++++++++
>  4 files changed, 124 insertions(+)
>  create mode 100644 board/ti/am64x_sk/genimage.cfg
>  create mode 100644 board/ti/am64x_sk/readme.txt
>  create mode 100644 configs/am64x_sk_defconfig
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index b5b6cd0a99..84886e1fa4 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -129,8 +129,10 @@ F:	package/libxmlrpc/
>  F:	package/python-docopt/
> 
>  N:	Anand Gadiyar <gadiyar@ti.com>
> +F:	board/ti/am64x_sk/
>  F:	boot/ti-k3-image-gen/
>  F:	boot/ti-k3-r5-loader/
> +F:	configs/am64x_sk_defconfig
> 
>  N:	André Zwing <nerv@dawncrow.de>
>  F:	package/libkrb5/
> @@ -3060,8 +3062,10 @@ N:	Wojciech Niziński <niziak@spox.org>
>  F:	package/fwup/
> 
>  N:	Xuanhao Shi <X15000177@gmail.com>
> +F:	board/ti/am64x_sk/
>  F:	boot/ti-k3-image-gen/
>  F:	boot/ti-k3-r5-loader/
> +F:	configs/am64x_sk_defconfig
> 
>  N:	Yair Ben Avraham <yairba@protonmail.com>
>  F:	package/casync/
> diff --git a/board/ti/am64x_sk/genimage.cfg 
> b/board/ti/am64x_sk/genimage.cfg
> new file mode 100644
> index 0000000000..26304fe98f
> --- /dev/null
> +++ b/board/ti/am64x_sk/genimage.cfg
> @@ -0,0 +1,27 @@
> +image boot.vfat {
> +	vfat {
> +		files = {
> +			"tiboot3.bin",
> +			"tispl.bin",
> +			"u-boot.img",
> +		}
> +	}
> +
> +	size = 16M
> +}
> +
> +image sdcard.img {
> +	hdimage {
> +	}
> +
> +	partition u-boot {
> +		partition-type = 0xC
> +		bootable = "true"
> +		image = "boot.vfat"
> +	}
> +
> +	partition rootfs {
> +		partition-type = 0x83
> +		image = "rootfs.ext4"
> +	}
> +}
> diff --git a/board/ti/am64x_sk/readme.txt 
> b/board/ti/am64x_sk/readme.txt
> new file mode 100644
> index 0000000000..8096fcb2d4
> --- /dev/null
> +++ b/board/ti/am64x_sk/readme.txt
> @@ -0,0 +1,49 @@
> +Texas Instuments AM64x SK Test and Development Board
> +
> +Description
> +===========
> +
> +These configurations will build a complete image and
> +device tree blobs for the the TI AM64x_sk board.

To avoid confusion between SK-AM64 and SK-AM64B, I suggest:

1. to add the board url in this readme.txt, for example,
using the same comment as in the commit log:
"""
More information about the board can be found at:
https://www.ti.com/tool/SK-AM64
"""

2. add a note that:
This configuration is for SK-AM64 only, since it's including:
BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE="gp"
The SK-AM64B [2] is not supported, as it would require "hs-fs".

[2] https://www.ti.com/tool/SK-AM64B

> +
> +How to build it
> +===============
> +
> +Select the default configuration for the target:
> +$ make am64x_sk_defconfig
> +
> +Optional: modify the configuration:
> +$ make menuconfig
> +
> +Build:
> +$ make
> +
> +Result of the build:
> +===================
> +output/images/
> ++-- soc
> ++-- ti-connectivity
> ++-- bl31.bin
> ++-- boot.vfat
> ++-- Image
> ++-- k3-am642-sk.dtb
> ++-- r5-u-boot-spl.bin
> ++-- rootfs.ext2
> ++-- rootfs.ext4
> ++-- rootfs.tar
> ++-- sdcard.img
> ++-- tee.bin
> ++-- tee-header_v2.bin
> ++-- tee-pageable_v2.bin
> ++-- tee-pager_v2.bin
> ++-- tiboot3.bin
> ++-- tispl.bin
> ++-- u-boot.img
> +
> +To copy the image file to the sdcard use dd:
> +$ dd if=output/images/sdcard.img of=/dev/sdX
> +
> +Insert the SDcard into the AM64x_sk board, and power it up with
> +a USB Type-C connector. The system should come up. You can use
> +a micro-USB to connect to the connector labled MAIN_UART0 to
> +communicate with the board.
> diff --git a/configs/am64x_sk_defconfig b/configs/am64x_sk_defconfig
> new file mode 100644
> index 0000000000..b8ad2fb68a
> --- /dev/null
> +++ b/configs/am64x_sk_defconfig
> @@ -0,0 +1,44 @@
> +BR2_aarch64=y
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am64x_sk/genimage.cfg"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.0.9"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-sk"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +BR2_PACKAGE_LINUX_FIRMWARE=y
> +BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7.0"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y
> +BR2_TARGET_OPTEE_OS=y
> +BR2_TARGET_OPTEE_OS_PLATFORM="k3"
> +BR2_TARGET_TI_K3_IMAGE_GEN=y
> +BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"
> +BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE="gp"
> +BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
> +BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am64x_evm_r5"
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.10"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am64x_evm_a53"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
> +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
> +# BR2_TARGET_UBOOT_FORMAT_BIN is not set
> +BR2_TARGET_UBOOT_FORMAT_IMG=y
> +BR2_TARGET_UBOOT_SPL=y
> +BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
> +BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_MTOOLS=y
> --
> 2.34.1

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board
  2022-12-19 21:12   ` Julien Olivain
@ 2022-12-20 19:29     ` Gadiyar, Anand via buildroot
       [not found]       ` <20230608063000.882363-1-patrick.oppenlander@gmail.com>
  0 siblings, 1 reply; 19+ messages in thread
From: Gadiyar, Anand via buildroot @ 2022-12-20 19:29 UTC (permalink / raw)
  To: Julien Olivain
  Cc: Brattlof, Bryan, Davis, Andrew, Xuanhao Shi, buildroot,
	Giulio Benetti, Romain Naour

> From: Julien Olivain <ju.o@free.fr>


> > +
> > +These configurations will build a complete image and
> > +device tree blobs for the the TI AM64x_sk board.
> 
> To avoid confusion between SK-AM64 and SK-AM64B, I suggest:
> 
> 1. to add the board url in this readme.txt, for example,
> using the same comment as in the commit log:
> """
> More information about the board can be found at:
> https://www.ti.com/tool/SK-AM64
> """
> 
> 2. add a note that:
> This configuration is for SK-AM64 only, since it's including:
> BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE="gp"
> The SK-AM64B [2] is not supported, as it would require "hs-fs".
> 
> [2] https://www.ti.com/tool/SK-AM64B
> 

Thanks for the review Julien!

The SK-AM64B wasn't around when we submitted the first patchset.
I expected a follow on patch to add the hs-fs support properly.

I'll clarify in the next revision that this series is for GP only. We'll need
some work to get the SK-AM64B supported and tested, and I'll try and
get that enabled after this initial series is merged.

I'll post a new series shortly with changes addressing review comments
from you and Thomas

- Anand
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards
       [not found]       ` <20230608063000.882363-1-patrick.oppenlander@gmail.com>
@ 2023-06-08 13:29         ` Gadiyar, Anand via buildroot
  2023-06-08 15:59           ` Andreas Dannenberg via buildroot
  0 siblings, 1 reply; 19+ messages in thread
From: Gadiyar, Anand via buildroot @ 2023-06-08 13:29 UTC (permalink / raw)
  To: patrick.oppenlander, buildroot
  Cc: Brattlof, Bryan, Davis, Andrew, X15000177, ju.o, giulio.benetti,
	romain.naour

> From: patrick.oppenlander@gmail.com <patrick.oppenlander@gmail.com>
> 
> Hi,
> 
> I'm looking to use buildroot with a PHYTEC phyCORE-AM64x SOM which is based on
> the same TI part as the SK-AM64/SK-AM64B. Happy to post patches if I happen to be successful.
> 
> Ideally it would be easiest to build support for the SOM on top of these
> patches. Is this series still alive?

Hi Patrick,

I gave up after the last round of review comments, but there is someone
at TI who has taken it up again recently.

They're focusing on the AM62x including other goodies like display and GPU, and
has a working baseline. He was planning to post the series upstream shortly after.

The series 7 should still work functionally. All the review comments were
valid though and might be easy to address if you want to start from there.

Since there is community interest in having AM64x support, I would love to
take this up again.

Best Regards,
Anand
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards
  2023-06-08 13:29         ` [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards Gadiyar, Anand via buildroot
@ 2023-06-08 15:59           ` Andreas Dannenberg via buildroot
  2023-06-13  5:56             ` Patrick Oppenlander
  0 siblings, 1 reply; 19+ messages in thread
From: Andreas Dannenberg via buildroot @ 2023-06-08 15:59 UTC (permalink / raw)
  To: Gadiyar, Anand
  Cc: Brattlof, Bryan, Davis, Andrew, X15000177, ju.o, buildroot,
	giulio.benetti, romain.naour, patrick.oppenlander

All,

On Thu, Jun 08, 2023 at 01:29:02PM +0000, Gadiyar, Anand via buildroot wrote:
> > From: patrick.oppenlander@gmail.com <patrick.oppenlander@gmail.com>
> > 
> > Hi,
> > 
> > I'm looking to use buildroot with a PHYTEC phyCORE-AM64x SOM which is based on
> > the same TI part as the SK-AM64/SK-AM64B. Happy to post patches if I happen to be successful.
> > 
> > Ideally it would be easiest to build support for the SOM on top of these
> > patches. Is this series still alive?
> 
> Hi Patrick,
> 
> I gave up after the last round of review comments, but there is someone
> at TI who has taken it up again recently.
> 
> They're focusing on the AM62x including other goodies like display and GPU, and
> has a working baseline. He was planning to post the series upstream shortly after.

I work for TI and have since picked up the work on the v7 patch series
that Anand and others last worked on. I've been forward porting the
exisiting patches on top of the latest 'master' commit, doing some
further cleanup also considering v7 feedback, plus making enhancements
needed to better support TI K3 SoCs. I've also added AM62x support, and
currently working on adding GPU support for AM62x (I have it already
working being able to run Weston and Chocolate Doom for testing
purposes, just needs some more cleanup).

My intermediate work is posted here [1] together with some instructions
and how to get it to work for anybody interested in the full solution
*today*.

My plan is once GPU support is complete and cleaned up I'll post a v8
series to this mailing list here with everything in it, and work with
the community on any further cleanup that may be needed. I expect to be
able to start this process next week. So I'd appreciate if we can
refrain from posting additional TI K3 patches until then.

Once merged, the temporary page [1] will get updated and/or dismantled.
It is certainly not meant to be a "forked solution" of sorts, and was
only intended to be a stop-gap measure for some immediate customer needs
we had here at TI.

Thanks,

--
Andreas Dannenberg
Texas Instruments Inc

[1] https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am64x-devices

> 
> The series 7 should still work functionally. All the review comments were
> valid though and might be easy to address if you want to start from there.
> 
> Since there is community interest in having AM64x support, I would love to
> take this up again.
> 
> Best Regards,
> Anand
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards
  2023-06-08 15:59           ` Andreas Dannenberg via buildroot
@ 2023-06-13  5:56             ` Patrick Oppenlander
  0 siblings, 0 replies; 19+ messages in thread
From: Patrick Oppenlander @ 2023-06-13  5:56 UTC (permalink / raw)
  To: Andreas Dannenberg
  Cc: Brattlof, Bryan, Davis, Andrew, X15000177, ju.o, buildroot,
	giulio.benetti, romain.naour, Gadiyar, Anand

On Fri, Jun 9, 2023 at 2:00 AM Andreas Dannenberg <dannenberg@ti.com> wrote:
>
> All,
>
> On Thu, Jun 08, 2023 at 01:29:02PM +0000, Gadiyar, Anand via buildroot wrote:
> > > From: patrick.oppenlander@gmail.com <patrick.oppenlander@gmail.com>
> > >
> > > Hi,
> > >
> > > I'm looking to use buildroot with a PHYTEC phyCORE-AM64x SOM which is based on
> > > the same TI part as the SK-AM64/SK-AM64B. Happy to post patches if I happen to be successful.
> > >
> > > Ideally it would be easiest to build support for the SOM on top of these
> > > patches. Is this series still alive?
> >
> > Hi Patrick,
> >
> > I gave up after the last round of review comments, but there is someone
> > at TI who has taken it up again recently.
> >
> > They're focusing on the AM62x including other goodies like display and GPU, and
> > has a working baseline. He was planning to post the series upstream shortly after.
>
> I work for TI and have since picked up the work on the v7 patch series
> that Anand and others last worked on. I've been forward porting the
> exisiting patches on top of the latest 'master' commit, doing some
> further cleanup also considering v7 feedback, plus making enhancements
> needed to better support TI K3 SoCs. I've also added AM62x support, and
> currently working on adding GPU support for AM62x (I have it already
> working being able to run Weston and Chocolate Doom for testing
> purposes, just needs some more cleanup).
>
> My intermediate work is posted here [1] together with some instructions
> and how to get it to work for anybody interested in the full solution
> *today*.

Thanks. I was able to get the PHYTEC board working using your patches
as a starting point.

> My plan is once GPU support is complete and cleaned up I'll post a v8
> series to this mailing list here with everything in it, and work with
> the community on any further cleanup that may be needed. I expect to be
> able to start this process next week. So I'd appreciate if we can
> refrain from posting additional TI K3 patches until then.
>
> Once merged, the temporary page [1] will get updated and/or dismantled.
> It is certainly not meant to be a "forked solution" of sorts, and was
> only intended to be a stop-gap measure for some immediate customer needs
> we had here at TI.

I look forward to seeing it merged,

Patrick

> Thanks,
>
> --
> Andreas Dannenberg
> Texas Instruments Inc
>
> [1] https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1226815/faq-buildroot-support-for-sitara-am62x-am62ax-am64x-devices
>
> >
> > The series 7 should still work functionally. All the review comments were
> > valid though and might be easy to address if you want to start from there.
> >
> > Since there is community interest in having AM64x support, I would love to
> > take this up again.
> >
> > Best Regards,
> > Anand
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-06-13  5:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 17:17 [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards Anand Gadiyar via buildroot
2022-12-06 17:17 ` [Buildroot] [PATCH v7 1/3] boot/ti-k3-r5-loader: add new package Anand Gadiyar via buildroot
2022-12-06 20:18   ` François Perrad
2022-12-11 20:06   ` Thomas Petazzoni via buildroot
2022-12-06 17:17 ` [Buildroot] [PATCH v7 2/3] boot/ti-k3-image-gen: " Anand Gadiyar via buildroot
2022-12-06 20:19   ` François Perrad
2022-12-11 20:09   ` Thomas Petazzoni via buildroot
2022-12-11 20:41     ` François Perrad
2022-12-11 21:22       ` Thomas Petazzoni via buildroot
2022-12-12 22:35         ` Gadiyar, Anand via buildroot
2022-12-19 20:56   ` Julien Olivain
2022-12-06 17:17 ` [Buildroot] [PATCH v7 3/3] board/ti/am64x_sk: add new board Anand Gadiyar via buildroot
2022-12-06 20:19   ` François Perrad
2022-12-11 20:12   ` Thomas Petazzoni via buildroot
2022-12-19 21:12   ` Julien Olivain
2022-12-20 19:29     ` Gadiyar, Anand via buildroot
     [not found]       ` <20230608063000.882363-1-patrick.oppenlander@gmail.com>
2023-06-08 13:29         ` [Buildroot] [PATCH v7 0/3] add support for TI's AM64x boards Gadiyar, Anand via buildroot
2023-06-08 15:59           ` Andreas Dannenberg via buildroot
2023-06-13  5:56             ` Patrick Oppenlander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.