All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: Ryan Eatmon <reatmon@ti.com>
Cc: Andrew Davis <afd@ti.com>, Denys Dmytriyenko <denys@konsulko.com>,
	meta-ti@lists.yoctoproject.org
Subject: Re: [meta-ti][master/kirkstone][PATCH 8/8] recipes-bsp: Do not use MACHINE_ARCH when package is not machine specific
Date: Fri, 3 Nov 2023 02:15:58 -0400	[thread overview]
Message-ID: <20231103061558.GL2408@denix.org> (raw)
In-Reply-To: <145580b2-dda0-4d36-b046-03f458929922@ti.com>

On Thu, Nov 02, 2023 at 09:57:11AM -0500, Ryan Eatmon wrote:
> 
> 
> On 10/26/2023 9:00 AM, Andrew Davis wrote:
> >On 10/25/23 10:27 PM, Denys Dmytriyenko wrote:
> >>On Wed, Oct 25, 2023 at 11:56:30AM -0500, Andrew Davis via
> >>lists.yoctoproject.org wrote:
> >>>Signed-off-by: Andrew Davis <afd@ti.com>
> >>>---
> >>>  meta-ti-bsp/recipes-bsp/cadence-mhdp-fw/cadence-mhdp-fw_git.bb | 2 --
> >>>  meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb         | 2 --
> >>>  meta-ti-bsp/recipes-bsp/cpsw9g-eth-fw/cpsw9g-eth-fw_git.bb     | 1 -
> >>>  meta-ti-bsp/recipes-bsp/goodix-fw/goodix-fw_git.bb             | 2 --
> >>>  meta-ti-bsp/recipes-bsp/prueth-fw/prueth-fw-am65x-sr2_git.bb   | 2 --
> >>>  meta-ti-bsp/recipes-bsp/prueth-fw/prueth-fw-am65x_git.bb       | 2 --
> >>>  meta-ti-bsp/recipes-bsp/pruhsr-fw/pruhsr-fw-am65x-sr2_git.bb   | 2 --
> >>>  meta-ti-bsp/recipes-bsp/prusw-fw/prusw-fw-am65x-sr2_git.bb     | 2 --
> >>>  meta-ti-bsp/recipes-bsp/ti-img-encode-decode/vxd-dec-fw_git.bb | 2 --
> >>>  meta-ti-bsp/recipes-bsp/vis-fw/vis_01.50.07.15.bb              | 1 -
> >>>  meta-ti-bsp/recipes-bsp/vpdma-fw/vpdma-fw_03-2012.bb           | 1 -
> >>>  11 files changed, 19 deletions(-)
> >>
> >>Overall I agree and fully support the first 7 patches in this series.
> >>
> >>But for this last one I wanted to open a discussion.
> >>
> >
> >I try to sort my series in least-to-most likely to be controversial, I was
> >just wondering how far we would get down the list, glad we got to 8 :)
> >
> >>On one hand I understand the desire to make components as
> >>generic as possible
> >>and reduce the number of machine-specific components to a bare minimum.
> >>
> >>But on another hand, marking the resulting package as
> >>machine-specific when it
> >>has a short list of compatible machines is a standard practice.
> >>The reason is
> >>that the list of compatible machines controls only compile time
> >>filtering, but
> >>doesn't have any effect on run time. And marking packages as
> >>machine specific
> >>helps with that. That closes the loophole of installing
> >>incompatible packages.
> >>
> >>For example, first recipe below specifies that Cadence MHDP firmware is
> >>compatible with 3 J7 platforms only (or their SoC families, to be exact).
> >>But w/o marking resulting binary package as machine-specific (therefore
> >>producing separate packages for those platforms), there will be a single
> >>generic Aarch64 package made. And there's no protection from installing
> >>this generic package on non-compatible platforms, like J7200 or AM65xx,
> >>either manullay or by pulling it into a rootfs for those incompatible
> >>platforms.
> >>
> >>And you normally want to prevent this for regular components. But I guess
> >>this doesn't fully apply to FW images that are loaded by corresponding
> >>drivers anyway. Moreover, there's no compilation involved, just packaging
> >>the binary blob.
> >>
> >>In that case, should we also remove COMPATIBLE_MACHINE from
> >>these firmware
> >>recipes?
> >>
> >
> >That is exactly where I was going to go next. These firmware packages are
> >not technically incompatible with the other machines.
> >
> >We just use COMPATIBLE_MACHINE checks here to keep us from
> >accidentily bundling
> >them with images where they wouldn't add any value (which you did
> >with prusw-fw
> >which is what stated me thinking on all this). But since they don't break
> >anything either, forcing them to be machine specific seemed like
> >overkill also.
> >
> >Only place where we still need this is firmware recipes that only
> >ship some of
> >the firmware based on machine (see prueth-fw for instance). I'd like to get
> >that cleaned up next. If we only want some of the firmware then we
> >should split
> >it into different packages (prueth-fw-am57xx, etc.) and only
> >install the one
> >we want for that platform.
> 
> Denys, does Andrew's response address your concerns?

Well, I do believe we are generally in agreement here. But I'm not sure if 
that means we should merge patch #8 as is and address COMPATIBLE_MACHINE 
changes later, or rework the patch to address that with MACHINE_ARCH together?

-- 
Denys


  reply	other threads:[~2023-11-03  6:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 16:56 [meta-ti][master/kirkstone][PATCH 1/8] conf: machine: Move IMAGE_BOOT_FILES to the SoC inc for J721s2 and J784s4 Andrew Davis
2023-10-25 16:56 ` [meta-ti][master/kirkstone][PATCH 2/8] ti-linux-fw: Make CLEANBROKEN and FILES part of common include Andrew Davis
2023-10-25 16:56 ` [meta-ti][master/kirkstone][PATCH 3/8] ti-linux-fw: Do not set source directory when including ti-linux-fw.inc Andrew Davis
2023-10-25 16:56 ` [meta-ti][master/kirkstone][PATCH 4/8] ti-sci-fw: Do not unexport CFLAGS, LDFLAGS, AS, or LD Andrew Davis
2023-10-25 16:56 ` [meta-ti][master/kirkstone][PATCH 5/8] vpdma-fw: This firmware blob does not depend on the kernel Andrew Davis
2023-10-25 16:56 ` [meta-ti][master/kirkstone][PATCH 6/8] ti-linux-fw: Add several more firmware helper lines to this common include Andrew Davis
2023-10-25 16:56 ` [meta-ti][master/kirkstone][PATCH 7/8] recipes-bsp: Do not inherit deploy in recipes that do not deploy anything Andrew Davis
2023-10-25 16:56 ` [meta-ti][master/kirkstone][PATCH 8/8] recipes-bsp: Do not use MACHINE_ARCH when package is not machine specific Andrew Davis
2023-10-26  3:27   ` Denys Dmytriyenko
2023-10-26 14:00     ` Andrew Davis
2023-11-02 14:57       ` Ryan Eatmon
2023-11-03  6:15         ` Denys Dmytriyenko [this message]
2023-11-03 16:20           ` Ryan Eatmon

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=20231103061558.GL2408@denix.org \
    --to=denis@denix.org \
    --cc=afd@ti.com \
    --cc=denys@konsulko.com \
    --cc=meta-ti@lists.yoctoproject.org \
    --cc=reatmon@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 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.