All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Huang <jerry.huang@nxp.com>
To: buildroot@busybox.net
Subject: [Buildroot] [EXT] Re: [PATCH v2 04/10] package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support
Date: Tue, 26 Nov 2019 04:33:48 +0000	[thread overview]
Message-ID: <VI1PR04MB513630C33602E753E726FB45FE450@VI1PR04MB5136.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20191125222345.3b7897ae@windsurf>


Best Regards
Jerry Huang

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Tuesday, November 26, 2019 5:24 AM
> To: Jerry Huang <jerry.huang@nxp.com>
> Cc: buildroot at busybox.net; michael at walle.cc; matthew.weber at collins.com;
> geomatsi at gmail.com
> Subject: [EXT] Re: [Buildroot] [PATCH v2 04/10]
> package/freescale-qoriq/fsl-qoriq-rcw: add target rcw binary support
> 
> Caution: EXT Email
> 
> Hello,
> 
> I'm sorry, but I don't really grasp what this patch is trying to do.
Hi, Thomas,
This patch is to build the binary *.bin file which is used by QorIQ platforms booting with the QorIQ-RCW source codes.

> 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 ?
Which is used by ATF for RCW, will move it to patch 07/10

> 
> > 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.
This option is for RCW binary, including the path and file name, 
for example: ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin
the first word is the platform, last word is the binary file used.

> 
> > 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.
Will move it to patch 07/10.

> 
> > +
> > +config BR2_PACKAGE_HOST_RCW_BIN
> 
> Should be named with a BR2_PACKAGE_HOST_FSL_QORIQ_RCW_ prefix.
Sure,

> 
> > +     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
Which is used by ATF for RCW, will vove it to patch 07/10.

> 
> > +     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 ?
According to original scripts, R2_PACKAGE_HOST_RCW_CUSTOM_PATH is used for the RCW specified by customer.
Add some special command is needed for this option.
In order to use the source codes from NXP, some other commands are needed, so they are mutually exclusive.
Then, I will add the mutually exclusive in config.in file.

> 
> > +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_.
Sure,

> 
> > +
> > +define HOST_FSL_QORIQ_RCW_BUILD_CMDS
> > +     cd $(@D)/$(RCW_PLATFORM) && $(MAKE)
> 
> Should be:
> 
>         $(MAKE) -C ...
Will change it

> > +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.
Sure, will add the file name.
> 
> Thanks!
> 
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbootlin.c
> om&amp;data=02%7C01%7Cjerry.huang%40nxp.com%7Ca3c1ca285da948a32
> 78108d771edc2f5%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637
> 103138304575881&amp;sdata=o1hb4D4YqQ58G0RH0siotPJsl7kp3HS0u4T5jMA
> 7YR8%3D&amp;reserved=0

  reply	other threads:[~2019-11-26  4:33 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
2019-11-26  4:33     ` Jerry Huang [this message]
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=VI1PR04MB513630C33602E753E726FB45FE450@VI1PR04MB5136.eurprd04.prod.outlook.com \
    --to=jerry.huang@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.