def add_automatic_backports(args):
+ disable_list = []
export = re.compile(r'^EXPORT_SYMBOL(_GPL)?\((?P<sym>[^\)]*)\)')
bpi = kconfig.get_backport_info(os.path.join(args.outdir, 'compat', 'Kconfig'))
configtree = kconfig.ConfigTree(os.path.join(args.outdir, 'Kconfig'))
for sym, vals in bpi.items():
if sym.startswith('BACKPORT_BUILD_'):
if not sym[15:] in all_selects:
+ disable_list.append(sym)
continue
symtype, module_name, c_files, h_files = vals
outf.write('#define %s LINUX_BACKPORT(%s)\n' % (s, s))
outf.write('#include <%s>\n' % (os.path.dirname(f) + '/backport-' + os.path.basename(f), ))
outf.write('#endif /* CPTCFG_%s */\n' % sym)
+ return disable_list
def git_debug_init(args):
"""
git_debug_snapshot(args, 'Add driver sources')
- add_automatic_backports(args)
+ disable_list = add_automatic_backports(args)
+ if disable_list:
+ bpcfg = kconfig.ConfigTree(os.path.join(args.outdir, 'compat', 'Kconfig'))
+ bpcfg.disable_symbols(disable_list)
git_debug_snapshot(args, 'Add automatic backports')
logwrite('Apply patches ...')