All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards
@ 2022-08-02 20:05 Xuanhao Shi via buildroot
  2022-08-02 20:05 ` [Buildroot] [PATCH 1/3] boot/ti-k3-r5-loader: add new package Xuanhao Shi via buildroot
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Xuanhao Shi via buildroot @ 2022-08-02 20:05 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

The series applied the changes requested by Thomas Petazzoni and 
Giulio Benetti to the previous patch for adding support to TI's 
AM6X boards ([1]). Specifically, it added support for the
AM64x_sk board only for now, but more k3 boards will be added
in the future.

[1] https://lists.buildroot.org/pipermail/buildroot/2022-July/647882.html

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            | 24 +++++++++++
 boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 33 +++++++++++++++
 boot/ti-k3-r5-loader/Config.in            | 13 ++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  2 +
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 45 +++++++++++++++++++++
 configs/am64x_sk_defconfig                | 48 ++++++++++++++++++++++
 11 files changed, 257 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.17.1

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

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

* [Buildroot] [PATCH 1/3] boot/ti-k3-r5-loader: add new package
  2022-08-02 20:05 [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Xuanhao Shi via buildroot
@ 2022-08-02 20:05 ` Xuanhao Shi via buildroot
  2022-08-02 21:36   ` Giulio Benetti
  2022-08-02 20:05 ` [Buildroot] [PATCH 2/3] boot/ti-k3-image-gen: " Xuanhao Shi via buildroot
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Xuanhao Shi via buildroot @ 2022-08-02 20:05 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

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>
---
 DEVELOPERS                                |  6 +++
 boot/Config.in                            |  1 +
 boot/ti-k3-r5-loader/Config.in            | 13 +++++++
 boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  2 +
 boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 45 +++++++++++++++++++++++
 5 files changed, 67 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 fa6efd210c..e498d2ff03 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -127,6 +127,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/
@@ -3021,6 +3024,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..7f5fa0b4c8
--- /dev/null
+++ b/boot/ti-k3-r5-loader/Config.in
@@ -0,0 +1,13 @@
+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.
+
+config BR2_TARGET_TI_K3_R5_LOADER_BOARD
+	string "Board to configure for"
+	depends on BR2_TARGET_TI_K3_R5_LOADER
+	help
+	  Specify the board to configure the bootloader for.
+	  This should be the name of a board under board/ti
+	  For example, "am64x_evm".
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..1e09fad9f5
--- /dev/null
+++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
@@ -0,0 +1,45 @@
+################################################################################
+#
+# ti-k3-r5-loader.mk
+#
+################################################################################
+
+TI_K3_R5_LOADER_VERSION = 2022.10-rc1
+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))
+TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(TI_K3_R5_LOADER_BOARD)_r5_defconfig
+TI_K3_R5_LOADER_MAKE_OPTS += \
+	CROSS_COMPILE=$(HOST_ARM_GNU_TOOLCHAIN_INSTALL_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.17.1

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

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

* [Buildroot] [PATCH 2/3] boot/ti-k3-image-gen: add new package
  2022-08-02 20:05 [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Xuanhao Shi via buildroot
  2022-08-02 20:05 ` [Buildroot] [PATCH 1/3] boot/ti-k3-r5-loader: add new package Xuanhao Shi via buildroot
@ 2022-08-02 20:05 ` Xuanhao Shi via buildroot
  2022-08-02 21:36   ` Giulio Benetti
  2022-08-02 20:05 ` [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board Xuanhao Shi via buildroot
  2022-08-02 21:42 ` [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Giulio Benetti
  3 siblings, 1 reply; 10+ messages in thread
From: Xuanhao Shi via buildroot @ 2022-08-02 20:05 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

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>
---
 DEVELOPERS                                |  2 ++
 boot/Config.in                            |  1 +
 boot/ti-k3-image-gen/Config.in            | 24 +++++++++++++++++
 boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 ++
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 33 +++++++++++++++++++++++
 5 files changed, 62 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 e498d2ff03..b21def111c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -128,6 +128,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>
@@ -3025,6 +3026,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..00416dcefc
--- /dev/null
+++ b/boot/ti-k3-image-gen/Config.in
@@ -0,0 +1,24 @@
+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.04.00.005 as default.
+
+	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
+	string "SOC type for image gen"
+	depends on BR2_TARGET_TI_K3_IMAGE_GEN
+	help
+	  The target SoC option for image gen.
+	  For example, "am64x" for AM64X boards.
+
+config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
+	string "CONFIG type for image gen"
+	depends on BR2_TARGET_TI_K3_IMAGE_GEN
+	help
+	  The board config option for image gen.
+	  Usually "sk" or "evm".
+
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..e307a02a67
--- /dev/null
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  e585dc868ada21ef3389159541d669b88bc406b453470e92da85d9222d271c96  k3-image-gen-08.04.00.005.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..1f97490392
--- /dev/null
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# ti-k3-image-gen
+#
+################################################################################
+
+TI_K3_IMAGE_GEN_VERSION = 08.04.00.005
+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 = system-firmware-image-gen-1.0-manifest.html
+TI_K3_IMAGE_GEN_INSTALL_IMAGES = YES
+TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader
+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_CONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))
+TI_K3_IMAGE_GEN_MAKE_OPTS = \
+	SOC=$(TI_K3_IMAGE_GEN_SOC) \
+	CONFIG=$(TI_K3_IMAGE_GEN_CONFIG) \
+	CROSS_COMPILE=$(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR)/bin/arm-none-eabi- \
+	SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
+	O=$(BINARIES_DIR) \
+	BIN_DIR=$(BINARIES_DIR)
+
+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.17.1

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

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

* [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board
  2022-08-02 20:05 [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Xuanhao Shi via buildroot
  2022-08-02 20:05 ` [Buildroot] [PATCH 1/3] boot/ti-k3-r5-loader: add new package Xuanhao Shi via buildroot
  2022-08-02 20:05 ` [Buildroot] [PATCH 2/3] boot/ti-k3-image-gen: " Xuanhao Shi via buildroot
@ 2022-08-02 20:05 ` Xuanhao Shi via buildroot
  2022-08-02 21:37   ` Giulio Benetti
  2022-08-02 21:42 ` [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Giulio Benetti
  3 siblings, 1 reply; 10+ messages in thread
From: Xuanhao Shi via buildroot @ 2022-08-02 20:05 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

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

Signed-off-by: Xuanhao Shi <x-shi@ti.com>
---
 DEVELOPERS                     |  4 +++
 board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++
 board/ti/am64x_sk/readme.txt   | 49 ++++++++++++++++++++++++++++++++++
 configs/am64x_sk_defconfig     | 48 +++++++++++++++++++++++++++++++++
 4 files changed, 128 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 b21def111c..e3d99443e9 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -128,8 +128,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/
@@ -3026,8 +3028,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..9e184c9866
--- /dev/null
+++ b/board/ti/am64x_sk/readme.txt
@@ -0,0 +1,49 @@
+Texas Instuments AM64x Evaluation Modules
+
+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..60a4efcaf0
--- /dev/null
+++ b/configs/am64x_sk_defconfig
@@ -0,0 +1,48 @@
+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="5.19"
+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_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="SPD=opteed"
+BR2_TARGET_OPTEE_OS=y
+BR2_TARGET_OPTEE_OS_CUSTOM_GIT=y
+BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL="https://github.com/OP-TEE/optee_os.git"
+BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION="3.18.0"
+BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY=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_CONFIG="evm"
+BR2_TARGET_TI_K3_R5_LOADER_BOARD="am64x_evm"
+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-rc1"
+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.17.1

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

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

* Re: [Buildroot] [PATCH 1/3] boot/ti-k3-r5-loader: add new package
  2022-08-02 20:05 ` [Buildroot] [PATCH 1/3] boot/ti-k3-r5-loader: add new package Xuanhao Shi via buildroot
@ 2022-08-02 21:36   ` Giulio Benetti
  0 siblings, 0 replies; 10+ messages in thread
From: Giulio Benetti @ 2022-08-02 21:36 UTC (permalink / raw)
  To: Xuanhao Shi, buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

Hi Xuanhao, Anand, Thomas, All,

On 02/08/22 22:05, Xuanhao Shi via buildroot wrote:
> 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>
> ---
>   DEVELOPERS                                |  6 +++
>   boot/Config.in                            |  1 +
>   boot/ti-k3-r5-loader/Config.in            | 13 +++++++
>   boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  2 +
>   boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 45 +++++++++++++++++++++++
>   5 files changed, 67 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 fa6efd210c..e498d2ff03 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -127,6 +127,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/
> @@ -3021,6 +3024,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..7f5fa0b4c8
> --- /dev/null
> +++ b/boot/ti-k3-r5-loader/Config.in
> @@ -0,0 +1,13 @@
> +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.
> +
> +config BR2_TARGET_TI_K3_R5_LOADER_BOARD
> +	string "Board to configure for"
> +	depends on BR2_TARGET_TI_K3_R5_LOADER
> +	help
> +	  Specify the board to configure the bootloader for.
> +	  This should be the name of a board under board/ti
> +	  For example, "am64x_evm".
> 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..1e09fad9f5
> --- /dev/null
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -0,0 +1,45 @@
> +################################################################################
> +#
> +# ti-k3-r5-loader.mk
> +#
> +################################################################################
> +
> +TI_K3_R5_LOADER_VERSION = 2022.10-rc1
> +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))
> +TI_K3_R5_LOADER_KCONFIG_DEFCONFIG = $(TI_K3_R5_LOADER_BOARD)_r5_defconfig
> +TI_K3_R5_LOADER_MAKE_OPTS += \
> +	CROSS_COMPILE=$(HOST_ARM_GNU_TOOLCHAIN_INSTALL_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))

I've seen only now you add also Anand as maintainer other than you, so
with a motivation of this in commit log:
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 2/3] boot/ti-k3-image-gen: add new package
  2022-08-02 20:05 ` [Buildroot] [PATCH 2/3] boot/ti-k3-image-gen: " Xuanhao Shi via buildroot
@ 2022-08-02 21:36   ` Giulio Benetti
  0 siblings, 0 replies; 10+ messages in thread
From: Giulio Benetti @ 2022-08-02 21:36 UTC (permalink / raw)
  To: Xuanhao Shi, buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

Hi Xuanhao, Anand, Thomas, All,

On 02/08/22 22:05, Xuanhao Shi via buildroot wrote:
> 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>
> ---
>   DEVELOPERS                                |  2 ++
>   boot/Config.in                            |  1 +
>   boot/ti-k3-image-gen/Config.in            | 24 +++++++++++++++++
>   boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 ++
>   boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 33 +++++++++++++++++++++++
>   5 files changed, 62 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 e498d2ff03..b21def111c 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -128,6 +128,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>
> @@ -3025,6 +3026,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..00416dcefc
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/Config.in
> @@ -0,0 +1,24 @@
> +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.04.00.005 as default.
> +
> +	  https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_SOC
> +	string "SOC type for image gen"
> +	depends on BR2_TARGET_TI_K3_IMAGE_GEN
> +	help
> +	  The target SoC option for image gen.
> +	  For example, "am64x" for AM64X boards.
> +
> +config BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG
> +	string "CONFIG type for image gen"
> +	depends on BR2_TARGET_TI_K3_IMAGE_GEN
> +	help
> +	  The board config option for image gen.
> +	  Usually "sk" or "evm".
> +
> 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..e307a02a67
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256  e585dc868ada21ef3389159541d669b88bc406b453470e92da85d9222d271c96  k3-image-gen-08.04.00.005.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..1f97490392
> --- /dev/null
> +++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
> @@ -0,0 +1,33 @@
> +################################################################################
> +#
> +# ti-k3-image-gen
> +#
> +################################################################################
> +
> +TI_K3_IMAGE_GEN_VERSION = 08.04.00.005
> +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 = system-firmware-image-gen-1.0-manifest.html
> +TI_K3_IMAGE_GEN_INSTALL_IMAGES = YES
> +TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader
> +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_CONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))
> +TI_K3_IMAGE_GEN_MAKE_OPTS = \
> +	SOC=$(TI_K3_IMAGE_GEN_SOC) \
> +	CONFIG=$(TI_K3_IMAGE_GEN_CONFIG) \
> +	CROSS_COMPILE=$(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR)/bin/arm-none-eabi- \
> +	SBL=$(BINARIES_DIR)/r5-u-boot-spl.bin \
> +	O=$(BINARIES_DIR) \
> +	BIN_DIR=$(BINARIES_DIR)
> +
> +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))

I've seen only now you add also Anand as maintainer other than you, so
with a motivation of this in commit log:
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board
  2022-08-02 20:05 ` [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board Xuanhao Shi via buildroot
@ 2022-08-02 21:37   ` Giulio Benetti
  2022-08-03 16:09     ` Xuanhao Shi via buildroot
  0 siblings, 1 reply; 10+ messages in thread
From: Giulio Benetti @ 2022-08-02 21:37 UTC (permalink / raw)
  To: Xuanhao Shi, buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

Hi Xuanhao, Anand, Thomas, All,

On 02/08/22 22:05, Xuanhao Shi via buildroot wrote:
> Adds support for ti's am64x_sk board.
> Adds the configs for generating output sdcard image.
> Adds the defconfigs for am64x_sk.

Here we need a brief description of the board and an URL pointing
to the board URL too

> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
> ---
>   DEVELOPERS                     |  4 +++
>   board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++
>   board/ti/am64x_sk/readme.txt   | 49 ++++++++++++++++++++++++++++++++++
>   configs/am64x_sk_defconfig     | 48 +++++++++++++++++++++++++++++++++
>   4 files changed, 128 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 b21def111c..e3d99443e9 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -128,8 +128,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/
> @@ -3026,8 +3028,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..9e184c9866
> --- /dev/null
> +++ b/board/ti/am64x_sk/readme.txt
> @@ -0,0 +1,49 @@
> +Texas Instuments AM64x Evaluation Modules
> +
> +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..60a4efcaf0
> --- /dev/null
> +++ b/configs/am64x_sk_defconfig
> @@ -0,0 +1,48 @@
> +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="5.19"
> +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_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="SPD=opteed"
> +BR2_TARGET_OPTEE_OS=y
> +BR2_TARGET_OPTEE_OS_CUSTOM_GIT=y
> +BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL="https://github.com/OP-TEE/optee_os.git"
> +BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION="3.18.0"
> +BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY=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_CONFIG="evm"
> +BR2_TARGET_TI_K3_R5_LOADER_BOARD="am64x_evm"
> +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-rc1"
> +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

I've built this defconfig successfully and everything looks good to me
except I've seen only now you add also Anand as maintainer other than
you, so with a motivation of this and the *improvement requested above
in commit log*:
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards
  2022-08-02 20:05 [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Xuanhao Shi via buildroot
                   ` (2 preceding siblings ...)
  2022-08-02 20:05 ` [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board Xuanhao Shi via buildroot
@ 2022-08-02 21:42 ` Giulio Benetti
  3 siblings, 0 replies; 10+ messages in thread
From: Giulio Benetti @ 2022-08-02 21:42 UTC (permalink / raw)
  To: Xuanhao Shi, buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

Hi Xuanhao,

can you please set this patch:
https://patchwork.ozlabs.org/project/buildroot/list/?series=311753
as superseded since there is V3 now?

Thanks a lot
Best regards
-- 
Giulio Benetti
Benetti Engineering sas

On 02/08/22 22:05, Xuanhao Shi via buildroot wrote:
> The series applied the changes requested by Thomas Petazzoni and
> Giulio Benetti to the previous patch for adding support to TI's
> AM6X boards ([1]). Specifically, it added support for the
> AM64x_sk board only for now, but more k3 boards will be added
> in the future.
> 
> [1] https://lists.buildroot.org/pipermail/buildroot/2022-July/647882.html
> 
> 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            | 24 +++++++++++
>   boot/ti-k3-image-gen/ti-k3-image-gen.hash |  2 +
>   boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 33 +++++++++++++++
>   boot/ti-k3-r5-loader/Config.in            | 13 ++++++
>   boot/ti-k3-r5-loader/ti-k3-r5-loader.hash |  2 +
>   boot/ti-k3-r5-loader/ti-k3-r5-loader.mk   | 45 +++++++++++++++++++++
>   configs/am64x_sk_defconfig                | 48 ++++++++++++++++++++++
>   11 files changed, 257 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
> 

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

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

* Re: [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board
  2022-08-02 21:37   ` Giulio Benetti
@ 2022-08-03 16:09     ` Xuanhao Shi via buildroot
  2022-08-03 16:38       ` Giulio Benetti
  0 siblings, 1 reply; 10+ messages in thread
From: Xuanhao Shi via buildroot @ 2022-08-03 16:09 UTC (permalink / raw)
  To: Giulio Benetti, buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

On 8/2/22 16:37, Giulio Benetti wrote:
> Hi Xuanhao, Anand, Thomas, All,
> 
> On 02/08/22 22:05, Xuanhao Shi via buildroot wrote:
>> Adds support for ti's am64x_sk board.
>> Adds the configs for generating output sdcard image.
>> Adds the defconfigs for am64x_sk.
> 
> Here we need a brief description of the board and an URL pointing
> to the board URL too
> 
>> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
>> ---
>>   DEVELOPERS                     |  4 +++
>>   board/ti/am64x_sk/genimage.cfg | 27 +++++++++++++++++++
>>   board/ti/am64x_sk/readme.txt   | 49 ++++++++++++++++++++++++++++++++++
>>   configs/am64x_sk_defconfig     | 48 +++++++++++++++++++++++++++++++++
>>   4 files changed, 128 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 b21def111c..e3d99443e9 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -128,8 +128,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/
>> @@ -3026,8 +3028,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..9e184c9866
>> --- /dev/null
>> +++ b/board/ti/am64x_sk/readme.txt
>> @@ -0,0 +1,49 @@
>> +Texas Instuments AM64x Evaluation Modules
>> +
>> +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..60a4efcaf0
>> --- /dev/null
>> +++ b/configs/am64x_sk_defconfig
>> @@ -0,0 +1,48 @@
>> +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="5.19"
>> +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_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="SPD=opteed"
>> +BR2_TARGET_OPTEE_OS=y
>> +BR2_TARGET_OPTEE_OS_CUSTOM_GIT=y
>> +BR2_TARGET_OPTEE_OS_CUSTOM_REPO_URL="https://github.com/OP-TEE/optee_os.git" 
>>
>> +BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION="3.18.0"
>> +BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY=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_CONFIG="evm"
>> +BR2_TARGET_TI_K3_R5_LOADER_BOARD="am64x_evm"
>> +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-rc1"
>> +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
> 
> I've built this defconfig successfully and everything looks good to me
> except I've seen only now you add also Anand as maintainer other than
> you, so with a motivation of this and the *improvement requested above
> in commit log*:
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> 
> Best regards

Hi Giulio,

Thanks a lot for the review and testing.

I have fixed the commit logs and sent in v4 of the patch.

I'll mark the relevant older versions as superseded.

Thanks again.

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

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

* Re: [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board
  2022-08-03 16:09     ` Xuanhao Shi via buildroot
@ 2022-08-03 16:38       ` Giulio Benetti
  0 siblings, 0 replies; 10+ messages in thread
From: Giulio Benetti @ 2022-08-03 16:38 UTC (permalink / raw)
  To: Xuanhao Shi, buildroot; +Cc: Thomas Petazzoni, Anand Gadiyar

Hi Xuanhao,

On 03/08/22 18:09, Xuanhao Shi via buildroot wrote:

[ SNIP ]

> 
> Hi Giulio,
> 
> Thanks a lot for the review and testing.

It's a pleasure :-)

> I have fixed the commit logs and sent in v4 of the patch.

I've just built it correctly and looks good to me.

> I'll mark the relevant older versions as superseded.

Well done.

Hope to see am62x board patch soon.

Kind regards
-- 
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-08-03 16:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 20:05 [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Xuanhao Shi via buildroot
2022-08-02 20:05 ` [Buildroot] [PATCH 1/3] boot/ti-k3-r5-loader: add new package Xuanhao Shi via buildroot
2022-08-02 21:36   ` Giulio Benetti
2022-08-02 20:05 ` [Buildroot] [PATCH 2/3] boot/ti-k3-image-gen: " Xuanhao Shi via buildroot
2022-08-02 21:36   ` Giulio Benetti
2022-08-02 20:05 ` [Buildroot] [PATCH 3/3] board/ti/am64x_sk: add new board Xuanhao Shi via buildroot
2022-08-02 21:37   ` Giulio Benetti
2022-08-03 16:09     ` Xuanhao Shi via buildroot
2022-08-03 16:38       ` Giulio Benetti
2022-08-02 21:42 ` [Buildroot] [PATCH v3 0/3] add support for TI's AM6X boards Giulio Benetti

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.