summaryrefslogtreecommitdiff
path: root/gentree.py
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2013-04-02 22:11:37 +0200
committerJohannes Berg <johannes@sipsolutions.net>2013-04-02 22:11:37 +0200
commit8b67dc814dc740f45891c92c49473a05d914ea71 (patch)
tree3622a9a0056c348a4a99d6a95a0f75da58236ba5 /gentree.py
parent7ac27107eb033feb2f0b28a30d5e575ac294b983 (diff)
do post-processing after applying patches
Otherwise some patches might not apply, and anything added in patches to the Kconfig won't work correctly. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Diffstat (limited to 'gentree.py')
-rwxr-xr-xgentree.py53
1 files changed, 26 insertions, 27 deletions
diff --git a/gentree.py b/gentree.py
index 71ee5777..20455ca3 100755
--- a/gentree.py
+++ b/gentree.py
@@ -191,33 +191,6 @@ def main():
git_debug_init(args)
- # some post-processing is required
- configtree = kconfig.ConfigTree(os.path.join(args.outdir, 'Kconfig'))
- print 'Modify Kconfig tree ...'
- configtree.prune_sources(ignore=['Kconfig.kernel', 'Kconfig.versions'])
- git_debug_snapshot(args, "prune Kconfig tree")
- configtree.force_tristate_modular()
- git_debug_snapshot(args, "force tristate options modular")
- configtree.modify_selects()
- git_debug_snapshot(args, "convert select to depends on")
-
- # write the versioning file
- backports_version = git.describe(tree=source_dir)
- kernel_version = git.describe(tree=args.kerneldir)
- f = open(os.path.join(args.outdir, 'versions'), 'w')
- f.write('BACKPORTS_VERSION="%s"\n' % backports_version)
- f.write('KERNEL_VERSION="%s"\n' % kernel_version)
- f.write('KERNEL_NAME="%s"\n' % args.base_name)
- f.close()
-
- symbols = configtree.symbols()
-
- # write local symbol list
- f = open(os.path.join(args.outdir, '.local-symbols'), 'w')
- for sym in symbols:
- f.write('%s=\n' % sym)
- f.close()
-
git_debug_snapshot(args, "add versions/symbols files")
print 'Apply patches ...'
@@ -296,6 +269,32 @@ def main():
else:
git_debug_snapshot(args, "apply backport patches from %s" % (os.path.basename(pdir),))
+ # some post-processing is required
+ configtree = kconfig.ConfigTree(os.path.join(args.outdir, 'Kconfig'))
+ print 'Modify Kconfig tree ...'
+ configtree.prune_sources(ignore=['Kconfig.kernel', 'Kconfig.versions'])
+ git_debug_snapshot(args, "prune Kconfig tree")
+ configtree.force_tristate_modular()
+ git_debug_snapshot(args, "force tristate options modular")
+ configtree.modify_selects()
+ git_debug_snapshot(args, "convert select to depends on")
+
+ # write the versioning file
+ backports_version = git.describe(tree=source_dir)
+ kernel_version = git.describe(tree=args.kerneldir)
+ f = open(os.path.join(args.outdir, 'versions'), 'w')
+ f.write('BACKPORTS_VERSION="%s"\n' % backports_version)
+ f.write('KERNEL_VERSION="%s"\n' % kernel_version)
+ f.write('KERNEL_NAME="%s"\n' % args.base_name)
+ f.close()
+
+ symbols = configtree.symbols()
+
+ # write local symbol list
+ f = open(os.path.join(args.outdir, '.local-symbols'), 'w')
+ for sym in symbols:
+ f.write('%s=\n' % sym)
+ f.close()
print 'Rewrite Makefiles and Kconfig files ...'