2 This file is ANT task FpdParserTask.
4 FpdParserTask is used to parse FPD (Framework Platform Description) and generate
5 build.out.xml. It is for Package or Platform build use.
7 Copyright (c) 2006, Intel Corporation
8 All rights reserved. This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 package org
.tianocore
.build
.fpd
;
18 import java
.io
.BufferedWriter
;
20 import java
.io
.FileWriter
;
21 import java
.io
.IOException
;
22 import java
.util
.HashMap
;
23 import java
.util
.Iterator
;
24 import java
.util
.LinkedHashMap
;
25 import java
.util
.LinkedHashSet
;
28 import java
.util
.Vector
;
30 import org
.apache
.tools
.ant
.BuildException
;
31 import org
.apache
.tools
.ant
.Task
;
32 import org
.apache
.tools
.ant
.taskdefs
.Ant
;
33 import org
.apache
.tools
.ant
.taskdefs
.Property
;
34 import org
.apache
.xmlbeans
.XmlException
;
35 import org
.apache
.xmlbeans
.XmlObject
;
37 import org
.tianocore
.common
.definitions
.EdkDefinitions
;
38 import org
.tianocore
.common
.exception
.EdkException
;
39 import org
.tianocore
.common
.logger
.EdkLog
;
40 import org
.tianocore
.pcd
.action
.ActionMessage
;
41 import org
.tianocore
.build
.FrameworkBuildTask
;
42 import org
.tianocore
.build
.global
.GlobalData
;
43 import org
.tianocore
.build
.global
.OutputManager
;
44 import org
.tianocore
.build
.global
.SurfaceAreaQuery
;
45 import org
.tianocore
.build
.id
.FpdModuleIdentification
;
46 import org
.tianocore
.build
.id
.ModuleIdentification
;
47 import org
.tianocore
.build
.id
.PackageIdentification
;
48 import org
.tianocore
.build
.id
.PlatformIdentification
;
49 import org
.tianocore
.build
.pcd
.action
.PlatformPcdPreprocessActionForBuilding
;
50 import org
.tianocore
.build
.toolchain
.ToolChainAttribute
;
51 import org
.tianocore
.build
.toolchain
.ToolChainElement
;
52 import org
.tianocore
.build
.toolchain
.ToolChainMap
;
53 import org
.w3c
.dom
.NamedNodeMap
;
54 import org
.w3c
.dom
.Node
;
55 import org
.w3c
.dom
.NodeList
;
58 <code>FpdParserTask</code> is an ANT task. The main function is parsing Framework
59 Platform Descritpion (FPD) XML file and generating its ANT build script for
60 corresponding platform.
62 <p>The task sets global properties PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR
65 <p>The task generates ${PLATFORM}_build.xml file which will be called by top level
66 build.xml. The task also generate Fv.inf files (File is for Tool GenFvImage). </p>
68 <p>FpdParserTask task stores all FPD information to GlobalData. And parse
69 tools definition file to set up compiler options for different Target and
70 different ToolChainTag. </p>
72 <p>The method parseFpdFile is also prepared for single module build. </p>
76 public class FpdParserTask
extends Task
{
78 private File fpdFile
= null;
80 PlatformIdentification platformId
;
85 /// Mapping from modules identification to out put file name
87 Map
<FpdModuleIdentification
, String
> outfiles
= new LinkedHashMap
<FpdModuleIdentification
, String
>();
90 /// Mapping from FV name to its modules
92 Map
<String
, Set
<FpdModuleIdentification
>> fvs
= new HashMap
<String
, Set
<FpdModuleIdentification
>>();
95 /// FpdParserTask can specify some ANT properties.
97 private Vector
<Property
> properties
= new Vector
<Property
>();
99 SurfaceAreaQuery saq
= null;
101 boolean isUnified
= true;
104 Public construct method. It is necessary for ANT task.
106 public FpdParserTask() {
110 ANT task's entry method. The main steps is described as following:
113 <li>Initialize global information (Framework DB, SPD files and all MSA files
114 listed in SPD). This step will execute only once in whole build process;</li>
115 <li>Parse specified FPD file; </li>
116 <li>Generate FV.inf files; </li>
117 <li>Generate PlatformName_build.xml file for Flatform build; </li>
118 <li>Collect PCD information. </li>
121 @throws BuildException
122 Surface area is not valid.
124 public void execute() throws BuildException
{
125 this.setTaskName("FpdParser");
135 isUnified
= OutputManager
.getInstance().prepareBuildDir(getProject());
137 String buildDir
= getProject().getProperty("BUILD_DIR");
139 // For every Target and ToolChain
141 String
[] targetList
= GlobalData
.getToolChainInfo().getTargets();
142 for (int i
= 0; i
< targetList
.length
; i
++) {
143 String
[] toolchainList
= GlobalData
.getToolChainInfo().getTagnames();
144 for(int j
= 0; j
< toolchainList
.length
; j
++) {
148 String ffsCommonDir
= buildDir
+ File
.separatorChar
149 + targetList
[i
] + "_"
151 File fvDir
= new File(ffsCommonDir
+ File
.separatorChar
+ "FV");
153 getProject().setProperty("FV_DIR", fvDir
.getPath().replaceAll("(\\\\)", "/"));
158 genFvInfFiles(ffsCommonDir
);
165 String platformBuildFile
= buildDir
+ File
.separatorChar
+ platformId
.getName() + "_build.xml";
166 PlatformBuildFileGenerator fileGenerator
= new PlatformBuildFileGenerator(getProject(), outfiles
, fvs
, isUnified
, saq
, platformBuildFile
);
167 fileGenerator
.genBuildFile();
170 // Ant call ${PLATFORM}_build.xml
173 ant
.setProject(getProject());
174 ant
.setAntfile(platformBuildFile
);
176 ant
.setInheritAll(true);
182 Generate Fv.inf files. The Fv.inf file is composed with four
183 parts: Options, Attributes, Components and Files. The Fv.inf files
184 will be under FV_DIR.
186 @throws BuildException
187 File write FV.inf files error.
189 void genFvInfFiles(String ffsCommonDir
) throws BuildException
{
190 String
[] validFv
= saq
.getFpdValidImageNames();
191 for (int i
= 0; i
< validFv
.length
; i
++) {
193 // Get all global variables from FPD and set them to properties
195 String
[][] globalVariables
= saq
.getFpdGlobalVariable();
196 for (int j
= 0; j
< globalVariables
.length
; j
++) {
197 getProject().setProperty(globalVariables
[j
][0], globalVariables
[j
][1]);
200 getProject().setProperty("FV_FILENAME", validFv
[i
]);
202 File fvFile
= new File(getProject().replaceProperties( getProject().getProperty("FV_DIR") + File
.separatorChar
+ validFv
[i
] + ".inf"));
203 if (fvFile
.exists() && (fvFile
.lastModified() >= fpdFile
.lastModified())) {
205 // don't re-generate FV.inf if fpd has not been changed
209 fvFile
.getParentFile().mkdirs();
212 FileWriter fw
= new FileWriter(fvFile
);
213 BufferedWriter bw
= new BufferedWriter(fw
);
218 String
[][] options
= saq
.getFpdOptions(validFv
[i
]);
219 if (options
.length
> 0) {
220 bw
.write("[options]");
222 for (int j
= 0; j
< options
.length
; j
++) {
223 StringBuffer str
= new StringBuffer(100);
224 str
.append(options
[j
][0]);
225 while (str
.length() < 40) {
229 str
.append(options
[j
][1]);
230 bw
.write(getProject().replaceProperties(str
.toString()));
239 String
[][] attributes
= saq
.getFpdAttributes(validFv
[i
]);
240 if (attributes
.length
> 0) {
241 bw
.write("[attributes]");
243 for (int j
= 0; j
< attributes
.length
; j
++) {
244 StringBuffer str
= new StringBuffer(100);
245 str
.append(attributes
[j
][0]);
246 while (str
.length() < 40) {
250 str
.append(attributes
[j
][1]);
251 bw
.write(getProject().replaceProperties(str
.toString()));
260 String
[][] components
= saq
.getFpdComponents(validFv
[i
]);
261 if (components
.length
> 0) {
262 bw
.write("[components]");
264 for (int j
= 0; j
< components
.length
; j
++) {
265 StringBuffer str
= new StringBuffer(100);
266 str
.append(components
[j
][0]);
267 while (str
.length() < 40) {
271 str
.append(components
[j
][1]);
272 bw
.write(getProject().replaceProperties(str
.toString()));
281 Set
<FpdModuleIdentification
> moduleSeqSet
= getModuleSequenceForFv(validFv
[i
]);
283 Set
<FpdModuleIdentification
> filesSet
= fvs
.get(validFv
[i
]);
285 FpdModuleIdentification
[] files
= null;
287 if (moduleSeqSet
== null) {
288 if (filesSet
!= null) {
289 files
= filesSet
.toArray(new FpdModuleIdentification
[filesSet
.size()]);
291 } else if (filesSet
== null) {
292 if (moduleSeqSet
.size() != 0) {
293 throw new BuildException("Can not find any modules belongs to FV[" + validFv
[i
] + "], but listed some in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1']");
297 // if moduleSeqSet and filesSet is inconsistent, report error
299 if(moduleSeqSet
.size() != filesSet
.size()){
300 throw new BuildException("Modules for FV[" + validFv
[i
] + "] defined in FrameworkModules and in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1'] are inconsistent. ");
303 // whether all modules in moduleSeqSet listed in filesSet
305 Iterator
<FpdModuleIdentification
> iter
= moduleSeqSet
.iterator();
306 while (iter
.hasNext()) {
307 FpdModuleIdentification item
= iter
.next();
308 if (!filesSet
.contains(item
)) {
309 throw new BuildException("Can not find " + item
+ " belongs to FV[" + validFv
[i
] + "]");
314 files
= moduleSeqSet
.toArray(new FpdModuleIdentification
[moduleSeqSet
.size()]);
321 for (int j
= 0; j
< files
.length
; j
++) {
322 String str
= ffsCommonDir
+ File
.separatorChar
+ outfiles
.get(files
[j
]);
323 bw
.write(getProject().replaceProperties("EFI_FILE_NAME = " + str
));
330 } catch (IOException ex
) {
331 BuildException buildException
= new BuildException("Generation of the FV file [" + fvFile
.getPath() + "] failed!\n" + ex
.getMessage());
332 buildException
.setStackTrace(ex
.getStackTrace());
333 throw buildException
;
334 } catch (EdkException ex
) {
335 BuildException buildException
= new BuildException("Generation of the FV file [" + fvFile
.getPath() + "] failed!\n" + ex
.getMessage());
336 buildException
.setStackTrace(ex
.getStackTrace());
337 throw buildException
;
342 This method is used for Single Module Build.
345 @throws BuildException
346 FPD file is not valid.
348 public void parseFpdFile(File fpdFile
) throws BuildException
, EdkException
{
349 this.fpdFile
= fpdFile
;
353 // Call Platform_build.xml prebuild firstly in stand-alone build
356 isUnified
= OutputManager
.getInstance().prepareBuildDir(getProject());
358 String buildDir
= getProject().getProperty("BUILD_DIR");
360 // For every Target and ToolChain
362 String
[] targetList
= GlobalData
.getToolChainInfo().getTargets();
363 for (int i
= 0; i
< targetList
.length
; i
++) {
364 String
[] toolchainList
= GlobalData
.getToolChainInfo().getTagnames();
365 for(int j
= 0; j
< toolchainList
.length
; j
++) {
369 String ffsCommonDir
= buildDir
+ File
.separatorChar
370 + targetList
[i
] + "_"
372 File fvDir
= new File(ffsCommonDir
+ File
.separatorChar
+ "FV");
377 String platformBuildFile
= buildDir
+ File
.separatorChar
+ platformId
.getName() + "_build.xml";
378 PlatformBuildFileGenerator fileGenerator
= new PlatformBuildFileGenerator(getProject(), outfiles
, fvs
, isUnified
, saq
, platformBuildFile
);
379 fileGenerator
.genBuildFile();
382 ant
.setProject(getProject());
383 ant
.setAntfile(platformBuildFile
);
384 ant
.setTarget("prebuild");
385 ant
.setInheritAll(true);
393 @throws BuildException
394 FPD file is not valid.
396 void parseFpdFile() throws BuildException
{
398 XmlObject doc
= XmlObject
.Factory
.parse(fpdFile
);
400 if (!doc
.validate()) {
401 throw new BuildException("Platform Surface Area file [" + fpdFile
.getPath() + "] format is invalid!");
404 Map
<String
, XmlObject
> map
= new HashMap
<String
, XmlObject
>();
405 map
.put("PlatformSurfaceArea", doc
);
406 saq
= new SurfaceAreaQuery(map
);
411 platformId
= saq
.getFpdHeader();
412 platformId
.setFpdFile(fpdFile
);
413 getProject().setProperty("PLATFORM", platformId
.getName());
414 getProject().setProperty("PLATFORM_FILE", platformId
.getRelativeFpdFile().replaceAll("(\\\\)", "/"));
415 getProject().setProperty("PLATFORM_DIR", platformId
.getFpdFile().getParent().replaceAll("(\\\\)", "/"));
416 getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId
.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
418 if( !FrameworkBuildTask
.multithread
) {
419 FrameworkBuildTask
.originalProperties
.put("PLATFORM", platformId
.getName());
420 FrameworkBuildTask
.originalProperties
.put("PLATFORM_FILE", platformId
.getRelativeFpdFile().replaceAll("(\\\\)", "/"));
421 FrameworkBuildTask
.originalProperties
.put("PLATFORM_DIR", platformId
.getFpdFile().getParent().replaceAll("(\\\\)", "/"));
422 FrameworkBuildTask
.originalProperties
.put("PLATFORM_RELATIVE_DIR", platformId
.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
426 // Build mode. User-defined output dir.
428 String buildMode
= saq
.getFpdIntermediateDirectories();
429 String userDefinedOutputDir
= saq
.getFpdOutputDirectory();
431 OutputManager
.getInstance().setup(userDefinedOutputDir
, buildMode
);
434 // TBD. Deal PCD and BuildOption related Info
436 GlobalData
.setFpdBuildOptions(saq
.getFpdBuildOptions());
438 GlobalData
.setToolChainPlatformInfo(saq
.getFpdToolChainInfo());
441 // Parse all list modules SA
443 parseModuleSAFiles();
446 // TBD. Deal PCD and BuildOption related Info
448 parseToolChainFamilyOptions();
449 parseToolChainOptions();
454 // Pcd Collection. Call CollectPCDAction to collect pcd info.
456 PlatformPcdPreprocessActionForBuilding ca
= new PlatformPcdPreprocessActionForBuilding();
457 ca
.perform(platformId
.getFpdFile().getPath(), ActionMessage
.NULL_MESSAGE_LEVEL
);
458 } catch (IOException ex
) {
459 BuildException buildException
= new BuildException("Parsing of the FPD file [" + fpdFile
.getPath() + "] failed!\n" + ex
.getMessage());
460 buildException
.setStackTrace(ex
.getStackTrace());
461 throw buildException
;
462 } catch (XmlException ex
) {
463 BuildException buildException
= new BuildException("Parsing of the FPD file [" + fpdFile
.getPath() + "] failed!\n" + ex
.getMessage());
464 buildException
.setStackTrace(ex
.getStackTrace());
465 throw buildException
;
466 } catch (EdkException ex
) {
467 BuildException buildException
= new BuildException("Parsing of the FPD file [" + fpdFile
.getPath() + "] failed!\n" + ex
.getMessage());
468 buildException
.setStackTrace(ex
.getStackTrace());
469 throw buildException
;
474 Parse all modules listed in FPD file.
476 void parseModuleSAFiles() throws EdkException
{
477 Map
<FpdModuleIdentification
, Map
<String
, XmlObject
>> moduleSAs
= saq
.getFpdModules();
480 // For every Module lists in FPD file.
482 Set
<FpdModuleIdentification
> keys
= moduleSAs
.keySet();
483 Iterator iter
= keys
.iterator();
484 while (iter
.hasNext()) {
485 FpdModuleIdentification fpdModuleId
= (FpdModuleIdentification
) iter
.next();
488 // Judge if Module is existed?
490 GlobalData
.registerFpdModuleSA(fpdModuleId
, moduleSAs
.get(fpdModuleId
));
493 // Put fpdModuleId to the corresponding FV
495 saq
.push(GlobalData
.getDoc(fpdModuleId
));
496 String fvBinding
= saq
.getModuleFvBindingKeyword();
498 fpdModuleId
.setFvBinding(fvBinding
);
499 updateFvs(fvBinding
, fpdModuleId
);
502 // Prepare for out put file name
504 ModuleIdentification moduleId
= fpdModuleId
.getModule();
506 String baseName
= saq
.getModuleOutputFileBasename();
508 if (baseName
== null) {
509 baseName
= moduleId
.getName();
511 outfiles
.put(fpdModuleId
, fpdModuleId
.getArch() + File
.separatorChar
512 + moduleId
.getGuid() + "-" + baseName
513 + getSuffix(moduleId
.getModuleType()));
516 // parse module build options, if any
518 GlobalData
.addModuleToolChainOption(fpdModuleId
, parseModuleBuildOptions(false));
519 GlobalData
.addModuleToolChainFamilyOption(fpdModuleId
, parseModuleBuildOptions(true));
524 ToolChainMap
parseModuleBuildOptions(boolean toolChainFamilyFlag
) throws EdkException
{
525 String
[][] options
= saq
.getModuleBuildOptions(toolChainFamilyFlag
);
526 if (options
== null || options
.length
== 0) {
527 return new ToolChainMap();
529 return parseOptions(options
);
532 private ToolChainMap
parsePlatformBuildOptions(boolean toolChainFamilyFlag
) throws EdkException
{
533 String
[][] options
= saq
.getPlatformBuildOptions(toolChainFamilyFlag
);
534 if (options
== null || options
.length
== 0) {
535 return new ToolChainMap();
537 return parseOptions(options
);
540 private ToolChainMap
parseOptions(String
[][] options
) throws EdkException
{
541 ToolChainMap map
= new ToolChainMap();
542 int flagIndex
= ToolChainElement
.ATTRIBUTE
.value
;
544 for (int i
= 0; i
< options
.length
; ++i
) {
545 String flagString
= options
[i
][flagIndex
];
546 if (flagString
== null) {
549 options
[i
][flagIndex
] = ToolChainAttribute
.FLAGS
+ "";
550 map
.put(options
[i
], flagString
.trim());
556 private void parseToolChainFamilyOptions() throws EdkException
{
557 GlobalData
.setPlatformToolChainFamilyOption(parsePlatformBuildOptions(true));
560 private void parseToolChainOptions() throws EdkException
{
561 GlobalData
.setPlatformToolChainOption(parsePlatformBuildOptions(false));
565 Add the current module to corresponding FV.
567 @param fvName current FV name
568 @param moduleName current module identification
570 void updateFvs(String fvName
, FpdModuleIdentification fpdModuleId
) {
571 if (fvName
== null || fvName
.trim().length() == 0) {
574 String
[] fvNameArray
= fvName
.split("[, \t]+");
575 for (int i
= 0; i
< fvNameArray
.length
; i
++) {
577 // Put module to corresponding fvName
579 if (fvs
.containsKey(fvNameArray
[i
])) {
580 Set
<FpdModuleIdentification
> set
= fvs
.get(fvNameArray
[i
]);
581 set
.add(fpdModuleId
);
583 Set
<FpdModuleIdentification
> set
= new LinkedHashSet
<FpdModuleIdentification
>();
584 set
.add(fpdModuleId
);
585 fvs
.put(fvNameArray
[i
], set
);
591 Get the suffix based on module type. Current relationship are listed:
594 <b>ModuleType</b> <b>Suffix</b>
601 DXE_RUNTIME_DRIVER .DXE
606 UEFI_APPLICATION .APP
610 @param moduleType module type
612 @throws BuildException
613 If module type is null
615 public static String
getSuffix(String moduleType
) throws BuildException
{
616 if (moduleType
== null) {
617 throw new BuildException("Module type is not specified.");
620 String
[][] suffix
= EdkDefinitions
.ModuleTypeExtensions
;
622 for (int i
= 0; i
< suffix
.length
; i
++) {
623 if (suffix
[i
][0].equalsIgnoreCase(moduleType
)) {
637 public void addProperty(Property p
) {
638 properties
.addElement(p
);
641 public void setFpdFile(File fpdFile
) {
642 this.fpdFile
= fpdFile
;
645 public void setType(String type
) {
649 public String
getAllArchForModule(ModuleIdentification moduleId
) {
651 Iterator
<FpdModuleIdentification
> iter
= outfiles
.keySet().iterator();
652 while (iter
.hasNext()) {
653 FpdModuleIdentification fpdModuleId
= iter
.next();
655 if (fpdModuleId
.getModule().equals(moduleId
)) {
656 archs
+= fpdModuleId
.getArch() + " ";
663 private Set
<FpdModuleIdentification
> getModuleSequenceForFv(String fvName
) throws EdkException
{
664 Node node
= saq
.getFpdModuleSequence(fvName
);
665 Set
<FpdModuleIdentification
> result
= new LinkedHashSet
<FpdModuleIdentification
>();
668 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "FV[" + fvName
+ "] does not specify module sequence in FPD. Assuming present sequence as default sequence in FV. ");
671 NodeList childNodes
= node
.getChildNodes();
672 for (int i
= 0; i
< childNodes
.getLength(); i
++) {
673 Node childItem
= childNodes
.item(i
);
674 if (childItem
.getNodeType() == Node
.ELEMENT_NODE
) {
676 // Find child elements "IncludeModules"
678 if (childItem
.getNodeName().compareTo("IncludeModules") == 0) {
680 // result will be updated
682 processNodes(childItem
, result
);
683 } else if (childItem
.getNodeName().compareTo("FvName") == 0) {
685 } else if (childItem
.getNodeName().compareTo("InfFileName") == 0) {
691 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "Unrecognised element " + childItem
.getNodeName() + " under FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1']");
700 private void processNodes(Node node
, Set
<FpdModuleIdentification
> result
) throws EdkException
{
702 // Found out all elements "Module"
704 NodeList childNodes
= node
.getChildNodes();
705 for (int j
= 0; j
< childNodes
.getLength(); j
++) {
706 Node childItem
= childNodes
.item(j
);
707 if (childItem
.getNodeType() == Node
.ELEMENT_NODE
) {
708 if (childItem
.getNodeName().compareTo("Module") == 0) {
709 String moduleGuid
= null;
710 String moduleVersion
= null;
711 String packageGuid
= null;
712 String packageVersion
= null;
715 NamedNodeMap attr
= childItem
.getAttributes();
716 for (int i
= 0; i
< attr
.getLength(); i
++) {
717 Node attrItem
= attr
.item(i
);
718 if (attrItem
.getNodeName().compareTo("ModuleGuid") == 0) {
719 moduleGuid
= attrItem
.getNodeValue();
720 } else if (attrItem
.getNodeName().compareTo("ModuleVersion") == 0) {
721 moduleVersion
= attrItem
.getNodeValue();
722 } else if (attrItem
.getNodeName().compareTo("PackageGuid") == 0) {
723 packageGuid
= attrItem
.getNodeValue();
724 } else if (attrItem
.getNodeName().compareTo("PackageVersion") == 0) {
725 packageVersion
= attrItem
.getNodeValue();
726 } else if (attrItem
.getNodeName().compareTo("Arch") == 0) {
727 arch
= attrItem
.getNodeValue();
732 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "Unrecognised attribute " + attrItem
.getNodeName() + " under FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1'].IncludeModules.Module");
736 PackageIdentification packageId
= new PackageIdentification(packageGuid
, packageVersion
);
737 GlobalData
.refreshPackageIdentification(packageId
);
739 ModuleIdentification moduleId
= new ModuleIdentification(moduleGuid
, moduleVersion
);
740 moduleId
.setPackage(packageId
);
741 GlobalData
.refreshModuleIdentification(moduleId
);
744 throw new EdkException("Attribute [Arch] is required for element FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1'].IncludeModules.Module. ");
747 result
.add(new FpdModuleIdentification(moduleId
, arch
));
752 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "Unrecognised element " + childItem
.getNodeName() + " under FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1'].IncludeModules");