浏览代码

board/beagleboard: add initial support for the beagleplay

Add the initial baseport level support for The BeagleBoard.org
Foundation's BeaglePlay board.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Tested-by: Paresh Bhagat <p-bhagat@ti.com>
[Romain: use BR2_TARGET_OPTEE_OS_PLATFORM="k3-am62x"]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Bryan Brattlof 1 年之前
父节点
当前提交
1eb7d2b860

+ 2 - 0
DEVELOPERS

@@ -559,8 +559,10 @@ F:	package/pdmenu/
 
 
 N:	Bryan Brattlof <bb@ti.com>
 N:	Bryan Brattlof <bb@ti.com>
 F:	board/ti/
 F:	board/ti/
+F:	board/beagleboard/beagleplay/
 F:	boot/ti-k3-boot-firmware/
 F:	boot/ti-k3-boot-firmware/
 F:	boot/ti-k3-r5-loader/
 F:	boot/ti-k3-r5-loader/
+F:	configs/beagleplay_defconfig
 F:	configs/ti_am62x_sk_defconfig
 F:	configs/ti_am62x_sk_defconfig
 F:	configs/ti_am64x_sk_defconfig
 F:	configs/ti_am64x_sk_defconfig
 
 

+ 5 - 0
board/beagleboard/beagleplay/extlinux.conf

@@ -0,0 +1,5 @@
+label beagleplay-buildroot
+    kernel /Image
+    fdtdir /
+    devicetree /k3-am625-beagleplay.dtb
+    append console=ttyS2,115200n8 root=/dev/mmcblk1p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x02800000

+ 39 - 0
board/beagleboard/beagleplay/genimage.cfg

@@ -0,0 +1,39 @@
+image boot.vfat {
+        vfat {
+            files = {
+                    "Image",
+                    "k3-am625-beagleplay.dtb",
+                    "tiboot3.bin",
+            }
+
+            file tispl.bin {
+                    image = tispl.bin_unsigned
+            }
+
+            file u-boot.img {
+                    image = u-boot.img_unsigned
+            }
+
+            file extlinux/extlinux.conf {
+                    image = extlinux.conf
+            }
+        }
+
+        size = 64M
+}
+
+image sdcard.img {
+        hdimage {
+        }
+
+        partition u-boot {
+                partition-type = 0xC
+                bootable = "true"
+                image = "boot.vfat"
+        }
+
+        partition rootfs {
+                partition-type = 0x83
+                image = "rootfs.ext4"
+        }
+}

+ 2 - 0
board/beagleboard/beagleplay/patches/arm-trusted-firmware/arm-trusted-firmware.hash

@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  2e18b881ada9198173238cca80086c787b1fa3f698944bde1743142823fc511c  arm-trusted-firmware-v2.10.tar.gz

+ 1 - 0
board/beagleboard/beagleplay/patches/linux-headers/linux-headers.hash

@@ -0,0 +1 @@
+../linux/linux.hash

+ 2 - 0
board/beagleboard/beagleplay/patches/linux/linux.hash

@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  24fa01fb989c7a3e28453f117799168713766e119c5381dac30115f18f268149  linux-6.9.tar.xz

+ 2 - 0
board/beagleboard/beagleplay/patches/ti-k3-r5-loader/ti-k3-r5-loader.hash

@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a  u-boot-2024.04.tar.bz2

+ 2 - 0
board/beagleboard/beagleplay/patches/uboot/uboot.hash

@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a  u-boot-2024.04.tar.bz2

+ 5 - 0
board/beagleboard/beagleplay/post-build.sh

@@ -0,0 +1,5 @@
+#!/bin/sh -x
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "$BOARD_DIR"/extlinux.conf "$BINARIES_DIR"/extlinux.conf

+ 39 - 0
board/beagleboard/beagleplay/readme.txt

@@ -0,0 +1,39 @@
+BeagleBoard's BeaglePlay
+
+Description
+===========
+
+This configuration will build a complete image for the BeaglePlay
+board: https://www.beagleboard.org/boards/beagleplay
+
+How to Build
+============
+
+Select the default configuration for the target:
+
+    $ make beagleplay_defconfig
+
+Optional: modify the configuration:
+
+    $ make menuconfig
+
+NOTE: The AM625x processor has multiple security variants. You must
+ensure the matching tiboot3.bin is uses or the board will not boot.
+The BeaglePlay uses the General Purpose (GP) variant, ensure you use
+the tiboot3-am62x-gp-evm.bin
+
+Build:
+
+    $ make
+
+To copy the resultimg output image file to an SD card use dd:
+
+    $ dd if=output/images/sdcard.img of=/dev/sdX bs=1M
+
+How to Run
+==========
+
+This configuration has both the boot/ and root/ partitions which is
+capable of booting from the bootloaders embedded in the eMMC as well
+as when using holding the USR button to boot from the SD card.
+

+ 55 - 0
configs/beagleplay_defconfig

@@ -0,0 +1,55 @@
+BR2_aarch64=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_9=y
+BR2_GLOBAL_PATCH_DIR="board/beagleboard/beagleplay/patches"
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/beagleboard/beagleplay/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT_ARGS="-c board/beagleboard/beagleplay/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.9"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/k3-am625-beagleplay"
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX=y
+BR2_PACKAGE_WILC1000_FIRMWARE=y
+BR2_PACKAGE_WILC3000_FIRMWARE=y
+BR2_PACKAGE_WILINK_BT_FIRMWARE=y
+BR2_TARGET_ROOTFS_CPIO=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.10"
+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-am62x"
+BR2_TARGET_TI_K3_R5_LOADER=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION=y
+BR2_TARGET_TI_K3_R5_LOADER_CUSTOM_VERSION_VALUE="2024.04"
+BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="am62x_beagleplay_r5"
+BR2_TARGET_TI_K3_R5_LOADER_TIBOOT3_BIN="tiboot3-am62x-gp-evm.bin"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_beagleplay_a53"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_USE_BINMAN=y
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.img_unsigned"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="tispl.bin_unsigned"
+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