summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/FfsFileStatement.py
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-28 23:39:39 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-28 23:39:39 +0000
commit52302d4dee589a5df43a464420c9fe68ba83937d (patch)
tree2393f61b9e8975134e3cdfa0352d4c51a3b2ac8d /BaseTools/Source/Python/GenFds/FfsFileStatement.py
parentfe35c036354c4b6bf18c4699a45156f3965fae2a (diff)
downloadedk2-52302d4dee589a5df43a464420c9fe68ba83937d.tar.gz
edk2-52302d4dee589a5df43a464420c9fe68ba83937d.tar.bz2
edk2-52302d4dee589a5df43a464420c9fe68ba83937d.zip
Sync EDKII BaseTools to BaseTools project r1903.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10123 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FfsFileStatement.py')
-rw-r--r--BaseTools/Source/Python/GenFds/FfsFileStatement.py26
1 files changed, 20 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsFileStatement.py b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
index e3f2e68fb8..b0b1b00c7e 100644
--- a/BaseTools/Source/Python/GenFds/FfsFileStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsFileStatement.py
@@ -1,7 +1,7 @@
## @file
# process FFS generation from FILE statement
#
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
#
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -17,14 +17,17 @@
#
import Ffs
import Rule
-from GenFdsGlobalVariable import GenFdsGlobalVariable
import os
import StringIO
import subprocess
+
+from GenFdsGlobalVariable import GenFdsGlobalVariable
from CommonDataClass.FdfClass import FileStatementClassObject
from Common import EdkLogger
from Common.BuildToolError import *
from Common.Misc import GuidStructureByteArrayToGuidString
+from GuidSection import GuidSection
+from FvImageSection import FvImageSection
## generate FFS from FILE
#
@@ -41,11 +44,13 @@ class FileStatement (FileStatementClassObject) :
#
# Generate FFS
#
- # @param self The object pointer
- # @param Dict dictionary contains macro and value pair
- # @retval string Generated FFS file name
+ # @param self The object pointer
+ # @param Dict dictionary contains macro and value pair
+ # @param FvChildAddr Array of the inside FvImage base address
+ # @param FvParentAddr Parent Fv base address
+ # @retval string Generated FFS file name
#
- def GenFfs(self, Dict = {}):
+ def GenFfs(self, Dict = {}, FvChildAddr=[], FvParentAddr=None):
if self.NameGuid != None and self.NameGuid.startswith('PCD('):
PcdValue = GenFdsGlobalVariable.GetPcdValue(self.NameGuid)
@@ -92,6 +97,15 @@ class FileStatement (FileStatementClassObject) :
for section in self.SectionList :
Index = Index + 1
SecIndex = '%d' %Index
+ # process the inside FvImage from FvSection or GuidSection
+ if FvChildAddr != []:
+ if isinstance(section, FvImageSection):
+ section.FvAddr = FvChildAddr.pop(0)
+ elif isinstance(section, GuidSection):
+ section.FvAddr = FvChildAddr
+ if FvParentAddr != None and isinstance(section, GuidSection):
+ section.FvParentAddr = FvParentAddr
+
sectList, align = section.GenSection(OutputDir, self.NameGuid, SecIndex, self.KeyStringList, None, Dict)
if sectList != []:
for sect in sectList: