> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Saturday, September 21, 2019 1:05 AM
> To: Chang, Abner (HPS SW/FW Technologist) <abner.ch...@hpe.com>
> Cc: devel@edk2.groups.io
> Subject: Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v1 01/22]:
> RiscVPkg: RISC-V processor package.
> 
> On Thu, Sep 19, 2019 at 07:10:16AM +0000, Chang, Abner (HPS SW/FW
> Technologist) wrote:
> > > -----Original Message-----
> > > > > I personally think we need a longer-term encapsulation of libfdt
> > > > > that doesn't mess up the coding style. But until then, I would
> > > > > be much happier if you used the half measure we have in
> EmbeddedPkg:
> > > > > EmbeddedPkg/Library/FdtLib/ and EmbeddedPkg/Include/.
> > > >
> > > > We may not go this way due to everything is from OpenSBI and we
> > > > don't want to maintain the difference to open source OpenSBI. Just
> > > > take what OpenSBI provides.
> > >
> > > If libfdt was a very quickly changing project, I might agree with you.
> > > But it is not. It is a very simple piece of code that performs a
> > > small set of operations on a very well defined structured encapsulation
> format.
> > >
> > > So please use the one from EmbeddedPkg. On the very unlikely
> > > occurrence that you require functionality not provided by the
> > > version in there, we can update it.
> >
> > I am not sure how's compatibility between these two libraries. However
> > I can't agree to use EmbbedPkg one now, maybe later once this port is
> > got on edk2 repo. Currently we just simply create an INF file and in
> > which  pull everything OpenSBI provides, that is easy for us to
> > integrate OpenSbi. We don't want to increase complexities now. I am
> > not saying to not adopting EmbbedPkg one, just not for now.
> 
> If the libfdt is simply what comes along with opensbi, then I can live with 
> that
> for now, once opensbi becomes a submodule.
Yes. It comes with opensbi.

> 
> The conversion to use the current EmbeddedPkg FdtLib should however be
> completely trivial.
Yes. actually it is easy to convert it to use EmbeddedPkg. We just don't want 
to see edk2 opensbi port refers to the modules outside OpenSbi itself. 

>So I would still like to see the following
> *attempted* before we start considering this being included in edk2
> master:
I will say yes to any ideas which could make the better code structure, but 
just don't  make more efforts to maintainers while integrating OpenSbi to edk2 
when the new version is released.
> 
> - add FdtLib to RiscVOpensbiLib.inf [LibraryClasses]
> - delete all of the libfdt/* files from RiscVOpensbiLib.inf [Sources]
> - add EmbeddedPkg/EmbeddedPkg.dec to RiscVOpensbiLib.inf  [Packages]

Anyway, that's no problem to remove OpenSbi fdtlib from edk2 opensbi build  as 
edk2 opensbi is just an wrapper.
But we don't refer EmbeddedPkg/EmbeddedPkg.dec in RiscVOpensbiLib.inf  because 
RiscVOpensbiLib is part of  RiscVPkg which is the processor architecture 
package. EmbeddedPkg version fdtlib is referred in RISC-V platform 
(edk2-platform) but not from RiscVPkg, same as to use EmbeddedPkg 
/RealTimeClockDxe for RISC-V embedded platforms.
RiscVOpensbiLib is now without fdtlib instance. However the code is still there 
because it is part of openSbi. Gilbert had sent out the PATCH v2 for RISC-V 
platform code. You will see platform PATHC v3 from me which involve above 
changes.

Thanks
Abner

> 
> /
>     Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47747): https://edk2.groups.io/g/devel/message/47747
Mute This Topic: https://groups.io/mt/33137119/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to