buildframework/helium/sf/python/pythoncore/lib/atsant.py
changeset 645 b8d81fa19e7d
parent 628 7c4a911dc066
equal deleted inserted replaced
643:27cf35f95864 645:b8d81fa19e7d
    54                             noncust = config
    54                             noncust = config
    55         if type_:
    55         if type_:
    56             return None
    56             return None
    57         if noncust:
    57         if noncust:
    58             return noncust
    58             return noncust
    59         raise Exception('iconfig not found in ' + self.imagesdir)
    59         raise IOError('iconfig not found in ' + self.imagesdir)
    60     
    60     
    61     def getimage(self, name):
    61     def getimage(self, name):
    62         """get image"""
    62         """get image"""
    63         for root, _, files in os.walk(self.imagesdir, topdown=False):
    63         for root, _, files in os.walk(self.imagesdir, topdown=False):
    64             for fname in files:
    64             for fname in files:
    65                 if fname.lower() == name.lower():
    65                 if fname.lower() == name.lower():
    66                     return os.path.join(root, fname)
    66                     return os.path.join(root, fname)
    67         raise Exception(name + ' not found in ' + self.imagesdir)
    67         raise IOError(name + ' not found in ' + self.imagesdir)
    68     
    68     
    69     def findimages(self): 
    69     def findimages(self): 
    70         """find images"""
    70         """find images"""
    71         output = ''
    71         output = ''
    72         for imagetype, imagetypename in [('core', 'CORE'), ('langpack', 'ROFS2'), ('cust', 'ROFS3'), ('udaerase', 'UDAERASE'), ('emmc', 'EMMC')]:
    72         for imagetype, imagetypename in [('core', 'CORE'), ('langpack', 'ROFS2'), ('cust', 'ROFS3'), ('udaerase', 'UDAERASE'), ('emmc', 'EMMC')]:
    80                 if not os.path.exists(image):
    80                 if not os.path.exists(image):
    81                     image = self.getimage(os.path.basename(image))
    81                     image = self.getimage(os.path.basename(image))
    82                 if os.path.exists(image):
    82                 if os.path.exists(image):
    83                     output = output + image + ','
    83                     output = output + image + ','
    84                 else:
    84                 else:
    85                     raise Exception(image + ' not found')
    85                     raise IOError(image + ' not found')
    86             else:
    86             else:
    87                 if imagetype == 'core':
    87                 if imagetype == 'core':
    88                     raise Exception(imagetypename + '_FLASH not found in iconfig.xml in ' + self.imagesdir)
    88                     raise IOError(imagetypename + '_FLASH not found in iconfig.xml in ' + self.imagesdir)
    89                 print imagetypename + '_FLASH not found in iconfig.xml'
    89                 print imagetypename + '_FLASH not found in iconfig.xml'
    90         return output
    90         return output
    91 
    91 
    92 def get_boolean(string_val):
    92 def get_boolean(string_val):
    93     """if parameter passed in is not present in the project it will produce 'none'
    93     """if parameter passed in is not present in the project it will produce 'none'
   118                                 group = component.meta.group[0].name                            
   118                                 group = component.meta.group[0].name                            
   119                         if hasattr(component, 'unit'):
   119                         if hasattr(component, 'unit'):
   120                             for unit in component.unit:
   120                             for unit in component.unit:
   121                                 if group not in modules:
   121                                 if group not in modules:
   122                                     modules[group] = []
   122                                     modules[group] = []
   123                                 modules[group].append(builddrive + os.sep + unit.bldFile)
   123                                 if os.sep == '\\':
       
   124                                     modules[group].append(builddrive + os.sep + unit.bldFile)
       
   125                                 else:
       
   126                                     modules[group].append(unit.bldFile)
   124     else:
   127     else:
   125         sdf = sysdef.api.SystemDefinition(canonicalsysdeffile)
   128         sdf = sysdef.api.SystemDefinition(canonicalsysdeffile)
   126         
   129         
   127         single_key = 'singledropfile'       #default single drop file name
   130         single_key = 'singledropfile'       #default single drop file name
   128        
   131