Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 895fdcc8 authored by Bryan Huntsman's avatar Bryan Huntsman Committed by Gerrit - the friendly Code Review server
Browse files

scripts/build-all: remove all defconfig manipulation options



Simplifiy the script by removing all options and code for manipulating
defconfigs.

Change-Id: Ic8c583d501165501035c2c43b69e5b5c57b97fb0
Signed-off-by: default avatarBryan Huntsman <bryanh@codeaurora.org>
Signed-off-by: default avatarNaitik Bharadiya <bharad@codeaurora.org>
parent 36f01410
Loading
Loading
Loading
Loading
+23 −62
Original line number Original line Diff line number Diff line
@@ -266,7 +266,6 @@ class Builder():
        steps.append(ExecStep(['make', 'O=%s' % dest_dir,
        steps.append(ExecStep(['make', 'O=%s' % dest_dir,
            self.confname], env=self.make_env))
            self.confname], env=self.make_env))


        if not all_options.updateconfigs:
        # Build targets can be dependent upon the completion of
        # Build targets can be dependent upon the completion of
        # previous build targets, so build them one at a time.
        # previous build targets, so build them one at a time.
        if os.environ.get('ARCH') == "arm64":
        if os.environ.get('ARCH') == "arm64":
@@ -290,19 +289,8 @@ class Builder():
        for t in build_targets:
        for t in build_targets:
            steps.append(ExecStep(cmd_line + [t], env=self.make_env))
            steps.append(ExecStep(cmd_line + [t], env=self.make_env))


        # Copy the defconfig back.
        if all_options.configs or all_options.updateconfigs:
            steps.append(ExecStep(['make', 'O=%s' % dest_dir,
                'savedefconfig'], env=self.make_env))
            steps.append(CopyfileStep(savedefconfig, defconfig))

        return steps
        return steps


def update_config(file, str):
    print 'Updating %s with \'%s\'\n' % (file, str)
    with open(file, 'a') as defconfig:
        defconfig.write(str + '\n')

def scan_configs():
def scan_configs():
    """Get the full list of defconfigs appropriate for this tree."""
    """Get the full list of defconfigs appropriate for this tree."""
    names = []
    names = []
@@ -343,8 +331,6 @@ def build_many(targets):


    tracker = BuildTracker(parallel)
    tracker = BuildTracker(parallel)
    for target in targets:
    for target in targets:
        if all_options.updateconfigs:
            update_config(target.defconfig, all_options.updateconfigs)
        steps = target.build()
        steps = target.build()
        tracker.add_sequence(target.log_name, target.name, steps)
        tracker.add_sequence(target.log_name, target.name, steps)
    tracker.run()
    tracker.run()
@@ -360,25 +346,14 @@ def main():
    usage = ("""
    usage = ("""
           %prog [options] all                 -- Build all targets
           %prog [options] all                 -- Build all targets
           %prog [options] target target ...   -- List specific targets
           %prog [options] target target ...   -- List specific targets
           %prog [options] perf                -- Build all perf targets
           """)
           %prog [options] noperf              -- Build all non-perf targets""")
    parser = OptionParser(usage=usage, version=version)
    parser = OptionParser(usage=usage, version=version)
    parser.add_option('--configs', action='store_true',
            dest='configs',
            help="Copy configs back into tree")
    parser.add_option('--list', action='store_true',
    parser.add_option('--list', action='store_true',
            dest='list',
            dest='list',
            help='List available targets')
            help='List available targets')
    parser.add_option('-v', '--verbose', action='store_true',
    parser.add_option('-v', '--verbose', action='store_true',
            dest='verbose',
            dest='verbose',
            help='Output to stdout in addition to log file')
            help='Output to stdout in addition to log file')
    parser.add_option('--oldconfig', action='store_true',
            dest='oldconfig',
            help='Only process "make oldconfig"')
    parser.add_option('--updateconfigs',
            dest='updateconfigs',
            help="Update defconfigs with provided option setting, "
                 "e.g. --updateconfigs=\'CONFIG_USE_THING=y\'")
    parser.add_option('-j', '--jobs', type='int', dest="jobs",
    parser.add_option('-j', '--jobs', type='int', dest="jobs",
            help="Number of simultaneous jobs")
            help="Number of simultaneous jobs")
    parser.add_option('-l', '--load-average', type='int',
    parser.add_option('-l', '--load-average', type='int',
@@ -401,25 +376,11 @@ def main():
            print "   %s" % target.name
            print "   %s" % target.name
        sys.exit(0)
        sys.exit(0)


    if options.oldconfig:
    if options.make_target:
        make_command = ["oldconfig"]
    elif options.make_target:
        make_command = options.make_target
        make_command = options.make_target


    if args == ['all']:
    if args == ['all']:
        build_many(configs)
        build_many(configs)
    elif args == ['perf']:
        targets = []
        for t in configs:
            if "perf" in t.name:
                targets.append(t)
        build_many(targets)
    elif args == ['noperf']:
        targets = []
        for t in configs:
            if "perf" not in t.name:
                targets.append(t)
        build_many(targets)
    elif len(args) > 0:
    elif len(args) > 0:
        all_configs = {}
        all_configs = {}
        for t in configs:
        for t in configs: