($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@kudzu.us>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Ross Burton <Ross.Burton@arm.com>, Jon Mason <Jon.Mason@arm.com>,
	"meta-arm@lists.yoctoproject.org"
	<meta-arm@lists.yoctoproject.org>
Subject: Re: [PATCH v2] arm/trusted-firmware-rmm: Add bitbake, include and patch file for RMM
Date: Thu, 4 Apr 2024 15:46:27 -0400	[thread overview]
Message-ID: <Zg8Dkz93PfAsYC+T@kudzu.us> (raw)
In-Reply-To: <CANLsYkzX50KzxVytv8dTBbFg2=2gU=XvvRem6NcG1RX7MZY71w@mail.gmail.com>

On Wed, Apr 03, 2024 at 10:40:42AM -0600, Mathieu Poirier wrote:
> On Tue, 2 Apr 2024 at 12:05, Jon Mason <jdmason@kudzu.us> wrote:
> >
> > On Mon, Apr 01, 2024 at 02:27:42PM -0600, Mathieu Poirier wrote:
> > > Hi Ross,
> > >
> > > On Wed, 27 Mar 2024 at 07:05, Ross Burton <Ross.Burton@arm.com> wrote:
> > > >
> > > > Hi Mattieu,
> > > >
> > > > On 26 Mar 2024, at 20:20, Mathieu Poirier <mathieu.poirier@linaro.org> wrote:
> > > > > +SRC_URI_RMM     ?= "gitsm://git.trustedfirmware.org/TF-RMM/tf-rmm.git;protocol=https"
> > > > > +SRCREV_rmm     ?= "0a02656945d69757b0779192cebb9b41dd9037d1"
> > > > > +SRCBRANCH_rmm     ?= "main"
> > > > > +
> > > > > +SRC_URI = "${SRC_URI_RMM};name=rmm;branch=${SRCBRANCH_rmm} \
> > > > > +   file://0001-build-lib-Add-extra-repositories-for-system-includes.patch \
> > > > > + "
> > > >
> > > > Is there a good reason for all of this indirection?  If you want to support building from a local source tree/fork, there’s a class that does that generally (externalsrc).
> > > >
> > >
> > > I have addressed all your comments except the one above related to the
> > > externalsrc classe.  What I currently have in the recipe follows what
> > > is found in trusted-firmware-a and trusted-firmware-m.  Moreover, the
> > > documentation in the externalsrc class mentions it is to "build a
> > > piece of software rather than the usual fetch/unpack/patch process".
> > > But for RMM we need to fetch and patch...
> > >
> > > I am puzzled as to how to proceed - can you provide more details on
> > > what you expect?
> >
> > IIUC, he is saying the above should be:
> >
> > SRC_URI = "gitsm://git.trustedfirmware.org/TF-RMM/tf-rmm.git;protocol=https;branch=main \
> >            file://0001-build-lib-Add-extra-repositories-for-system-includes.patch \
> >           "
> > SRCREV = "0a02656945d69757b0779192cebb9b41dd9037d1"
> >
> >
> > All the "_rmm" indirection is only needed if you are going to have
> > multiple sources.  Since this only has one, it just adds unnecessary
> > complexity.  Similarily, the "?=" is only needed if there is going to
> > be an override of the values in those fields.  Since this is all in
> > one file and nothing is referencing this file, this shouldn't be
> > neessary.
> 
> Ok, but in my case I have a .bbappend file that does the following:
> 
> SRC_URI_RMM         =
> "gitsm://git.codelinaro.org/linaro/dcap/rmm.git;protocol=https"
> SRCREV_rmm          = "3212a781573db80df815db4b0e493c87f734840c"
> SRCBRANCH_rmm       = "rmm-v1.0-eac5"
> 
> Should I keep my current solution as I submitted it, keep the current
> solution but get rid of the {_rmm | RMM] or use what you have above
> and redefine SRC_URI and SRCREV in the .bbappend file?

If you are asking me if you should change your bbappend to match the
patch you are going to submit, I would say to change your bbappend.
As I expect the next version should be accepted.

The example above (of your bbappend) would be a simple overwrite of
the SRC_URI, because you are not reusing the git tree or branch.

Thanks,
Jon

> 
> >
> > TF-A and TF-M are based on ".inc" files that can (and do) have
> > multiple "versioned" files.  For example,
> > ./meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.9.0.bb
> > ./meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.8.6.bb
> > ./meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.2.bb
> >
> > Each one of those is just the minor modifications to get that version
> > working, with a core ".inc" file doing all the work.  Since rmm is a
> > more simple recipe, none of that is needed here.
> >
> > Thanks,
> > Jon
> >
> >
> > >
> > > Thanks,
> > > Mathieu
> > >
> > > > > +RMM_CONFIG ?= "qemu_virt_defcfg"
> > > >
> > > > The “default” isn’t qemu, as that isn’t useful for anything but qemu.  A better solution would be:
> > > >
> > > > RMM_CONFIG ?= “"
> > > > RMM_CONFIG:qemuarm64 = “qemu_virt_defcfg”
> > > >
> > > > Also this recipe needs some COMPATIBLE_MACHINE statements, so that a world build won’t try and build it for eg qemux86-64.
> > > >
> > > > > +B = "${WORKDIR}/build"
> > > >
> > > > cmake class sets B already, remove.
> > > >
> > > > > +# Supplement include path
> > > > > +EXTRA_OECMAKE += "-DCMAKE_INCLUDE_PATH=${WORKDIR}/recipe-sysroot/usr/include"
> > > >
> > > > -DCMAKE_INCLUDE_PATH=${STAGING_INCDIR} would be neater, but this really does feel like a bug in the CMakeLists.txt.  Why doesn’t it respect the sysroot that the compiler is told to use?  We carefully configure a toolchain that specifies exactly what compiler, sysroot, flags, etc to use.
> > > >
> > > > > +export CROSS_COMPILE="${TARGET_PREFIX}"
> > > > > +export CMAKE_BUILD_PARALLEL_LEVEL = "${@oe.utils.parallel_make(d, False)}"
> > > >
> > > > CMake class should be doing this, remove.
> > > >
> > > > Ross
> > >
> 


      reply	other threads:[~2024-04-04 19:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 20:20 [PATCH v2] arm/trusted-firmware-rmm: Add bitbake, include and patch file for RMM Mathieu Poirier
2024-03-27 12:59 ` Ross Burton
2024-03-27 13:04 ` Ross Burton
2024-03-27 13:42   ` [meta-arm] " Mikko Rapeli
2024-03-27 15:06     ` Ross Burton
2024-03-27 15:13       ` Mathieu Poirier
2024-03-28 14:02         ` Ross Burton
2024-04-01 20:27   ` Mathieu Poirier
2024-04-02 18:05     ` Jon Mason
2024-04-03 16:40       ` Mathieu Poirier
2024-04-04 19:46         ` Jon Mason [this message]

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=Zg8Dkz93PfAsYC+T@kudzu.us \
    --to=jdmason@kudzu.us \
    --cc=Jon.Mason@arm.com \
    --cc=Ross.Burton@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=meta-arm@lists.yoctoproject.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).