diff mbox series

[RFC,v2,09/14] board/qcom/sa8775: add support for qcom sa8775-cdsp0

Message ID 20241219053053.2389046-10-brian.cain@oss.qualcomm.com
State Changes Requested
Headers show
Series add hexagon architecture | expand

Commit Message

Brian Cain Dec. 19, 2024, 5:30 a.m. UTC
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
---
 board/qcom/sa8775/post_build.sh     |  9 ++++++++
 configs/qcom_sa8775_cdsp0_defconfig | 35 +++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100755 board/qcom/sa8775/post_build.sh
 create mode 100644 configs/qcom_sa8775_cdsp0_defconfig

Comments

Thomas Petazzoni Feb. 5, 2025, 11:28 a.m. UTC | #1
Hello Brian,

On Wed, 18 Dec 2024 21:30:48 -0800
Brian Cain <brian.cain@oss.qualcomm.com> wrote:

> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>

Needs a non-empty commit log with some details about what this platform
is.

> diff --git a/board/qcom/sa8775/post_build.sh b/board/qcom/sa8775/post_build.sh
> new file mode 100755
> index 0000000000..af13225d58
> --- /dev/null
> +++ b/board/qcom/sa8775/post_build.sh
> @@ -0,0 +1,9 @@
> +#!/bin/bash
> +
> +TARGETDIR=$1

Not needed, just use ${TARGET_DIR} which is passed in the environment.

> +
> +cat <<EOF >> "${TARGETDIR}/etc/fstab"
> +devpts   /dev/pts              devpts  gid=5,mode=620  0 0
> +/dev/vda /mnt/persist ext2 defaults 0 0
> +debugfs  /sys/kernel/debug      debugfs  defaults  0 2
> +EOF

Why is this needed in the first place?

Also, the way you do it (always appending) means that if you run "make;
make; make" in Buildroot, you will have those 3 lines added 3 times,
which isn't good.

> diff --git a/configs/qcom_sa8775_cdsp0_defconfig b/configs/qcom_sa8775_cdsp0_defconfig
> new file mode 100644
> index 0000000000..f9363c930f
> --- /dev/null
> +++ b/configs/qcom_sa8775_cdsp0_defconfig
> @@ -0,0 +1,35 @@
> +BR2_hexagon=y
> +BR2_HEXAGON_v73=y
> +BR2_STATIC_LIBS=y

You can't use shared libraries?

> +BR2_TOOLCHAIN_EXTERNAL=y
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y

Use the toolchain-external-hexagon package.

> +BR2_TOOLCHAIN_EXTERNAL_CLANG=y
> +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
> +BR2_TOOLCHAIN_EXTERNAL_URL="https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/19.1.5/clang+llvm-19.1.5-cross-hexagon-unknown-linux-musl.tar.zst"
> +BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH="x86_64-linux-gnu/bin"
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="hexagon-unknown-linux-musl"
> +BR2_TOOLCHAIN_EXTERNAL_CLANG_19_0=y
> +BR2_TOOLCHAIN_EXTERNAL_HEADERS_6_7=y
> +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
> +BR2_TOOLCHAIN_EXTERNAL_CXX=y
> +
> +BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
> +BR2_ROOTFS_DEVICE_CREATION_STATIC=y

Use the default for /dev management.

> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/qcom/sa8775/post_build.sh"
> +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
> +BR2_PACKAGE_BZIP2=y
> +BR2_PACKAGE_ZLIB=y
> +BR2_PACKAGE_LOCKDEV=n
> +BR2_PACKAGE_LIBEVENT=n
> +BR2_PACKAGE_ATFTP=n
> +BR2_PACKAGE_DROPBEAR=y
> +BR2_PACKAGE_LSH=y
> +
> +BR2_PACKAGE_LUA=y
> +BR2_PACKAGE_BASH=y
> +BR2_PACKAGE_ZSH=y
> +
> +BR2_PACKAGE_HEXAGONMVM=y
> +BR2_PACKAGE_XINETD=n
> +BR2_PACKAGE_COREUTILS=y

Keep the default package selection.

> +BR2_TARGET_ROOTFS_TAR_GZIP=y

How is the rootfs then used?

All defconfigs must have a matching readme.txt file somewhere in board/
that explains how to practically use, and most notably how to make use
of the build results.

Also, make sure to update the DEVELOPERS file as part of this patch for
the newly added files.

Thanks!

Thomas
diff mbox series

Patch

diff --git a/board/qcom/sa8775/post_build.sh b/board/qcom/sa8775/post_build.sh
new file mode 100755
index 0000000000..af13225d58
--- /dev/null
+++ b/board/qcom/sa8775/post_build.sh
@@ -0,0 +1,9 @@ 
+#!/bin/bash
+
+TARGETDIR=$1
+
+cat <<EOF >> "${TARGETDIR}/etc/fstab"
+devpts   /dev/pts              devpts  gid=5,mode=620  0 0
+/dev/vda /mnt/persist ext2 defaults 0 0
+debugfs  /sys/kernel/debug      debugfs  defaults  0 2
+EOF
diff --git a/configs/qcom_sa8775_cdsp0_defconfig b/configs/qcom_sa8775_cdsp0_defconfig
new file mode 100644
index 0000000000..f9363c930f
--- /dev/null
+++ b/configs/qcom_sa8775_cdsp0_defconfig
@@ -0,0 +1,35 @@ 
+BR2_hexagon=y
+BR2_HEXAGON_v73=y
+BR2_STATIC_LIBS=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
+BR2_TOOLCHAIN_EXTERNAL_CLANG=y
+BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
+BR2_TOOLCHAIN_EXTERNAL_URL="https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/19.1.5/clang+llvm-19.1.5-cross-hexagon-unknown-linux-musl.tar.zst"
+BR2_TOOLCHAIN_EXTERNAL_REL_BIN_PATH="x86_64-linux-gnu/bin"
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="hexagon-unknown-linux-musl"
+BR2_TOOLCHAIN_EXTERNAL_CLANG_19_0=y
+BR2_TOOLCHAIN_EXTERNAL_HEADERS_6_7=y
+BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
+BR2_TOOLCHAIN_EXTERNAL_CXX=y
+
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
+BR2_ROOTFS_DEVICE_CREATION_STATIC=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/qcom/sa8775/post_build.sh"
+BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+BR2_PACKAGE_BZIP2=y
+BR2_PACKAGE_ZLIB=y
+BR2_PACKAGE_LOCKDEV=n
+BR2_PACKAGE_LIBEVENT=n
+BR2_PACKAGE_ATFTP=n
+BR2_PACKAGE_DROPBEAR=y
+BR2_PACKAGE_LSH=y
+
+BR2_PACKAGE_LUA=y
+BR2_PACKAGE_BASH=y
+BR2_PACKAGE_ZSH=y
+
+BR2_PACKAGE_HEXAGONMVM=y
+BR2_PACKAGE_XINETD=n
+BR2_PACKAGE_COREUTILS=y
+BR2_TARGET_ROOTFS_TAR_GZIP=y