[RFC PATCH edk2-platforms v1 0/7] Modify Platform/ARM file structure


PierreGondois
 

From: Pierre Gondois <Pierre.Gondois@arm.com>

This patchset is a code suggestion to resolve bugzillas [1] and [2],
based from the discussions available in the same threads.

Bugzilla [1]:
The Platform/ARM/ARM.dec file implies that the Platform/ARM/ folder is a package. This folder however hosts other packages describing platforms (JunoPkg, SgiPkg, ...) and packages describing drivers (BootMonFs, FdtPlatformDxe).

As the Dec specification mention:
"EDK II Packages cannot be nested within other EDK II Packages."
Also, CI modules are based on packages. Having non-nested packages allows to have distinct entities each CI module must check.

To remove the nested structure:
1- Create a Platform/ARM/ArmCommonPkg package containing code
shared among platforms. It will contains the following folders:
Platform/ARM/[Drivers/ | Include/ | Library/]
2- Remove the BootMonFs and FdtPlatformDxe packages and resolve
the broken dependencies to these drivers
3- Resolve the broken dependencies to the libraries from
Platform/ARM/Library

Bugzilla [2]:
Some modules/configuration files are referenced from the edk2-repository/ folder, e.g. Platform/ARM/.../module.inf.
Reasons to remove the Platform/ARM prefix are:
- The prefix implies conserving the folder structure when building Arm platforms and makes modules/packages exportation difficult. E.g., the JunoPkg must be in a Platform/ARM/ folder.
- Removing the Platform/ARM prefix would allow to make Modules/Packages self-contained entities. If there is a module/package dependency, the build system should be able to resolve it without having a file path out of the module/package.

This has been tested by building all the platforms in Platform/ARM/. Other platforms should not be impacted, but I can fix them in such case.
The modification done to Platform/Comcast/RDKQemu/RDKQemu.fdf has no consequence, but the platform seems to be broken beforehand.

The modifications can be seen at [3].

Please let me know if the solution fits,
Pierre

[1] https://bugzilla.tianocore.org/show_bug.cgi?id=3259
[2] https://bugzilla.tianocore.org/show_bug.cgi?id=3264
[3] https://github.com/PierreARM/edk2-platforms/commits/1876_Modify_Platform_ARM_file_structure_v1

Pierre Gondois (7):
Platform/ARM: Create ArmCommonPkg
Platform/ARM: Create ArmCommonPkg.dec from ARM.dec
Platform/ARM: Move BootMonFs package to ArmCommonPkg
Platform/ARM: Move FdtPlatformDxe package to ArmCommonPkg
Platform/ARM: Resolve ArmCommonPkg library references
Platform/ARM: Remove Platform/ARM prefix
Platform/ARM: Alphabetically order sections in inf files

Platform/ARM/ARM.dec | 22 ------------
.../ArmCommonPkg.dec} | 18 ++++++++--
.../Drivers/BootMonFs/BootMonFs.inf | 9 +++--
.../Drivers/BootMonFs/BootMonFsApi.h | 0
.../Drivers/BootMonFs/BootMonFsDir.c | 0
.../Drivers/BootMonFs/BootMonFsEntryPoint.c | 0
.../Drivers/BootMonFs/BootMonFsHw.h | 0
.../Drivers/BootMonFs/BootMonFsImages.c | 0
.../Drivers/BootMonFs/BootMonFsInternal.h | 0
.../Drivers/BootMonFs/BootMonFsOpenClose.c | 0
.../Drivers/BootMonFs/BootMonFsReadWrite.c | 0
.../Drivers/BootMonFs/BootMonFsUnsupported.c | 0
.../Drivers/FdtPlatformDxe/FdtPlatform.c | 0
.../Drivers/FdtPlatformDxe/FdtPlatform.h | 0
.../Drivers/FdtPlatformDxe/FdtPlatformDxe.inf | 3 +-
.../Drivers/FdtPlatformDxe/FdtPlatformDxe.uni | 0
.../Drivers/FdtPlatformDxe/README.txt | 0
.../Drivers/FdtPlatformDxe/ShellDumpFdt.c | 0
.../Drivers/FdtPlatformDxe/ShellSetFdt.c | 0
.../Include/Guid/BootMonFsFileInfo.h | 0
.../Include/Library/ArmShellCmdLib.h | 0
.../Include/Library/BdsLib.h | 0
.../Library/ArmShellCmdRunAxf/AArch64/Pivot.S | 0
.../Library/ArmShellCmdRunAxf/Arm/Pivot.S | 0
.../ArmShellCmdRunAxf/ArmShellCmdRunAxf.c | 0
.../ArmShellCmdRunAxf/ArmShellCmdRunAxf.h | 0
.../ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf | 10 +++---
.../ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni | 0
.../ArmShellCmdRunAxf/BootMonFsLoader.c | 0
.../ArmShellCmdRunAxf/BootMonFsLoader.h | 0
.../Library/ArmShellCmdRunAxf/ElfLoader.c | 0
.../Library/ArmShellCmdRunAxf/ElfLoader.h | 0
.../Library/ArmShellCmdRunAxf/RunAxf.c | 0
.../Library/ArmShellCmdRunAxf/elf32.h | 0
.../Library/ArmShellCmdRunAxf/elf64.h | 0
.../Library/ArmShellCmdRunAxf/elf_common.h | 0
.../Library/BdsLib/BdsFilePath.c | 0
.../Library/BdsLib/BdsHelper.c | 0
.../Library/BdsLib/BdsInternal.h | 0
.../Library/BdsLib/BdsLib.inf | 4 +--
Platform/ARM/Drivers/BootMonFs/BootMonFs.dec | 20 -----------
.../ARM/JunoPkg/AcpiTables/AcpiTables.inf | 10 +++---
Platform/ARM/JunoPkg/ArmJuno.dsc | 30 ++++++++--------
Platform/ARM/JunoPkg/ArmJuno.fdf | 18 +++++-----
.../ConfigurationManager.dsc.inc | 2 +-
.../ConfigurationManagerDxe.inf | 4 +--
.../JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.inf | 11 +++---
.../Drivers/SataSiI3132Dxe/SataSiI3132Dxe.inf | 2 +-
.../JunoPkg/Library/ArmJunoLib/ArmJunoLib.inf | 10 +++---
.../Library/ArmJunoMtlLib/ArmJunoMtlLib.inf | 2 +-
.../HdLcdArmJunoLib/HdLcdArmJunoLib.inf | 2 +-
.../JunoPciHostBridgeLib.inf | 2 +-
.../NorFlashJunoLib/NorFlashJunoLib.inf | 2 +-
.../SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 4 +--
.../ConfigurationManagerDxeFvp.inf | 2 +-
.../ConfigurationManagerFvp.dsc.inc | 2 +-
.../Drivers/PlatformDxe/PlatformDxeFvp.inf | 2 +-
.../PciHostBridgeLib/PciHostBridgeLibFvp.inf | 2 +-
.../Library/PlatformLib/PlatformLib.inf | 2 +-
Platform/ARM/Morello/MorelloPlatform.dsc.inc | 2 +-
Platform/ARM/Morello/MorelloPlatformFvp.dsc | 12 +++----
Platform/ARM/Morello/MorelloPlatformFvp.fdf | 6 ++--
Platform/ARM/Morello/Readme.md | 2 +-
Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 4 +--
Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 2 +-
Platform/ARM/Readme.md | 2 +-
.../SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 4 +--
.../SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 4 +--
.../AcpiTables/RdN1EdgeX2AcpiTables.inf | 4 +--
.../ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 4 +--
.../SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 4 +--
.../ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 4 +--
.../SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 4 +--
.../SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 4 +--
.../Drivers/PlatformDxe/PlatformDxe.inf | 2 +-
.../SmbiosPlatformDxe/SmbiosPlatformDxe.inf | 10 +++---
.../Library/HdLcdArmSgiLib/HdLcdArmSgiLib.inf | 2 +-
.../Library/NorFlashLib/NorFlashLib.inf | 2 +-
.../NorFlashLib/StandaloneMmNorFlashLib.inf | 2 +-
.../PciHostBridgeLib/PciHostBridgeLib.inf | 4 +--
.../Library/PlatformLib/PlatformLib.inf | 4 +--
.../Library/SgiPlatformPei/SgiPlatformPei.inf | 2 +-
Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc | 4 +--
Platform/ARM/SgiPkg/PlatformStandaloneMm2.dsc | 4 +--
Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc | 10 +++---
Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.fdf.inc | 2 +-
Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc | 10 +++---
Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.fdf.inc | 2 +-
Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc | 10 +++---
.../ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.fdf.inc | 2 +-
Platform/ARM/SgiPkg/RdN2/RdN2.dsc | 10 +++---
Platform/ARM/SgiPkg/RdN2/RdN2.fdf.inc | 2 +-
Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.dsc | 10 +++---
Platform/ARM/SgiPkg/RdN2Cfg1/RdN2Cfg1.fdf.inc | 2 +-
Platform/ARM/SgiPkg/RdV1/RdV1.dsc | 10 +++---
Platform/ARM/SgiPkg/RdV1/RdV1.fdf.inc | 2 +-
Platform/ARM/SgiPkg/RdV1Mc/RdV1Mc.dsc | 10 +++---
Platform/ARM/SgiPkg/RdV1Mc/RdV1Mc.fdf.inc | 2 +-
Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc | 10 +++---
Platform/ARM/SgiPkg/Sgi575/Sgi575.fdf.inc | 2 +-
Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 18 +++++-----
Platform/ARM/SgiPkg/SgiPlatform.fdf | 8 ++---
Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc | 2 +-
.../ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc | 34 +++++++++----------
.../ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf | 18 +++++-----
.../VExpressPkg/ArmVExpress-FVP-AArch64.dsc | 28 +++++++--------
.../VExpressPkg/ArmVExpress-FVP-AArch64.fdf | 22 ++++++------
Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 14 ++++----
.../ConfigurationManagerDxe.inf | 4 +--
.../Drivers/ArmVExpressDxe/ArmFvpDxe.inf | 8 ++---
.../Drivers/ArmVExpressDxe/ArmHwDxe.inf | 2 +-
.../ArmVExpressFastBootDxe.inf | 8 ++---
.../Drivers/Isp1761UsbDxe/Isp1761UsbDxe.inf | 4 +--
.../Drivers/Lan9118Dxe/Lan9118Dxe.inf | 12 +++----
.../Drivers/Lan91xDxe/Lan91xDxe.inf | 2 +-
.../Drivers/PL180MciDxe/PL180MciDxe.inf | 8 ++---
.../Library/ArmMaliDpLib/ArmMaliDpLib.inf | 2 +-
.../ArmVExpressDtPlatformDtbLoaderLib.inf | 4 +--
.../ArmVExpressLibCTA15-A7/ArmVExpressLib.inf | 6 ++--
.../ArmVExpressLibRTSM/ArmVExpressLib.inf | 12 +++----
.../ArmVExpressLibRTSM/ArmVExpressLibSec.inf | 10 +++---
.../ArmVExpressPciHostBridgeLib.inf | 2 +-
.../ArmVExpressSysConfigLib.inf | 2 +-
.../ArmVExpressSysConfigRuntimeLib.inf | 2 +-
.../HdLcdArmVExpressLib.inf | 2 +-
.../NorFlashArmVExpressLib.inf | 4 +--
.../PL111LcdArmVExpressLib.inf | 2 +-
.../Library/ResetSystemLib/ResetSystemLib.inf | 4 +--
Platform/Comcast/RDKQemu/RDKQemu.fdf | 2 +-
Readme.md | 2 +-
130 files changed, 303 insertions(+), 334 deletions(-)
delete mode 100644 Platform/ARM/ARM.dec
rename Platform/ARM/{Drivers/FdtPlatformDxe/FdtPlatformDxe.dec => ArmCommonPkg/ArmCommonPkg.dec} (52%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFs.inf (90%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsApi.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsDir.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsEntryPoint.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsHw.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsImages.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsInternal.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsOpenClose.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsReadWrite.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/BootMonFs/BootMonFsUnsupported.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/FdtPlatformDxe/FdtPlatform.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/FdtPlatformDxe/FdtPlatform.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/FdtPlatformDxe/FdtPlatformDxe.inf (89%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/FdtPlatformDxe/FdtPlatformDxe.uni (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/FdtPlatformDxe/README.txt (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/FdtPlatformDxe/ShellDumpFdt.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Drivers/FdtPlatformDxe/ShellSetFdt.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Include/Guid/BootMonFsFileInfo.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Include/Library/ArmShellCmdLib.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Include/Library/BdsLib.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/AArch64/Pivot.S (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/Arm/Pivot.S (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf (92%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/BootMonFsLoader.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/BootMonFsLoader.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/ElfLoader.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/ElfLoader.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/RunAxf.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/elf32.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/elf64.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/ArmShellCmdRunAxf/elf_common.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/BdsLib/BdsFilePath.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/BdsLib/BdsHelper.c (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/BdsLib/BdsInternal.h (100%)
rename Platform/ARM/{ => ArmCommonPkg}/Library/BdsLib/BdsLib.inf (93%)
delete mode 100644 Platform/ARM/Drivers/BootMonFs/BootMonFs.dec

--
2.17.1