diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2020-08-23 00:20:52 +0300 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2020-08-23 00:20:52 +0300 |
commit | 3cc2d2aa8574a94aca65ac664c3a0fb23d930700 (patch) | |
tree | 0632ac13a4a41364069b5bee86953579123c5b46 /scripts | |
parent | 81d0e1715dc7ad78d029cfafc6810bbb90281247 (diff) | |
parent | adec4f93e1705640e7b03d33394224ff5d835280 (diff) |
Merge tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4 into lineage-17.1-caf-msm8998
* tag 'LA.UM.8.4.r1-05900-8x98.0' of https://source.codeaurora.org/quic/la/kernel/msm-4.4:
msm: kgsl: Mark the scratch buffer as privileged
power: qcom: Add the QPNP QGAUGE (QG) headers
msm: ipa: update msm_ipa.h with latest IPA versions constants
nl80211: add NL80211_CMD_UPDATE_FT_IES to supported commands
msm: mdss: hdmi: proper error logging
ASoC: Fix warnings and errors with llvm
sdm660_cdc: Reset cache_only mode for non SSR scenario
include: Fix for compilation issue
Makefile: Suppress few warnings with clang
kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS
kbuild: initialize CLANG_FLAGS correctly in the top Makefile
kbuild: consolidate Clang compiler flags
kbuild: add -no-integrated-as Clang option unconditionally
power: qpnp-fg-gen3: Fix warning with llvm
lkdtm: Fix warning with llvm
AndroidKernel: Explicitly mark certain targets as phony
dsp: q6asm: Change to increase asm sessions allowed
dsp: q6adm: Channel map configuration for multi-channel
defconfig: Create symbolic link for arm64 defconfigs
scripts/build-all: remove pattern-based defconfig detection
scripts/build-all: look for nested vendor/ defconfig directories
scripts/build-all: remove all defconfig manipulation options
scripts: build-all.py: update regex to compile all defconfigs
scripts: build-all.py: append llvm to the config file
scripts: Clean up the gcc-wrapper white list
scripts: set clang as REAL_CC to support LLVM by default
defconfig: auto: remove auto defconfigs
vgacon: Fix a UAF in vgacon_invert_region
soc: qcom: Reset string table index for each dump collection request
msm: adsprpc: Fix array index underflow problem
ath10k: remove unnecessary code
drm/msm/dsi: use correct enum in dsi_get_cmd_fmt
btrfs: Remove extra parentheses from condition in copy_items()
do_last(): fetch directory ->i_mode and ->i_uid before it's too late
Conflicts:
fs/namei.c
scripts/gcc-wrapper.py
Change-Id: Icfb78abcc0f2cf980b5c0ceaf40f108038b1b527
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build-all.py | 94 |
1 files changed, 31 insertions, 63 deletions
diff --git a/scripts/build-all.py b/scripts/build-all.py index 4f02c33d4248..2e88b7cb3f59 100755 --- a/scripts/build-all.py +++ b/scripts/build-all.py @@ -1,6 +1,6 @@ #! /usr/bin/env python2 -# Copyright (c) 2009-2015, The Linux Foundation. All rights reserved. +# Copyright (c) 2009-2015, 2017, 2019, The Linux Foundation. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -45,6 +45,7 @@ build_dir = '../all-kernels' make_command = ["vmlinux", "modules", "dtbs"] all_options = {} compile64 = os.environ.get('CROSS_COMPILE64') +clang_bin = os.environ.get('CLANG_BIN') def error(msg): sys.stderr.write("error: %s\n" % msg) @@ -230,7 +231,7 @@ class Builder(): self.name = name self.defconfig = defconfig - self.confname = self.defconfig.split('/')[-1] + self.confname = re.sub('arch/arm[64]*/configs/', '', self.defconfig) # Determine if this is a 64-bit target based on the location # of the defconfig. @@ -266,34 +267,30 @@ class Builder(): steps.append(ExecStep(['make', 'O=%s' % dest_dir, self.confname], env=self.make_env)) - if not all_options.updateconfigs: - # Build targets can be dependent upon the completion of - # previous build targets, so build them one at a time. + # Build targets can be dependent upon the completion of + # previous build targets, so build them one at a time. + if os.environ.get('ARCH') == "arm64": + cmd_line = ['make', + 'INSTALL_HDR_PATH=%s' % hdri_dir, + 'INSTALL_MOD_PATH=%s' % modi_dir, + 'O=%s' % dest_dir, + 'REAL_CC=%s' % clang_bin] + else: cmd_line = ['make', 'INSTALL_HDR_PATH=%s' % hdri_dir, 'INSTALL_MOD_PATH=%s' % modi_dir, 'O=%s' % dest_dir] - build_targets = [] - for c in make_command: - if re.match(r'^-{1,2}\w', c): - cmd_line.append(c) - else: - build_targets.append(c) - for t in build_targets: - 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 + build_targets = [] + for c in make_command: + if re.match(r'^-{1,2}\w', c): + cmd_line.append(c) + else: + build_targets.append(c) + for t in build_targets: + steps.append(ExecStep(cmd_line + [t], env=self.make_env)) -def update_config(file, str): - print 'Updating %s with \'%s\'\n' % (file, str) - with open(file, 'a') as defconfig: - defconfig.write(str + '\n') + return steps def scan_configs(): """Get the full list of defconfigs appropriate for this tree.""" @@ -303,21 +300,19 @@ def scan_configs(): r'apq*_defconfig', r'qsd*_defconfig', r'mpq*_defconfig', - r'sdm[0-9]*_defconfig', - ) - arch64_pats = ( - r'msm*_defconfig', - r'sdm[0-9]*_defconfig', + r'sdm*_defconfig', ) for p in arch_pats: for n in glob.glob('arch/arm/configs/' + p): name = os.path.basename(n)[:-10] names.append(Builder(name, n)) - if 'CROSS_COMPILE64' in os.environ: - for p in arch64_pats: - for n in glob.glob('arch/arm64/configs/' + p): - name = os.path.basename(n)[:-10] + "-64" - names.append(Builder(name, n)) + for defconfig in glob.glob('arch/arm*/configs/vendor/*_defconfig'): + target = os.path.basename(defconfig)[:-10] + name = target + "-llvm" + if 'arch/arm64' in defconfig: + name = name + "-64" + names.append(Builder(name, defconfig)) + return names def build_many(targets): @@ -333,8 +328,6 @@ def build_many(targets): tracker = BuildTracker(parallel) for target in targets: - if all_options.updateconfigs: - update_config(target.defconfig, all_options.updateconfigs) steps = target.build() tracker.add_sequence(target.log_name, target.name, steps) tracker.run() @@ -350,25 +343,14 @@ def main(): usage = (""" %prog [options] all -- Build all 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.add_option('--configs', action='store_true', - dest='configs', - help="Copy configs back into tree") parser.add_option('--list', action='store_true', dest='list', help='List available targets') parser.add_option('-v', '--verbose', action='store_true', dest='verbose', 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", help="Number of simultaneous jobs") parser.add_option('-l', '--load-average', type='int', @@ -391,25 +373,11 @@ def main(): print " %s" % target.name sys.exit(0) - if options.oldconfig: - make_command = ["oldconfig"] - elif options.make_target: + if options.make_target: make_command = options.make_target if args == ['all']: 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: all_configs = {} for t in configs: |