5 from exceptions import MissingFile
7 def build_symbol_map():
8 """Generates global variable smap from symbol_map_file.
9 When file not exists, MissingFile exception is raised.
15 # Check if symbol_map_file exist
16 if not os.path.isfile(sf(conf.symbol_map_file)):
17 raise MissingFile(sf(conf.symbol_map_file), "Run parse_kconfig to generate it.")
20 with open(sf(conf.symbol_map_file)) as f:
22 w = lnn.rstrip().split(sep=':')
26 env = dict(os.environ)
27 env['SRCARCH'] = conf.SRCARCH
28 env['ARCH'] = conf.ARCH
29 env['KERNELVERSION'] = 'KERNELVERSION' # hides error