AW: [PATCH 1/3] Remove duplicate GRETH driver

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Wed Oct 28 06:44:33 UTC 2020



> -----Original Message-----
> From: devel <devel-bounces at rtems.org> On Behalf Of Jiri Gaisler
> Sent: Tuesday, October 27, 2020 3:18 PM
> To: devel at rtems.org
> Subject: Re: AW: [PATCH 1/3] Remove duplicate GRETH driver
> 
> 
> On 10/26/20 8:52 AM, Jiri Gaisler wrote:
> > On 10/26/20 3:37 AM, Gabriel.Moyano at dlr.de wrote:
> >> Hi Jiri,
> >>
> >> My understanding was that one driver version was meant to be used with
> drvmgr (greth.c) and the other without it (greth2.c). May I ask why do you've
> chosen to remove greth.c and not greth2.c?
> 
> I have fixed-up the greth.c file to avoid inline SPARC assembly code, but the
> file is not used even when RTEMS is compiled with --enable-drvmgr. The
> problem is that both greth2.c and greth.c are compiled, and as they define
> the same symbols, greth2.c is pulled in first by chance. I need to disable the
> building of the network files in bsps/shared/shared-sources.am when --
> enable-drvmgr is defined. Does anyone know how to do this? My skills in m4
> etc. are limited ... :-(
> 

If 99% of the code are the same, would it be an option to have just one driver implementation and in the drvmgr just use a wrapper for the driver?

Best regards,

    Jan

> 
> >
> > The problem I had was that greth.c contains SPARC assembly code and
> > cannot be built on any other architecture. I will change my patch to
> > disable greth.c on non-SPARC targets or try to replace the asssembly
> > code with macros as in greth2.c. Thanks for the feedback!
> >
> > An other issue is that the two files are 99% identical, but only
> > greth,c seems to be maintained. PHY handling and multi-cast support
> > are areas where the files have diverged. But this is an other discussion ...
> >
> >
> >> Thanks,
> >> Gabriel
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: devel <devel-bounces at rtems.org> Im Auftrag von Jiri Gaisler
> >> Gesendet: Sonntag, 25. Oktober 2020 23:26
> >> An: devel at rtems.org
> >> Betreff: [PATCH 1/3] Remove duplicate GRETH driver
> >>
> >> 	* bsps/shared/net/greth2.c is being used instead
> >> ---
> >>  bsps/shared/grlib-sources.am                  |    4 -
> >>  bsps/shared/grlib/net/README                  |    7 -
> >>  bsps/shared/grlib/net/greth.c                 | 1655 -----------------
> >>  bsps/shared/grlib/net/network_interface_add.c |   62 -
> >>  4 files changed, 1728 deletions(-)
> >>  delete mode 100644 bsps/shared/grlib/net/README  delete mode
> 100644
> >> bsps/shared/grlib/net/greth.c  delete mode 100644
> >> bsps/shared/grlib/net/network_interface_add.c
> >>
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> 
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list