diff mbox series

[v7,3/3] board/ti/am64x_sk: add new board

Message ID 20221206171719.747581-4-gadiyar@ti.com
State Changes Requested
Headers show
Series add support for TI's AM64x boards | expand

Commit Message

Anand Gadiyar Dec. 6, 2022, 5:17 p.m. UTC
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

Comments

Francois Perrad Dec. 6, 2022, 8:19 p.m. UTC | #1
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
>
>
Thomas Petazzoni Dec. 11, 2022, 8:12 p.m. UTC | #2
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
Julien Olivain Dec. 19, 2022, 9:12 p.m. UTC | #3
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.
yegorslists--- via buildroot Dec. 20, 2022, 7:29 p.m. UTC | #4
> 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
yegorslists--- via buildroot June 8, 2023, 1:29 p.m. UTC | #5
> 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
Andreas Dannenberg June 8, 2023, 3:59 p.m. UTC | #6
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
Patrick Oppenlander June 13, 2023, 5:56 a.m. UTC | #7
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
diff mbox series

Patch

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