From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Xuanhao Shi <x-shi@ti.com>
Cc: Suniel Mahesh <sunil@amarulasolutions.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 2/4] package/k3-image-gen: new package
Date: Tue, 26 Jul 2022 20:55:29 +0200 [thread overview]
Message-ID: <20220726205529.0e85e2de@windsurf> (raw)
In-Reply-To: <20220726165041.17584-3-x-shi@ti.com>
Hello,
Thanks for your contribution. However, as you will see below from my
review, this will require significant rework, the approach you're
taking is really not good.
On Tue, 26 Jul 2022 11:50:39 -0500
Xuanhao Shi <x-shi@ti.com> wrote:
> k3-image-gen is a package that helps support TI's k3 SoCs
> by building a separate boot binary, tiboot3.bin, on the R core.
>
> https://git.ti.com/cgit/k3-image-gen/k3-image-gen/about/
> Signed-off-by: Xuanhao Shi <x-shi@ti.com>
> ---
> package/Config.in | 1 +
> package/k3-image-gen/Config.in | 37 ++++++++++++++++++++++
> package/k3-image-gen/k3-image-gen.hash | 2 ++
> package/k3-image-gen/k3-image-gen.mk | 43 ++++++++++++++++++++++++++
> 4 files changed, 83 insertions(+)
A new package needs an entry in the DEVELOPERS file.
Also, I think this package should probably go in boot/ instead of
package/.
> diff --git a/package/k3-image-gen/Config.in b/package/k3-image-gen/Config.in
> new file mode 100644
> index 0000000000..3522382677
> --- /dev/null
> +++ b/package/k3-image-gen/Config.in
> @@ -0,0 +1,37 @@
> +config BR2_PACKAGE_K3_IMAGE_GEN
> + bool "k3-image-gen"
> + help
> + Using TI's k3-image-gen to build a separate bare metal
> + boot binary from a separate spl. Currently supports
> + version 08.04.00.004 as default.
> +
> + https://git.ti.com/cgit/k3-image-gen/k3-image-gen/
> +
> +menu "U-Boot SPL Build Options"
> + depends on BR2_PACKAGE_K3_IMAGE_GEN
> +
> +config BR2_PACKAGE_K3_IMAGE_GEN_UBOOT_SPL_DEFCONFIG
> + string "U-Boot SPL defconfig for image gen"
> + help
> + This is the defconfig without the suffix for the separate SPL.
> + For example, "am64x_evm_r5" for AM64X boards.
Do you need two U-Boot builds, one for the main U-Boot running on the
Cortex-A cores and one U-Boot running on the Cortex-R5 core ?
> diff --git a/package/k3-image-gen/k3-image-gen.hash b/package/k3-image-gen/k3-image-gen.hash
> new file mode 100644
> index 0000000000..393c7726cd
> --- /dev/null
> +++ b/package/k3-image-gen/k3-image-gen.hash
> @@ -0,0 +1,2 @@
> +# Locally calculated
> +sha256 8446d4f169b894304593f0c325028f25e401d0b793d6fd3aa9efa3da937222d2 k3-image-gen-08.04.00.004.tar.gz
> diff --git a/package/k3-image-gen/k3-image-gen.mk b/package/k3-image-gen/k3-image-gen.mk
> new file mode 100644
> index 0000000000..5449a2d0a5
> --- /dev/null
> +++ b/package/k3-image-gen/k3-image-gen.mk
> @@ -0,0 +1,43 @@
> +################################################################################
> +#
> +#k3-image-gen
> +#
> +################################################################################
> +
> +K3_IMAGE_GEN_VERSION = 08.04.00.004
> +K3_IMAGE_GEN_SITE = https://git.ti.com/cgit/k3-image-gen/k3-image-gen/snapshot
> +K3_IMAGE_GEN_SOURCE = k3-image-gen-$(K3_IMAGE_GEN_VERSION).tar.gz
> +K3_IMAGE_GEN_LICENSE = GPL-2.0+
Do you have a license file ?
> +K3_IMAGE_GEN_MAKE = $(BR2_MAKE)
> +
> +K3_IMAGE_GEN_UBOOT_SPL_ARCH = arm
> +K3_IMAGE_GEN_UBOOT_SPL_CROSS = \
> +$(HOST_ARM_GNU_TOOLCHAIN_INSTALL_DIR)/bin/arm-none-eabi-
> +K3_IMAGE_GEN_UBOOT_SPL_DEFCONFIG = \
> +$(call qstrip, $(BR2_PACKAGE_K3_IMAGE_GEN_UBOOT_SPL_DEFCONFIG))_defconfig
> +
> +K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_PACKAGE_K3_IMAGE_GEN_SOC))
> +K3_IMAGE_GEN_CONFIG = $(call qstrip,$(BR2_PACKAGE_K3_IMAGE_GEN_CONFIG))
> +
> +K3_IMAGE_GEN_DEPENDENCIES += host-arm-gnu-toolchain uboot
> +
> +K3_IMAGE_GEN_MAKE_OPTS += \
> + SOC=$(K3_IMAGE_GEN_SOC) \
> + CONFIG=$(K3_IMAGE_GEN_CONFIG) \
> + CROSS_COMPILE=$(K3_IMAGE_GEN_UBOOT_SPL_CROSS) \
> + SBL=$(BINARIES_DIR)/u-boot-spl.bin \
> + O=$(BINARIES_DIR) \
> + BIN_DIR=$(BINARIES_DIR)
> +
> +define K3_IMAGE_GEN_BUILD_CMDS
> + $(UBOOT_MAKE) -C $(BUILD_DIR)/uboot* ARCH=$(K3_IMAGE_GEN_UBOOT_SPL_ARCH) \
> + CROSS_COMPILE=$(K3_IMAGE_GEN_UBOOT_SPL_CROSS) $(K3_IMAGE_GEN_UBOOT_SPL_DEFCONFIG)
> + $(UBOOT_MAKE) -C $(BUILD_DIR)/uboot* ARCH=$(K3_IMAGE_GEN_UBOOT_SPL_ARCH) \
> + CROSS_COMPILE=$(K3_IMAGE_GEN_UBOOT_SPL_CROSS)
This clearly is not acceptable. You can from k3-image-gen mess up with
the build directory of U-Boot. $(BUILD_DIR)/uboot* can point to
something else than U-Boot, and even in principle doing the build of
one package in another is wrong.
Could you explain what you are trying to do? Is it because you need to
build two different U-Boot configurations?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-07-26 18:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 16:50 [Buildroot] [PATCH 0/4] add support for TI's AM6X SoCs Xuanhao Shi via buildroot
2022-07-26 16:50 ` [Buildroot] [PATCH 1/4] package/arm-gnu-toolchain: add version selection Xuanhao Shi via buildroot
2022-07-26 17:37 ` Thomas Petazzoni via buildroot
2022-07-26 19:32 ` Xuanhao Shi via buildroot
2022-07-26 20:07 ` Thomas Petazzoni via buildroot
2022-07-26 21:29 ` Xuanhao Shi via buildroot
2022-07-26 16:50 ` [Buildroot] [PATCH 2/4] package/k3-image-gen: new package Xuanhao Shi via buildroot
2022-07-26 18:55 ` Thomas Petazzoni via buildroot [this message]
2022-07-26 20:56 ` Xuanhao Shi via buildroot
2022-07-26 21:07 ` Thomas Petazzoni via buildroot
2022-07-26 21:31 ` Xuanhao Shi via buildroot
2022-07-27 8:22 ` Arnout Vandecappelle
2022-07-26 16:50 ` [Buildroot] [PATCH 3/4] board/am6x: add new board support Xuanhao Shi via buildroot
2022-07-26 18:58 ` Thomas Petazzoni via buildroot
2022-07-26 21:08 ` Xuanhao Shi via buildroot
2022-07-27 8:32 ` Arnout Vandecappelle
2022-07-26 16:50 ` [Buildroot] [PATCH 4/4] configs/am64x_sk_defconfig: add new defconfig Xuanhao Shi via buildroot
2022-07-26 19:00 ` Thomas Petazzoni via buildroot
2022-07-26 21:11 ` Xuanhao Shi via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220726205529.0e85e2de@windsurf \
--to=buildroot@buildroot.org \
--cc=sunil@amarulasolutions.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=x-shi@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox