Skip to content

Commit

Permalink
phyboard am64x: new board
Browse files Browse the repository at this point in the history
  • Loading branch information
pattop committed Jun 23, 2023
1 parent 7cd79fe commit 5b9a913
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 0 deletions.
30 changes: 30 additions & 0 deletions board/phytec/phyboard_am64x/genimage.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
image boot.vfat {
vfat {
files = {
"tiboot3.bin",
"tispl.bin",
"u-boot.img"
}
file uboot.env {
image = "uboot-env.bin"
}
}

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"
}
}
30 changes: 30 additions & 0 deletions board/phytec/phyboard_am64x/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
PHYTEC phyBOARD-AM64x
=====================

https://www.phytec.com/product/phyboard-am64x/

How to Build
============

The build process depends on some out of tree TI tools:

$ git clone https://git.ti.com/git/security-development-tools/core-secdev-k3.git

Load default configuration:

$ make phytec_phyboard_am64x_defconfig

Optionally change settings if required:

$ make menuconfig

Build root file system image:

$ make TI_SECURE_DEV_PKG=/path/to/ti/core-secdev-k3

Flashing
========

To write the image to an SD card:

$ dd if=output/images/sdcard.img of=/dev/sdX bs=4M conv=fsync oflag=direct status=progress
15 changes: 15 additions & 0 deletions board/phytec/phyboard_am64x/uboot-env.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
bootdelay=2
mmcdev=1
bootpart=2
console=ttyS2,115200n8
name_kern=/boot/Image
fdtfile=/boot/k3-am642-phyboard-electra-rdk.dtb
bootcmd=run args_all; run args_mmc; run get_kern_mmc; run get_fdt_mmc; run run_kern
args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000
args_mmc=run finduuid; setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw
run_kern=booti ${loadaddr} - ${fdtaddr}
get_kern_mmc=load mmc ${mmcdev}:${bootpart} ${loadaddr} ${name_kern}
get_fdt_mmc=load mmc ${mmcdev}:${bootpart} ${fdtaddr} ${fdtfile}
finduuid=part uuid mmc ${mmcdev}:${bootpart} uuid
fdtaddr=0x88000000
loadaddr=0x82000000
59 changes: 59 additions & 0 deletions configs/phyboard_am64x_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
BR2_aarch64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/phytec/phyboard_am64x/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/phytec/linux-phytec-ti"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.10.168-phy2"
BR2_LINUX_KERNEL_DEFCONFIG="phytec_ti"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am642-phyboard-electra-rdk"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_ROOTFS_EXT2_SIZE="128M"
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-2fcd408bb3a6756767a43c073c597cef06e7f2d5.tar.gz"
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_CUSTOM_TARBALL=y
BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL_LOCATION="https://github.com/OP-TEE/optee_os/archive/8e74d47616a20eaa23ca692f4bbbf917a236ed94.tar.gz"
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_FW_TYPE_TISCI=y
BR2_TARGET_TI_K3_IMAGE_GEN_SOC="am64x"
BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE_GP=y
BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG="evm"
BR2_TARGET_TI_K3_R5_LOADER=y
BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_GIT=y
BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_URL="https://github.com/phytec/u-boot-phytec-ti"
BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_REPO_VERSION="v2021.01_08.06.00.007-phy2"
BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="phycore_am64x_r5"
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_GIT=y
BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/phytec/u-boot-phytec-ti"
BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2021.01_08.06.00.007-phy2"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="phycore_am64x_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
BR2_PACKAGE_HOST_TI_CORE_SECDEV_K3=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE=y
BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE="board/phytec/phyboard_am64x/uboot-env.txt"
BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE="0x20000"

0 comments on commit 5b9a913

Please sign in to comment.