Hi,

Looks good to me. While I don't 100% understand why one would want this, I
know there's a similar pattern in a few packages.

All things considered,
Reviewed-by: Pedro Falcato <pedro.falc...@gmail.com>

I'll wait for a day for any possible comments by other people before
merging this.

Thanks,
Pedro

On Tue, Jan 25, 2022 at 2:13 PM Jake Garver <j...@nvidia.com> wrote:

> This change modularizes the Ext4 DSC/FDF files following the model used
> in edk2/NetworkPkg.
>
> A platform DSC can include Ext4 using "!include Features/Ext4.dsc.inc".
> Ext.dsc.inc includes all the required information to enable Ext4
> features.  Similarly, "!include Features/Ext4.fdf.inc" would be used in
> the platform FDF.
>
> The Ext4 feature is enabled by default, but could be disabled at build
> time using:
>
>     BLD_*_EXT4_ENABLE=FALSE
>
> Signed-off-by: Jake Garver <j...@nvidia.com>
> ---
>  Features/Ext4Pkg/Ext4.dsc.inc           | 16 ++++++++++++++++
>  Features/Ext4Pkg/Ext4.fdf.inc           | 11 +++++++++++
>  Features/Ext4Pkg/Ext4Components.dsc.inc | 14 ++++++++++++++
>  Features/Ext4Pkg/Ext4Defines.dsc.inc    | 14 ++++++++++++++
>  Features/Ext4Pkg/Ext4Libs.dsc.inc       | 11 +++++++++++
>  5 files changed, 66 insertions(+)
>  create mode 100644 Features/Ext4Pkg/Ext4.dsc.inc
>  create mode 100644 Features/Ext4Pkg/Ext4.fdf.inc
>  create mode 100644 Features/Ext4Pkg/Ext4Components.dsc.inc
>  create mode 100644 Features/Ext4Pkg/Ext4Defines.dsc.inc
>  create mode 100644 Features/Ext4Pkg/Ext4Libs.dsc.inc
>
> diff --git a/Features/Ext4Pkg/Ext4.dsc.inc b/Features/Ext4Pkg/Ext4.dsc.inc
> new file mode 100644
> index 0000000000..b560b9acbb
> --- /dev/null
> +++ b/Features/Ext4Pkg/Ext4.dsc.inc
> @@ -0,0 +1,16 @@
> +## @file
> +# Ext4 DSC include file for Platform DSC
> +#
> +# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION &
> AFFILIATES. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> +!include Features/Ext4Pkg/Ext4Defines.dsc.inc
> +
> +[LibraryClasses]
> +!include Features/Ext4Pkg/Ext4Libs.dsc.inc
> +
> +[Components.common]
> +!include Features/Ext4Pkg/Ext4Components.dsc.inc
> diff --git a/Features/Ext4Pkg/Ext4.fdf.inc b/Features/Ext4Pkg/Ext4.fdf.inc
> new file mode 100644
> index 0000000000..fb36070860
> --- /dev/null
> +++ b/Features/Ext4Pkg/Ext4.fdf.inc
> @@ -0,0 +1,11 @@
> +## @file
> +# Ext4 FDF include file for All Architectures.
> +#
> +# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION &
> AFFILIATES. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +!if $(EXT4_ENABLE) == TRUE
> +  INF Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.inf
> +!endif
> diff --git a/Features/Ext4Pkg/Ext4Components.dsc.inc
> b/Features/Ext4Pkg/Ext4Components.dsc.inc
> new file mode 100644
> index 0000000000..34401272a0
> --- /dev/null
> +++ b/Features/Ext4Pkg/Ext4Components.dsc.inc
> @@ -0,0 +1,14 @@
> +## @file
> +# Ext4 DSC include file for [Components] section of all Architectures.
> +#
> +# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION &
> AFFILIATES. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +!if $(EXT4_ENABLE) == TRUE
> +  Features/Ext4Pkg/Ext4Dxe/Ext4Dxe.inf {
> +    <PcdsFixedAtBuild>
> +      gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000007
> +  }
> +!endif
> diff --git a/Features/Ext4Pkg/Ext4Defines.dsc.inc
> b/Features/Ext4Pkg/Ext4Defines.dsc.inc
> new file mode 100644
> index 0000000000..b02eac59cf
> --- /dev/null
> +++ b/Features/Ext4Pkg/Ext4Defines.dsc.inc
> @@ -0,0 +1,14 @@
> +## @file
> +# Ext4 DSC include file for [Defines] section of all Architectures.
> +#
> +# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION &
> AFFILIATES. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +!ifndef EXT4_ENABLE
> +  #
> +  # This flag is to enable or disable the ext4 feature.
> +  #
> +  DEFINE EXT4_ENABLE = TRUE
> +!endif
> diff --git a/Features/Ext4Pkg/Ext4Libs.dsc.inc
> b/Features/Ext4Pkg/Ext4Libs.dsc.inc
> new file mode 100644
> index 0000000000..078183e0cc
> --- /dev/null
> +++ b/Features/Ext4Pkg/Ext4Libs.dsc.inc
> @@ -0,0 +1,11 @@
> +## @file
> +# Ext4 DSC include file for [LibraryClasses] section of all Architectures.
> +#
> +# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION &
> AFFILIATES. All rights reserved.
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +!if $(EXT4_ENABLE) == TRUE
> +  BaseUcs2Utf8Lib|RedfishPkg/Library/BaseUcs2Utf8Lib/BaseUcs2Utf8Lib.inf
> +!endif
> --
> 2.17.1
>
>

-- 
Pedro Falcato


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86142): https://edk2.groups.io/g/devel/message/86142
Mute This Topic: https://groups.io/mt/88671995/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to