Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support
Date: Mon, 25 Nov 2019 22:23:45 +0100	[thread overview]
Message-ID: <20191125222345.3b7897ae@windsurf> (raw)
In-Reply-To: <20191121102324.35225-5-jerry.huang@nxp.com>

Hello,

I'm sorry, but I don't really grasp what this patch is trying to do.

On Thu, 21 Nov 2019 18:23:18 +0800
Changming Huang <jerry.huang@nxp.com> wrote:

> From: Jerry Huang <jerry.huang@nxp.com>
> 
> For NXP QorIQ (PowerPC and Layerscape) platform,
> we need to specify the RCW file and build it to binary.
> 
> Introduce BR2_PACKAGE_HOST_RCW_ATF to use ATF for RCW.

What does this mean ?

> Introduce BR2_PACKAGE_HOST_RCW_BIN to specify the RCW binary file.

Hm, ok, but then it seems to be used to calculate from which directory
"make" is going to be invoked.

> Introduce BR2_PACKAGE_HOST_RCW_BOOT_MODE to define the boot mode.
> Because the RCW binary can be stored in different media, for example:
> SD card - RCW locate in SD card, boot the board from SD card
> eMMC    - RCW locate in eMMC chip, boot the board from eMMC chip
> flexSPI - RCW locate in flexSPI, boot the board from flexSPI Nor/Nand flash
> QSPI    - RCW locate in QSPI flash, boot the board from QSPI flash
> 
> Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
> ---
> changes since v1:
> 1. add option BR2_PACKAGE_HOST_RCW_ATF for ATF
> ---
>  .../freescale-qoriq/fsl-qoriq-rcw/Config.in.host  | 15 +++++++++++++++
>  .../fsl-qoriq-rcw/fsl-qoriq-rcw.mk                | 11 +++++++++++
>  2 files changed, 26 insertions(+)
> 
> diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> index a9253958d9..f55f2a6f3a 100644
> --- a/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> +++ b/package/freescale-qoriq/fsl-qoriq-rcw/Config.in.host
> @@ -25,4 +25,19 @@ config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH
>  	  included for use in the SDK or with post scripts but no
>  	  RCW binary will not be generated.
>  
> +config BR2_PACKAGE_HOST_RCW_ATF
> +	bool "atf for rcw"
> +	help
> +	  When ATF is used for RCW, enable this option.

This option is not used in the code below.

> +
> +config BR2_PACKAGE_HOST_RCW_BIN

Should be named with a BR2_PACKAGE_HOST_FSL_QORIQ_RCW_ prefix.

> +	string "Custom RCW"
> +	help
> +	  This option is used to specify the RCW binary file for board.

More details are needed. What happens when this option is empty? Which
values are typically needed? Your code assumes there's one slash in the
value, this should be explained.

> +config BR2_PACKAGE_HOST_RCW_BOOT_MODE

This option is not used in the .mk file

> +	string "Boot mode"
> +	help
> +	  Specify the boot mode, for example, sd, emmc, flexspi_nor.
> +
>  endif
> diff --git a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> index a2c3f4f8a6..15c4024eb8 100644
> --- a/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> +++ b/package/freescale-qoriq/fsl-qoriq-rcw/fsl-qoriq-rcw.mk
> @@ -37,6 +37,17 @@ endef
>  define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
>  	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
>  endef
> +else

Why is this part mutually exclusive with the
BR2_PACKAGE_HOST_RCW_CUSTOM_PATH option ? I'd like to understand what
they each try to do. If they are mutually exclusive, they should also
be mutually exclusive at the Config.in level. Could you please explain
the different use cases for rcw so that we can figure out the right way
to handle this ?

> +RCW_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_RCW_BIN))
> +RCW_PLATFORM = $(firstword $(subst /, ,$(RCW_BIN)))

Variables must be prefixed by the package name, not just RCW_.

> +
> +define HOST_FSL_QORIQ_RCW_BUILD_CMDS
> +	cd $(@D)/$(RCW_PLATFORM) && $(MAKE)

Should be:

	$(MAKE) -C ...

> +endef
> +
> +define HOST_FSL_QORIQ_RCW_INSTALL_DELIVERY_FILE
> +	$(INSTALL) -D -m 0644 $(@D)/$(RCW_BIN) $(BINARIES_DIR)/

Complete destination path is needed, including the destination file
name.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-11-25 21:23 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 10:23 [Buildroot] [PATCH v2 0/9] new board ls1028ardb introduced Changming Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 01/10] package/freescale-qoriq: new package directory Changming Huang
2019-11-25 21:13   ` Thomas Petazzoni
2019-11-26  2:49     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 02/10] package/freescale-qoriq/fsl-qoriq-rcw: move rcw into freescale-qoriq and rename it Changming Huang
2019-11-21 10:34   ` Michael Walle
2019-11-21 10:42     ` [Buildroot] [EXT] " Jerry Huang
2019-11-25 21:15   ` [Buildroot] " Thomas Petazzoni
2019-11-26  3:25     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 03/10] package/freescale-qoriq/fsl-qoriq-rcw: upgrade the rcw version to LSDK-19.09 Changming Huang
2019-11-25 21:17   ` Thomas Petazzoni
2019-11-26  3:51     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support Changming Huang
2019-11-25 21:23   ` Thomas Petazzoni [this message]
2019-11-26  4:33     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 05/10] boot/arm-trusted-firmware: Add option BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE Changming Huang
2019-11-22  9:11   ` Sergey Matyukevich
2019-11-22  9:24     ` [Buildroot] [EXT] " Jerry Huang
2019-11-25 21:59   ` [Buildroot] " Thomas Petazzoni
2019-11-21 10:23 ` [Buildroot] [PATCH v2 06/10] boot/arm-trusted-firmware: Add RCW support Changming Huang
2019-11-22  9:19   ` Sergey Matyukevich
2019-11-22  9:31     ` [Buildroot] [EXT] " Jerry Huang
2019-11-25 22:09   ` [Buildroot] " Thomas Petazzoni
2019-11-26  7:06     ` [Buildroot] [EXT] " Jerry Huang
2019-11-26  7:34       ` Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 07/10] package/freescale-qoriq/fsl-qoriq-cadence-dp-fw: new package Changming Huang
2019-11-21 10:42   ` Michael Walle
2019-11-21 11:04     ` [Buildroot] [EXT] " Jerry Huang
2019-11-22 10:41     ` Jerry Huang
2019-11-21 10:51   ` [Buildroot] " Michael Walle
2019-11-21 11:09     ` [Buildroot] [EXT] " Jerry Huang
2019-11-22 10:40     ` Jerry Huang
2019-11-22 11:00       ` Michael Walle
2019-11-25  2:40         ` Jerry Huang
2019-11-22 11:05       ` Thomas Petazzoni
2019-11-25  6:25         ` Jerry Huang
2019-11-25 22:12   ` [Buildroot] " Thomas Petazzoni
2019-11-26  8:09     ` [Buildroot] [EXT] " Jerry Huang
2019-11-26  9:21       ` Michael Walle
2019-11-26 10:13         ` Jerry Huang
2019-11-26  9:29       ` Michael Walle
2019-11-26 10:12         ` Thomas Petazzoni
2019-11-26 10:31           ` Michael Walle
2019-11-26 12:10             ` Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 08/10] package/freescale-qoriq/fsl-qoriq-rcw:Enable IIC5_PMUX and CLK_OUT_PMUX for GPIO Changming Huang
2019-11-25 22:13   ` Thomas Petazzoni
2019-11-26  8:15     ` [Buildroot] [EXT] " Jerry Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 09/10] board/freescale/common/ls: Add standard post image script for Layerscape processors Changming Huang
2019-11-21 10:23 ` [Buildroot] [PATCH v2 10/10] configs/freescale_ls1028ardb*: new board Changming Huang
2019-11-25 22:17   ` Thomas Petazzoni
2019-11-26 12:02     ` [Buildroot] [EXT] " Jerry Huang

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=20191125222345.3b7897ae@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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