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
.definitions
.ToolDefinitions
;
39 import org
.tianocore
.common
.exception
.EdkException
;
40 import org
.tianocore
.common
.logger
.EdkLog
;
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
.ToolChainElement
;
51 import org
.tianocore
.build
.toolchain
.ToolChainMap
;
52 import org
.w3c
.dom
.NamedNodeMap
;
53 import org
.w3c
.dom
.Node
;
54 import org
.w3c
.dom
.NodeList
;
57 <code>FpdParserTask</code> is an ANT task. The main function is parsing Framework
58 Platform Descritpion (FPD) XML file and generating its ANT build script for
59 corresponding platform.
61 <p>The task sets global properties PLATFORM, PLATFORM_DIR, PLATFORM_RELATIVE_DIR
64 <p>The task generates ${PLATFORM}_build.xml file which will be called by top level
65 build.xml. The task also generate Fv.inf files (File is for Tool GenFvImage). </p>
67 <p>FpdParserTask task stores all FPD information to GlobalData. And parse
68 tools definition file to set up compiler options for different Target and
69 different ToolChainTag. </p>
71 <p>The method parseFpdFile is also prepared for single module build. </p>
75 public class FpdParserTask
extends Task
{
77 private File fpdFile
= null;
79 PlatformIdentification platformId
;
84 /// Mapping from modules identification to out put file name
86 Map
<FpdModuleIdentification
, String
> outfiles
= new LinkedHashMap
<FpdModuleIdentification
, String
>();
89 /// Mapping from FV name to its modules
91 Map
<String
, Set
<FpdModuleIdentification
>> fvs
= new HashMap
<String
, Set
<FpdModuleIdentification
>>();
94 /// FpdParserTask can specify some ANT properties.
96 private Vector
<Property
> properties
= new Vector
<Property
>();
98 SurfaceAreaQuery saq
= null;
100 boolean isUnified
= true;
103 Public construct method. It is necessary for ANT task.
105 public FpdParserTask() {
109 ANT task's entry method. The main steps is described as following:
112 <li>Initialize global information (Framework DB, SPD files and all MSA files
113 listed in SPD). This step will execute only once in whole build process;</li>
114 <li>Parse specified FPD file; </li>
115 <li>Generate FV.inf files; </li>
116 <li>Generate PlatformName_build.xml file for Flatform build; </li>
117 <li>Collect PCD information. </li>
120 @throws BuildException
121 Surface area is not valid.
123 public void execute() throws BuildException
{
124 this.setTaskName("FpdParser");
134 isUnified
= OutputManager
.getInstance().prepareBuildDir(getProject());
136 String buildDir
= getProject().getProperty("BUILD_DIR");
138 // For every Target and ToolChain
140 String
[] targetList
= GlobalData
.getToolChainInfo().getTargets();
141 for (int i
= 0; i
< targetList
.length
; i
++) {
142 String
[] toolchainList
= GlobalData
.getToolChainInfo().getTagnames();
143 for(int j
= 0; j
< toolchainList
.length
; j
++) {
147 String ffsCommonDir
= buildDir
+ File
.separatorChar
148 + targetList
[i
] + "_"
150 File fvDir
= new File(ffsCommonDir
+ File
.separatorChar
+ "FV");
152 getProject().setProperty("FV_DIR", fvDir
.getPath().replaceAll("(\\\\)", "/"));
157 genFvInfFiles(ffsCommonDir
);
164 String platformBuildFile
= buildDir
+ File
.separatorChar
+ platformId
.getName() + "_build.xml";
165 PlatformBuildFileGenerator fileGenerator
= new PlatformBuildFileGenerator(getProject(), outfiles
, fvs
, isUnified
, saq
, platformBuildFile
);
166 fileGenerator
.genBuildFile();
169 // Ant call ${PLATFORM}_build.xml
172 ant
.setProject(getProject());
173 ant
.setAntfile(platformBuildFile
);
175 ant
.setInheritAll(true);
181 Generate Fv.inf files. The Fv.inf file is composed with four
182 parts: Options, Attributes, Components and Files. The Fv.inf files
183 will be under FV_DIR.
185 @throws BuildException
186 File write FV.inf files error.
188 void genFvInfFiles(String ffsCommonDir
) throws BuildException
{
189 String
[] validFv
= saq
.getFpdValidImageNames();
190 for (int i
= 0; i
< validFv
.length
; i
++) {
192 // Get all global variables from FPD and set them to properties
194 String
[][] globalVariables
= saq
.getFpdGlobalVariable();
195 for (int j
= 0; j
< globalVariables
.length
; j
++) {
196 getProject().setProperty(globalVariables
[j
][0], globalVariables
[j
][1]);
199 getProject().setProperty("FV_FILENAME", validFv
[i
]);
201 File fvFile
= new File(getProject().replaceProperties( getProject().getProperty("FV_DIR") + File
.separatorChar
+ validFv
[i
] + ".inf"));
202 if (fvFile
.exists() && (fvFile
.lastModified() >= fpdFile
.lastModified())) {
204 // don't re-generate FV.inf if fpd has not been changed
208 fvFile
.getParentFile().mkdirs();
211 FileWriter fw
= new FileWriter(fvFile
);
212 BufferedWriter bw
= new BufferedWriter(fw
);
217 String
[][] options
= saq
.getFpdOptions(validFv
[i
]);
218 if (options
.length
> 0) {
219 bw
.write("[options]");
221 for (int j
= 0; j
< options
.length
; j
++) {
222 StringBuffer str
= new StringBuffer(100);
223 str
.append(options
[j
][0]);
224 while (str
.length() < 40) {
228 str
.append(options
[j
][1]);
229 bw
.write(getProject().replaceProperties(str
.toString()));
238 String
[][] attributes
= saq
.getFpdAttributes(validFv
[i
]);
239 if (attributes
.length
> 0) {
240 bw
.write("[attributes]");
242 for (int j
= 0; j
< attributes
.length
; j
++) {
243 StringBuffer str
= new StringBuffer(100);
244 str
.append(attributes
[j
][0]);
245 while (str
.length() < 40) {
249 str
.append(attributes
[j
][1]);
250 bw
.write(getProject().replaceProperties(str
.toString()));
259 String
[][] components
= saq
.getFpdComponents(validFv
[i
]);
260 if (components
.length
> 0) {
261 bw
.write("[components]");
263 for (int j
= 0; j
< components
.length
; j
++) {
264 StringBuffer str
= new StringBuffer(100);
265 str
.append(components
[j
][0]);
266 while (str
.length() < 40) {
270 str
.append(components
[j
][1]);
271 bw
.write(getProject().replaceProperties(str
.toString()));
280 Set
<FpdModuleIdentification
> moduleSeqSet
= getModuleSequenceForFv(validFv
[i
]);
282 Set
<FpdModuleIdentification
> filesSet
= fvs
.get(validFv
[i
]);
284 FpdModuleIdentification
[] files
= null;
286 if (moduleSeqSet
== null) {
287 if (filesSet
!= null) {
288 files
= filesSet
.toArray(new FpdModuleIdentification
[filesSet
.size()]);
290 } else if (filesSet
== null) {
291 if (moduleSeqSet
.size() != 0) {
292 throw new BuildException("Can not find any modules belongs to FV[" + validFv
[i
] + "], but listed some in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1']");
296 // if moduleSeqSet and filesSet is inconsistent, report error
298 if(moduleSeqSet
.size() != filesSet
.size()){
299 throw new BuildException("Modules for FV[" + validFv
[i
] + "] defined in FrameworkModules and in BuildOptions.UserExtensions[@UserID='IMAGES' @Identifier='1'] are inconsistent. ");
302 // whether all modules in moduleSeqSet listed in filesSet
304 Iterator
<FpdModuleIdentification
> iter
= moduleSeqSet
.iterator();
305 while (iter
.hasNext()) {
306 FpdModuleIdentification item
= iter
.next();
307 if (!filesSet
.contains(item
)) {
308 throw new BuildException("Can not find " + item
+ " belongs to FV[" + validFv
[i
] + "]");
313 files
= moduleSeqSet
.toArray(new FpdModuleIdentification
[moduleSeqSet
.size()]);
320 for (int j
= 0; j
< files
.length
; j
++) {
321 String str
= ffsCommonDir
+ File
.separatorChar
+ outfiles
.get(files
[j
]);
322 bw
.write(getProject().replaceProperties("EFI_FILE_NAME = " + str
));
329 } catch (IOException ex
) {
330 BuildException buildException
= new BuildException("Generation of the FV file [" + fvFile
.getPath() + "] failed!\n" + ex
.getMessage());
331 buildException
.setStackTrace(ex
.getStackTrace());
332 throw buildException
;
333 } catch (EdkException ex
) {
334 BuildException buildException
= new BuildException("Generation of the FV file [" + fvFile
.getPath() + "] failed!\n" + ex
.getMessage());
335 buildException
.setStackTrace(ex
.getStackTrace());
336 throw buildException
;
341 This method is used for Single Module Build.
344 @throws BuildException
345 FPD file is not valid.
347 public void parseFpdFile(File fpdFile
) throws BuildException
, EdkException
{
348 this.fpdFile
= fpdFile
;
352 // Call Platform_build.xml prebuild firstly in stand-alone build
355 isUnified
= OutputManager
.getInstance().prepareBuildDir(getProject());
357 String buildDir
= getProject().getProperty("BUILD_DIR");
359 // For every Target and ToolChain
361 String
[] targetList
= GlobalData
.getToolChainInfo().getTargets();
362 for (int i
= 0; i
< targetList
.length
; i
++) {
363 String
[] toolchainList
= GlobalData
.getToolChainInfo().getTagnames();
364 for(int j
= 0; j
< toolchainList
.length
; j
++) {
368 String ffsCommonDir
= buildDir
+ File
.separatorChar
369 + targetList
[i
] + "_"
371 File fvDir
= new File(ffsCommonDir
+ File
.separatorChar
+ "FV");
376 String platformBuildFile
= buildDir
+ File
.separatorChar
+ platformId
.getName() + "_build.xml";
377 PlatformBuildFileGenerator fileGenerator
= new PlatformBuildFileGenerator(getProject(), outfiles
, fvs
, isUnified
, saq
, platformBuildFile
);
378 fileGenerator
.genBuildFile();
381 ant
.setProject(getProject());
382 ant
.setAntfile(platformBuildFile
);
383 ant
.setTarget("prebuild");
384 ant
.setInheritAll(true);
392 @throws BuildException
393 FPD file is not valid.
395 void parseFpdFile() throws BuildException
{
397 XmlObject doc
= XmlObject
.Factory
.parse(fpdFile
);
399 if (!doc
.validate()) {
400 throw new BuildException("Platform Surface Area file [" + fpdFile
.getPath() + "] format is invalid!");
403 Map
<String
, XmlObject
> map
= new HashMap
<String
, XmlObject
>();
404 map
.put("PlatformSurfaceArea", doc
);
405 saq
= new SurfaceAreaQuery(map
);
410 platformId
= saq
.getFpdHeader();
411 platformId
.setFpdFile(fpdFile
);
412 getProject().setProperty("PLATFORM", platformId
.getName());
413 getProject().setProperty("PLATFORM_FILE", platformId
.getRelativeFpdFile().replaceAll("(\\\\)", "/"));
414 getProject().setProperty("PLATFORM_DIR", platformId
.getFpdFile().getParent().replaceAll("(\\\\)", "/"));
415 getProject().setProperty("PLATFORM_RELATIVE_DIR", platformId
.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
417 if( !FrameworkBuildTask
.multithread
) {
418 FrameworkBuildTask
.originalProperties
.put("PLATFORM", platformId
.getName());
419 FrameworkBuildTask
.originalProperties
.put("PLATFORM_FILE", platformId
.getRelativeFpdFile().replaceAll("(\\\\)", "/"));
420 FrameworkBuildTask
.originalProperties
.put("PLATFORM_DIR", platformId
.getFpdFile().getParent().replaceAll("(\\\\)", "/"));
421 FrameworkBuildTask
.originalProperties
.put("PLATFORM_RELATIVE_DIR", platformId
.getPlatformRelativeDir().replaceAll("(\\\\)", "/"));
425 // Build mode. User-defined output dir.
427 String buildMode
= saq
.getFpdIntermediateDirectories();
428 String userDefinedOutputDir
= saq
.getFpdOutputDirectory();
430 OutputManager
.getInstance().setup(userDefinedOutputDir
, buildMode
);
433 // TBD. Deal PCD and BuildOption related Info
435 GlobalData
.setFpdBuildOptions(saq
.getFpdBuildOptions());
437 GlobalData
.setToolChainPlatformInfo(saq
.getFpdToolChainInfo());
440 // Parse all list modules SA
442 parseModuleSAFiles();
445 // TBD. Deal PCD and BuildOption related Info
447 parseToolChainFamilyOptions();
448 parseToolChainOptions();
453 // Pcd Collection. Call CollectPCDAction to collect pcd info.
455 PlatformPcdPreprocessActionForBuilding ca
= new PlatformPcdPreprocessActionForBuilding();
456 ca
.perform(platformId
.getFpdFile().getPath());
457 } catch (IOException ex
) {
458 BuildException buildException
= new BuildException("Parsing of the FPD file [" + fpdFile
.getPath() + "] failed!\n" + ex
.getMessage());
459 buildException
.setStackTrace(ex
.getStackTrace());
460 throw buildException
;
461 } catch (XmlException ex
) {
462 BuildException buildException
= new BuildException("Parsing of the FPD file [" + fpdFile
.getPath() + "] failed!\n" + ex
.getMessage());
463 buildException
.setStackTrace(ex
.getStackTrace());
464 throw buildException
;
465 } catch (EdkException ex
) {
466 BuildException buildException
= new BuildException("Parsing of the FPD file [" + fpdFile
.getPath() + "] failed!\n" + ex
.getMessage());
467 buildException
.setStackTrace(ex
.getStackTrace());
468 throw buildException
;
473 Parse all modules listed in FPD file.
475 void parseModuleSAFiles() throws EdkException
{
476 Map
<FpdModuleIdentification
, Map
<String
, XmlObject
>> moduleSAs
= saq
.getFpdModules();
479 // For every Module lists in FPD file.
481 Set
<FpdModuleIdentification
> keys
= moduleSAs
.keySet();
482 Iterator iter
= keys
.iterator();
483 while (iter
.hasNext()) {
484 FpdModuleIdentification fpdModuleId
= (FpdModuleIdentification
) iter
.next();
487 // Judge if Module is existed?
489 GlobalData
.registerFpdModuleSA(fpdModuleId
, moduleSAs
.get(fpdModuleId
));
492 // Put fpdModuleId to the corresponding FV
494 saq
.push(GlobalData
.getDoc(fpdModuleId
));
495 String fvBinding
= saq
.getModuleFvBindingKeyword();
497 fpdModuleId
.setFvBinding(fvBinding
);
498 updateFvs(fvBinding
, fpdModuleId
);
501 // Prepare for out put file name
503 ModuleIdentification moduleId
= fpdModuleId
.getModule();
505 String baseName
= saq
.getModuleOutputFileBasename();
507 if (baseName
== null) {
508 baseName
= moduleId
.getName();
510 outfiles
.put(fpdModuleId
, fpdModuleId
.getArch() + File
.separatorChar
511 + moduleId
.getGuid() + "-" + baseName
512 + getSuffix(moduleId
.getModuleType()));
515 // parse module build options, if any
517 GlobalData
.addModuleToolChainOption(fpdModuleId
, parseModuleBuildOptions(false));
518 GlobalData
.addModuleToolChainFamilyOption(fpdModuleId
, parseModuleBuildOptions(true));
523 ToolChainMap
parseModuleBuildOptions(boolean toolChainFamilyFlag
) throws EdkException
{
524 String
[][] options
= saq
.getModuleBuildOptions(toolChainFamilyFlag
);
525 if (options
== null || options
.length
== 0) {
526 return new ToolChainMap();
528 return parseOptions(options
);
531 private ToolChainMap
parsePlatformBuildOptions(boolean toolChainFamilyFlag
) throws EdkException
{
532 String
[][] options
= saq
.getPlatformBuildOptions(toolChainFamilyFlag
);
533 if (options
== null || options
.length
== 0) {
534 return new ToolChainMap();
536 return parseOptions(options
);
539 private ToolChainMap
parseOptions(String
[][] options
) throws EdkException
{
540 ToolChainMap map
= new ToolChainMap();
541 int flagIndex
= ToolChainElement
.ATTRIBUTE
.value
;
543 for (int i
= 0; i
< options
.length
; ++i
) {
544 String flagString
= options
[i
][flagIndex
];
545 if (flagString
== null) {
548 options
[i
][flagIndex
] = ToolDefinitions
.TOOLS_DEF_ATTRIBUTE_FLAGS
;
549 map
.put(options
[i
], flagString
.trim());
555 private void parseToolChainFamilyOptions() throws EdkException
{
556 GlobalData
.setPlatformToolChainFamilyOption(parsePlatformBuildOptions(true));
559 private void parseToolChainOptions() throws EdkException
{
560 GlobalData
.setPlatformToolChainOption(parsePlatformBuildOptions(false));
564 Add the current module to corresponding FV.
566 @param fvName current FV name
567 @param moduleName current module identification
569 void updateFvs(String fvName
, FpdModuleIdentification fpdModuleId
) {
570 if (fvName
== null || fvName
.trim().length() == 0) {
573 String
[] fvNameArray
= fvName
.split("[, \t]+");
574 for (int i
= 0; i
< fvNameArray
.length
; i
++) {
576 // Put module to corresponding fvName
578 if (fvs
.containsKey(fvNameArray
[i
])) {
579 Set
<FpdModuleIdentification
> set
= fvs
.get(fvNameArray
[i
]);
580 set
.add(fpdModuleId
);
582 Set
<FpdModuleIdentification
> set
= new LinkedHashSet
<FpdModuleIdentification
>();
583 set
.add(fpdModuleId
);
584 fvs
.put(fvNameArray
[i
], set
);
590 Get the suffix based on module type. Current relationship are listed:
593 <b>ModuleType</b> <b>Suffix</b>
600 DXE_RUNTIME_DRIVER .DXE
605 UEFI_APPLICATION .APP
609 @param moduleType module type
611 @throws BuildException
612 If module type is null
614 public static String
getSuffix(String moduleType
) throws BuildException
{
615 if (moduleType
== null) {
616 throw new BuildException("Module type is not specified.");
619 String
[][] suffix
= EdkDefinitions
.ModuleTypeExtensions
;
621 for (int i
= 0; i
< suffix
.length
; i
++) {
622 if (suffix
[i
][0].equalsIgnoreCase(moduleType
)) {
636 public void addProperty(Property p
) {
637 properties
.addElement(p
);
640 public void setFpdFile(File fpdFile
) {
641 this.fpdFile
= fpdFile
;
644 public void setType(String type
) {
648 public String
getAllArchForModule(ModuleIdentification moduleId
) {
650 Iterator
<FpdModuleIdentification
> iter
= outfiles
.keySet().iterator();
651 while (iter
.hasNext()) {
652 FpdModuleIdentification fpdModuleId
= iter
.next();
654 if (fpdModuleId
.getModule().equals(moduleId
)) {
655 archs
+= fpdModuleId
.getArch() + " ";
662 private Set
<FpdModuleIdentification
> getModuleSequenceForFv(String fvName
) throws EdkException
{
663 Node node
= saq
.getFpdModuleSequence(fvName
);
664 Set
<FpdModuleIdentification
> result
= new LinkedHashSet
<FpdModuleIdentification
>();
667 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "FV[" + fvName
+ "] does not specify module sequence in FPD. Assuming present sequence as default sequence in FV. ");
670 NodeList childNodes
= node
.getChildNodes();
671 for (int i
= 0; i
< childNodes
.getLength(); i
++) {
672 Node childItem
= childNodes
.item(i
);
673 if (childItem
.getNodeType() == Node
.ELEMENT_NODE
) {
675 // Find child elements "IncludeModules"
677 if (childItem
.getNodeName().compareTo("IncludeModules") == 0) {
679 // result will be updated
681 processNodes(childItem
, result
);
682 } else if (childItem
.getNodeName().compareTo("FvName") == 0) {
684 } else if (childItem
.getNodeName().compareTo("InfFileName") == 0) {
690 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "Unrecognised element " + childItem
.getNodeName() + " under FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1']");
699 private void processNodes(Node node
, Set
<FpdModuleIdentification
> result
) throws EdkException
{
701 // Found out all elements "Module"
703 NodeList childNodes
= node
.getChildNodes();
704 for (int j
= 0; j
< childNodes
.getLength(); j
++) {
705 Node childItem
= childNodes
.item(j
);
706 if (childItem
.getNodeType() == Node
.ELEMENT_NODE
) {
707 if (childItem
.getNodeName().compareTo("Module") == 0) {
708 String moduleGuid
= null;
709 String moduleVersion
= null;
710 String packageGuid
= null;
711 String packageVersion
= null;
714 NamedNodeMap attr
= childItem
.getAttributes();
715 for (int i
= 0; i
< attr
.getLength(); i
++) {
716 Node attrItem
= attr
.item(i
);
717 if (attrItem
.getNodeName().compareTo("ModuleGuid") == 0) {
718 moduleGuid
= attrItem
.getNodeValue();
719 } else if (attrItem
.getNodeName().compareTo("ModuleVersion") == 0) {
720 moduleVersion
= attrItem
.getNodeValue();
721 } else if (attrItem
.getNodeName().compareTo("PackageGuid") == 0) {
722 packageGuid
= attrItem
.getNodeValue();
723 } else if (attrItem
.getNodeName().compareTo("PackageVersion") == 0) {
724 packageVersion
= attrItem
.getNodeValue();
725 } else if (attrItem
.getNodeName().compareTo("Arch") == 0) {
726 arch
= attrItem
.getNodeValue();
731 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "Unrecognised attribute " + attrItem
.getNodeName() + " under FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1'].IncludeModules.Module");
735 PackageIdentification packageId
= new PackageIdentification(packageGuid
, packageVersion
);
736 GlobalData
.refreshPackageIdentification(packageId
);
738 ModuleIdentification moduleId
= new ModuleIdentification(moduleGuid
, moduleVersion
);
739 moduleId
.setPackage(packageId
);
740 GlobalData
.refreshModuleIdentification(moduleId
);
743 throw new EdkException("Attribute [Arch] is required for element FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1'].IncludeModules.Module. ");
746 result
.add(new FpdModuleIdentification(moduleId
, arch
));
751 EdkLog
.log(this, EdkLog
.EDK_WARNING
, "Unrecognised element " + childItem
.getNodeName() + " under FPD.BuildOptions.UserExtensions[UserID='IMAGES' Identifier='1'].IncludeModules");