On 27 January 2015 at 10:56, Leif Lindholm <leif.lindholm@linaro.org> wrote:
On Tue, Jan 27, 2015 at 10:36:23AM -0000, Olivier Martin wrote:
> Any reason to make the Network stack conditional?
> One reason to make the SMSC Lan91x Ethernet controller condition on some
> RTSM models is to use the virtio network driver instead.
> But I am quite keen to get network support by default.

I like configurability. If we want to see UEFI in more embedded/mobile
devices, we need more of it. Both in EDK2 and the ones held in
Linaro's tree - but especially the ones in EDK2. Because people who
create new ports will look at existing ones for guidance.

And since I hide my build flags in a config file[1] and don't need to
worry about remembering them, it doesn't cause overhead for me.
So "by default" becomes a philosophical statement. By default, I get
networking support when I build the models.

I guess that having an option to add/remove the driver and what the default is are two different issues.

I see no reason why the use can't say

+!if $(EDK2_ENABLE_SMSC_91X) != 0

Rather than

+!ifdef EDK2_ENABLE_SMSC_91X

Then it would be enabled by default if no option were passed, passing "-D EDK2_ENABLE_SMSC_91X=1" as we do today would leave it enabled and passing "-D EDK2_ENABLE_SMSC_91X=0" would disable it.

Does that sound like a good compromise?



/
    Leif

[1] https://git.linaro.org/uefi/uefi-tools.git/blob/HEAD:/platforms.config

> > -----Original Message-----
> > From: linaro-uefi-bounces@lists.linaro.org [mailto:linaro-uefi-
> > bounces@lists.linaro.org] On Behalf Of fu.wei@linaro.org
> > Sent: 27 January 2015 02:08
> > To: edk2-devel@lists.sourceforge.net; linaro-uefi@lists.linaro.org
> > Subject: [Linaro-uefi] [PATCH 0/5] ArmPlatformPkg: Add Lan91x Dxe
> > driver, and networking support for A15/A15 MPcore/FVP AArch64
> >
> > From: Fu Wei <fu.wei@linaro.org>
> >
> > Add a driver for the SMSC Lan91x Ethernet controllers, such as
> > the 91C111 emulated in the ARM RTSM development simulators
> >
> > Add support for including the SMSC LAN 91C111 driver support
> > by specifying the EDK2_ENABLE_SMSC_91X build variable.
> > A per-platform addition to the .fdf is also required to actually
> > include
> > the driver and network protocol support in the produced image.
> >
> > Add conditionalised networking support for
> >   FVP AArch64
> >   RTSM A15
> >   RTSM A15 MPcore
> >
> > This repo is including all the patches:
> > https://git.linaro.org/people/fu.wei/uefi.git/shortlog/refs/heads/LAN91
> > x_Dxe_driver_upstream
> >
> > Fu Wei (2):
> >   ArmPlatformPkg: Add conditionalised networking support for RTSM A15
> >     MPcore
> >   ArmPlatformPkg: Add conditionalised networking support for RTSM A15
> >
> > Leif Lindholm (2):
> >   ArmPlatformPkg: Add conditional inclusion of Lan91x ethernet support
> >   ArmPlatformPkg: Add conditionalised networking support for FVP
> > AArch64
> >
> > Reece R. Pollack (1):
> >   ArmPlatformPkg: Add Lan91x Dxe driver
> >
> >  .../ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf     |    5 +
> >  .../ArmVExpressPkg/ArmVExpress-RTSM-A15.fdf        |   21 +-
> >  .../ArmVExpressPkg/ArmVExpress-RTSM-A15_MPCore.fdf |   21 +-
> >  .../ArmVExpressPkg/ArmVExpress-networking.fdf.inc  |   28 +
> >  ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc  |    9 +
> >  EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxe.c          | 2233
> > ++++++++++++++++++++
> >  EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxe.inf        |   58 +
> >  EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxeHw.h        |  278 +++
> >  EmbeddedPkg/EmbeddedPkg.dec                        |    3 +
> >  9 files changed, 2624 insertions(+), 32 deletions(-)
> >  create mode 100644 ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-
> > networking.fdf.inc
> >  create mode 100644 EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxe.c
> >  create mode 100644 EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxe.inf
> >  create mode 100644 EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxeHw.h
> >
> > --
> > 1.8.3.1
> >
> >
> > _______________________________________________
> > Linaro-uefi mailing list
> > Linaro-uefi@lists.linaro.org
> > http://lists.linaro.org/mailman/listinfo/linaro-uefi
>
>
>
>
>
> _______________________________________________
> Linaro-uefi mailing list
> Linaro-uefi@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-uefi

_______________________________________________
Linaro-uefi mailing list
Linaro-uefi@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-uefi