diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ed1b6421..b68d226b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,2 +1,2 @@ -*.py @MSF-Jarvis @nathanchance @nickdesaulniers @stephenhines -*.sh @MSF-Jarvis @nathanchance @nickdesaulniers @stephenhines +*.py @msfjarvis @nathanchance @nickdesaulniers @stephenhines +*.sh @msfjarvis @nathanchance @nickdesaulniers @stephenhines diff --git a/README.md b/README.md index 5d4ae5e2..d881f7ce 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ There are times where a tip of tree LLVM build will have some issue fixed and it * clang/gcc + ld.gold * clang/gcc + ld.bfd -It also aims to make kernel compilation go a little bit faster by generating a toolchain that is optimized for the host CPU (using `-O2 -march=native -mtune=native`). - ## Getting started These scripts have been tested in a Docker image of the following distributions, with the following packages installed: diff --git a/build-binutils.py b/build-binutils.py index cb546693..021b4397 100755 --- a/build-binutils.py +++ b/build-binutils.py @@ -18,6 +18,7 @@ def host_arch_target(): """ host_mapping = { "armv7l": "arm", + "ppc64": "powerpc64", "ppc64le": "powerpc64le", "ppc": "powerpc" } @@ -75,7 +76,8 @@ def parse_parameters(root_folder): "--targets", help=""" The script can build binutils targeting arm-linux-gnueabi, aarch64-linux-gnu, - powerpc-linux-gnu, powerpc64le-linux-gnu, and x86_64-linux-gnu. + mipsel-linux-gnu, powerpc-linux-gnu, powerpc64-linux-gnu, powerpc64le-linux-gnu, + and x86_64-linux-gnu. You can either pass the full target or just the first part (arm, aarch64, x86_64, etc) or all if you want to build all targets (which is the default). It will only add the @@ -103,6 +105,8 @@ def create_targets(targets): targets_dict = { "arm": "arm-linux-gnueabi", "aarch64": "aarch64-linux-gnu", + "mipsel": "mipsel-linux-gnu", + "powerpc64": "powerpc64-linux-gnu", "powerpc64le": "powerpc64le-linux-gnu", "powerpc": "powerpc-linux-gnu", "x86_64": "x86_64-linux-gnu" @@ -131,7 +135,8 @@ def cleanup(build_folder): build_folder.mkdir(parents=True, exist_ok=True) -def invoke_configure(build_folder, install_folder, root_folder, target, host_arch): +def invoke_configure(build_folder, install_folder, root_folder, target, + host_arch): """ Invokes the configure script to generate a Makefile :param build_folder: Build directory @@ -143,8 +148,7 @@ def invoke_configure(build_folder, install_folder, root_folder, target, host_arc configure = [ root_folder.joinpath(utils.current_binutils(), "configure").as_posix(), '--prefix=%s' % install_folder.as_posix(), - '--enable-deterministic-archives', '--enable-gold', - '--enable-ld=default', '--enable-plugins', '--quiet', + '--enable-deterministic-archives', '--enable-plugins', '--quiet', 'CFLAGS=-O2 -march=%s -mtune=%s' % (host_arch, host_arch), 'CXXFLAGS=-O2 -march=%s -mtune=%s' % (host_arch, host_arch) ] @@ -154,6 +158,12 @@ def invoke_configure(build_folder, install_folder, root_folder, target, host_arc '--with-gnu-ld', '--with-sysroot=%s' % install_folder.joinpath(target).as_posix() ], + "mipsel-linux-gnu": [ + '--disable-compressed-debug-sections', '--enable-new-dtags', + '--enable-shared', + '--enable-targets=mips64el-linux-gnuabi64,mips64el-linux-gnuabin32', + '--enable-threads' + ], "powerpc-linux-gnu": [ '--enable-lto', '--enable-relro', '--enable-shared', '--enable-threads', '--disable-gdb', '--disable-sim', @@ -166,7 +176,9 @@ def invoke_configure(build_folder, install_folder, root_folder, target, host_arc ] } configure_arch_flags['aarch64-linux-gnu'] = configure_arch_flags[ - 'arm-linux-gnueabi'] + 'arm-linux-gnueabi'] + ['--enable-ld=default', '--enable-gold'] + configure_arch_flags['powerpc64-linux-gnu'] = configure_arch_flags[ + 'powerpc-linux-gnu'] configure_arch_flags['powerpc64le-linux-gnu'] = configure_arch_flags[ 'powerpc-linux-gnu'] @@ -214,7 +226,8 @@ def build_targets(build, install_folder, root_folder, targets, host_arch): for target in targets: build_folder = build.joinpath(target) cleanup(build_folder) - invoke_configure(build_folder, install_folder, root_folder, target, host_arch) + invoke_configure(build_folder, install_folder, root_folder, target, + host_arch) invoke_make(build_folder, install_folder, target) diff --git a/build-llvm.py b/build-llvm.py index 93f51dd6..932ac1bd 100755 --- a/build-llvm.py +++ b/build-llvm.py @@ -12,15 +12,19 @@ import time import utils +# This is a known good revision of LLVM for building the kernel +# To bump this, run 'PATH_OVERRIDE=/bin kernel/build.sh --allyesconfig' +GOOD_REVISION = '9aeab53eba0a63829a7f6f8ba878a257530a2dd7' -class Directories(): + +class Directories: def __init__(self, build_folder, install_folder, root_folder): self.build_folder = build_folder self.install_folder = install_folder self.root_folder = root_folder -class EnvVars(): +class EnvVars: def __init__(self, cc, cxx, ld): self.cc = cc self.cxx = cxx @@ -31,6 +35,7 @@ def clang_version(cc, root_folder): """ Returns Clang's version as an integer :param cc: The compiler to check the version of + :param root_folder: Top of the script folder :return: an int denoting the version of the given compiler """ command = [root_folder.joinpath("clang-version.sh").as_posix(), cc] @@ -45,6 +50,13 @@ def parse_parameters(root_folder): """ parser = argparse.ArgumentParser( formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument("--assertions", + help=textwrap.dedent("""\ + In a release configuration, assertions are not enabled. Assertions can help catch + issues when compiling but it will increase compile times by 15-20%%. + + """), + action="store_true") parser.add_argument("-b", "--branch", help=textwrap.dedent("""\ @@ -83,6 +95,31 @@ def parse_parameters(root_folder): """), action="store_true") + parser.add_argument("--build-type", + metavar='BUILD_TYPE', + help=textwrap.dedent("""\ + By default, the script does a Release build; Debug may be useful for tracking down + particularly nasty bugs. + + See https://llvm.org/docs/GettingStarted.html#compiling-the-llvm-suite-source-code for + more information. + + """), + type=str, + choices=['Release', 'Debug', 'RelWithDebInfo', 'MinSizeRel'], + default="Release") + parser.add_argument("--check-targets", + help=textwrap.dedent("""\ + By default, no testing is run on the toolchain. If you would like to run unit/regression + tests, use this parameter to specify a list of check targets to run with ninja. Common + ones include check-llvm, check-clang, and check-lld. + + The values passed to this parameter will be automatically concatenated with 'check-'. + + Example: '--check-targets clang llvm' will make ninja invokve 'check-clang' and 'check-llvm'. + + """), + nargs="+") parser.add_argument("--clang-vendor", help=textwrap.dedent("""\ Add this value to the clang version string (like "Apple clang version..." or @@ -94,17 +131,6 @@ def parse_parameters(root_folder): """), type=str, default="ClangBuiltLinux") - parser.add_argument("-d", - "--debug", - help=textwrap.dedent("""\ - By default, the script builds LLVM in the release configuration with all of - the tests turned off and optimization at O2. This disables that optimization, - builds the tests, and changes the configuration to debug. This can help with - reporting problems to LLVM developers but will make compilation of both LLVM - and the kernel go slower. - - """), - action="store_true") parser.add_argument("-i", "--incremental", help=textwrap.dedent("""\ @@ -155,10 +181,17 @@ def parse_parameters(root_folder): """), type=str) parser.add_argument("-n", - "--no-pull", + "--no-update", help=textwrap.dedent("""\ By default, the script always updates the LLVM repo before building. This prevents - that, which can be helpful during something like bisecting. + that, which can be helpful during something like bisecting or manually managing the + repo to pin it to a particular revision. + + """), + action="store_true") + parser.add_argument("--no-ccache", + help=textwrap.dedent("""\ + Don't enable LLVM_CCACHE_BUILD. Useful for benchmarking clean builds. """), action="store_true") @@ -197,15 +230,24 @@ def parse_parameters(root_folder): "--targets", help=textwrap.dedent("""\ LLVM is multitargeted by default. Currently, this script only enables the arm32, aarch64, - powerpc, and x86 backends because that's what the Linux kernel is currently concerned with. - If you would like to override this, you can use this parameter and supply a list that is + mips, powerpc, and x86 backends because that's what the Linux kernel is currently concerned + with. If you would like to override this, you can use this parameter and supply a list that is supported by LLVM_TARGETS_TO_BUILD: https://llvm.org/docs/CMake.html#llvm-specific-variables Example: -t "AArch64;X86" """), type=str, - default="AArch64;ARM;PowerPC;X86") + default="AArch64;ARM;Mips;PowerPC;X86") + parser.add_argument("--use-good-revision", + help=textwrap.dedent("""\ + By default, the script updates LLVM to the latest tip of tree revision, which may at times be + broken or not work right. With this option, it will checkout a known good revision of LLVM + that builds and works properly. If you use this option often, please remember to update the + script as the known good revision will change. + + """), + action="store_true") return parser.parse_args() @@ -224,6 +266,17 @@ def linker_test(cc, ld): stderr=subprocess.DEVNULL).returncode +def versioned_binaries(binary_name): + """ + Returns a list of versioned binaries that may be used on Debian/Ubuntu + :param binary_name: The name of the binary that we're checking for + :return: List of versioned binaries + """ + + # There might be clang-6 to clang-10 + return ['%s-%s' % (binary_name, i) for i in range(10, 5, -1)] + + def check_cc_ld_variables(root_folder): """ Sets the cc, cxx, and ld variables, which will be passed to cmake @@ -236,7 +289,7 @@ def check_cc_ld_variables(root_folder): cc = shutil.which(os.environ['CC']) # Otherwise, try to find one else: - possible_compilers = ['clang-9', 'clang-8', 'clang-7', 'clang', 'gcc'] + possible_compilers = versioned_binaries("clang") + ['clang', 'gcc'] for compiler in possible_compilers: cc = shutil.which(compiler) if cc is not None: @@ -282,8 +335,8 @@ def check_cc_ld_variables(root_folder): else: # and we're using clang, try to find the fastest one if "clang" in cc: - possible_linkers = [ - 'lld-9', 'lld-8', 'lld-7', 'lld', 'gold', 'bfd' + possible_linkers = versioned_binaries("lld") + [ + 'lld', 'gold', 'bfd' ] for linker in possible_linkers: # We want to find lld wherever the clang we are using is located @@ -343,9 +396,27 @@ def fetch_llvm_binutils(root_folder, update, ref, shallow=False): if update: utils.print_header("Updating LLVM") subprocess.run( - ["git", "-C", p.as_posix(), "checkout", ref], check=True) + ["git", "-C", p.as_posix(), "fetch", "origin"], check=True) subprocess.run( - ["git", "-C", p.as_posix(), "pull", "--rebase"], check=True) + ["git", "-C", p.as_posix(), "checkout", ref], check=True) + local_ref = None + try: + local_ref = subprocess.check_output( + ["git", "-C", + p.as_posix(), "symbolic-ref", "-q", + "HEAD"]).decode("utf-8") + except subprocess.CalledProcessError: + # This is thrown when we're on a revision that cannot be mapped to a symbolic reference, like a tag + # or a git hash. Swallow and move on with the rest of our business. + pass + if local_ref and local_ref.startswith("refs/heads/"): + # This is a branch, pull from remote + subprocess.run([ + "git", "-C", + p.as_posix(), "pull", "origin", + local_ref.strip().replace("refs/heads/", ""), "--rebase" + ], + check=True) else: extra_args = ("--depth", "1") if shallow else () utils.print_header("Downloading LLVM") @@ -593,7 +664,7 @@ def stage_specific_cmake_defines(args, dirs, stage): # Use ccache for the stage 1 build as it will usually be done with a consistent # compiler and won't need a full rebuild very often - if stage == 1 and shutil.which("ccache") is not None: + if stage == 1 and not args.no_ccache and shutil.which("ccache"): defines['LLVM_CCACHE_BUILD'] = 'ON' if bootstrap_stage(args, stage): @@ -604,15 +675,17 @@ def stage_specific_cmake_defines(args, dirs, stage): defines['LLVM_INCLUDE_TESTS'] = 'OFF' defines['LLVM_INCLUDE_UTILS'] = 'OFF' else: - # If a debug build was requested - if args.debug: - defines['CMAKE_BUILD_TYPE'] = 'Debug' - defines['LLVM_BUILD_TESTS'] = 'ON' - # If a release build was requested - else: - defines['CMAKE_BUILD_TYPE'] = 'Release' + # https://llvm.org/docs/CMake.html#frequently-used-cmake-variables + defines['CMAKE_BUILD_TYPE'] = args.build_type + + # We don't care about warnings if we are building a release build + if args.build_type == "Release": defines['LLVM_ENABLE_WARNINGS'] = 'OFF' - defines['LLVM_INCLUDE_TESTS'] = 'OFF' + + # Build with assertions enabled if requested (will slow down compilation + # so it is not on by default) + if args.assertions: + defines['LLVM_ENABLE_ASSERTIONS'] = 'ON' # Where the toolchain should be installed defines['CMAKE_INSTALL_PREFIX'] = dirs.install_folder.as_posix() @@ -657,8 +730,10 @@ def build_cmake_defines(args, dirs, env_vars, stage): # Add {-march,-mtune} flags if the user wants them if args.march: - defines['CMAKE_C_FLAGS'] = '-march=%s -mtune=%s' % (args.march, args.march) - defines['CMAKE_CXX_FLAGS'] = '-march=%s -mtune=%s' % (args.march, args.march) + defines['CMAKE_C_FLAGS'] = '-march=%s -mtune=%s' % (args.march, + args.march) + defines['CMAKE_CXX_FLAGS'] = '-march=%s -mtune=%s' % (args.march, + args.march) # Add the vendor string if necessary if args.clang_vendor: @@ -711,6 +786,7 @@ def invoke_ninja(args, dirs, stage): Invoke ninja to run the actual build :param args: The args variable generated by parse_parameters :param dirs: An instance of the Directories class with the paths to use + :param stage: The current stage we're building :return: """ utils.print_header("Building LLVM stage %d" % stage) @@ -729,6 +805,12 @@ def invoke_ninja(args, dirs, stage): subprocess.run('ninja', check=True, cwd=build_folder) + if args.check_targets and stage == get_final_stage(args): + subprocess.run(['ninja'] + + ['check-%s' % s for s in args.check_targets], + check=True, + cwd=build_folder) + print() print("LLVM build duration: " + str(datetime.timedelta(seconds=int(time.time() - time_started)))) @@ -807,7 +889,11 @@ def main(): env_vars = EnvVars(*check_cc_ld_variables(root_folder)) check_dependencies() - fetch_llvm_binutils(root_folder, not args.no_pull, args.branch, args.shallow_clone) + if args.use_good_revision: + ref = GOOD_REVISION + else: + ref = args.branch + fetch_llvm_binutils(root_folder, not args.no_update, ref, args.shallow_clone) cleanup(build_folder, args.incremental) dirs = Directories(build_folder, install_folder, root_folder) do_multistage_build(args, dirs, env_vars) diff --git a/kernel/build.sh b/kernel/build.sh index c00da4f0..650e9ce4 100755 --- a/kernel/build.sh +++ b/kernel/build.sh @@ -7,6 +7,8 @@ TC_BLD=$(cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/.. && pwd) # Parse parameters while (( ${#} )); do case ${1} in + "--allyesconfig") + CONFIG_TARGET=allyesconfig ;; "-b"|"--build-folder") shift BUILD_FOLDER=${1} ;; @@ -31,7 +33,7 @@ while (( ${#} )); do esac shift done -[[ -z ${TARGETS} ]] && TARGETS=( "arm-linux-gnueabi" "aarch64-linux-gnu" "powerpc-linux-gnu" "powerpc64le-linux-gnu" "x86_64-linux-gnu" ) +[[ -z ${TARGETS[*]} ]] && TARGETS=( "arm-linux-gnueabi" "aarch64-linux-gnu" "powerpc-linux-gnu" "powerpc64le-linux-gnu" "x86_64-linux-gnu" ) # Add the default install bin folder to PATH for binutils # Add the stage 2 bin folder to PATH for the instrumented clang @@ -48,7 +50,7 @@ if [[ -n ${SRC_FOLDER} ]]; then else LINUX=linux-5.2 LINUX_TARBALL=${TC_BLD}/kernel/${LINUX}.tar.xz - LINUX_PATCH=${TC_BLD}/kernel/${LINUX}.patch + LINUX_PATCH=${TC_BLD}/kernel/${LINUX}-${CONFIG_TARGET:=defconfig}.patch # If we don't have the source tarball, download and verify it if [[ ! -f ${LINUX_TARBALL} ]]; then @@ -64,7 +66,7 @@ else [[ -f ${LINUX_PATCH} ]] && rm -rf ${LINUX} [[ -d ${LINUX} ]] || { tar -xf "${LINUX_TARBALL}" || exit ${?}; } cd ${LINUX} || exit 1 - [[ -f ${LINUX_PATCH} ]] && patch -p1 < "${LINUX_PATCH}" + [[ -f ${LINUX_PATCH} ]] && { git apply "${LINUX_PATCH}" || exit ${?}; } fi # Check for all binutils and build them if necessary @@ -86,10 +88,10 @@ MAKE=( make -j"$(nproc)" CC=clang O=out ) for TARGET in "${TARGETS[@]}"; do case ${TARGET} in - "arm-linux-gnueabi") time "${MAKE[@]}" ARCH=arm CROSS_COMPILE=${TARGET}- LD=ld.lld distclean defconfig zImage modules || exit ${?} ;; - "aarch64-linux-gnu") time "${MAKE[@]}" ARCH=arm64 CROSS_COMPILE=${TARGET}- LD=ld.lld distclean defconfig Image.gz modules || exit ${?} ;; - "powerpc-linux-gnu") time "${MAKE[@]}" ARCH=powerpc CROSS_COMPILE=${TARGET}- distclean ppc44x_defconfig zImage modules || exit ${?} ;; - "powerpc64le-linux-gnu") time "${MAKE[@]}" ARCH=powerpc CROSS_COMPILE=${TARGET}- distclean powernv_defconfig zImage.epapr modules || exit ${?} ;; - "x86_64-linux-gnu") time "${MAKE[@]}" LD=ld.lld O=out distclean defconfig bzImage modules || exit ${?} ;; + "arm-linux-gnueabi") time "${MAKE[@]}" ARCH=arm CROSS_COMPILE="${TARGET}-" LD=ld.lld distclean "${CONFIG_TARGET}" zImage modules || exit ${?} ;; + "aarch64-linux-gnu") time "${MAKE[@]}" ARCH=arm64 CROSS_COMPILE="${TARGET}-" LD=ld.lld distclean "${CONFIG_TARGET}" Image.gz modules || exit ${?} ;; + "powerpc-linux-gnu") time "${MAKE[@]}" ARCH=powerpc CROSS_COMPILE="${TARGET}-" distclean ppc44x_defconfig zImage modules || exit ${?} ;; + "powerpc64le-linux-gnu") time "${MAKE[@]}" ARCH=powerpc CROSS_COMPILE="${TARGET}-" distclean powernv_defconfig zImage.epapr modules || exit ${?} ;; + "x86_64-linux-gnu") time "${MAKE[@]}" LD=ld.lld O=out distclean "${CONFIG_TARGET}" bzImage modules || exit ${?} ;; esac done diff --git a/kernel/linux-5.2-allyesconfig.patch b/kernel/linux-5.2-allyesconfig.patch new file mode 100644 index 00000000..08f4d5bb --- /dev/null +++ b/kernel/linux-5.2-allyesconfig.patch @@ -0,0 +1,761 @@ +From f511aeabd58d25879aa222caf71bf5905927fc4f Mon Sep 17 00:00:00 2001 +From: Pierre-Louis Bossart +Date: Thu, 30 May 2019 06:50:11 -0500 +Subject: [PATCH 1/4] ASoC: Intel: use common helpers to detect CPUs + +We have duplicated code in multiple locations (atom, machine drivers, +SOF) to detect Baytrail, Cherrytrail and other SOCs. This is not very +elegant, and introduces dependencies on CONFIG_X86 that prevent +COMPILE_TEST from working. + +Add common helpers to provide same functionality in a cleaner +way. This will also help support the DMI-based quirks being introduced +to handle SOF/SST autodetection. + +Reviewed-by: Takashi Iwai +Signed-off-by: Pierre-Louis Bossart +Signed-off-by: Mark Brown +(am from https://git.kernel.org/broonie/sound/c/536cfd2f375d36f4316c0b93bb9e0eaf78e0ef6c) +Signed-off-by: Nathan Chancellor +--- + sound/soc/intel/atom/sst/sst_acpi.c | 65 +--------- + sound/soc/intel/boards/bxt_da7219_max98357a.c | 11 +- + sound/soc/intel/boards/bytcht_es8316.c | 12 +- + sound/soc/intel/boards/bytcr_rt5640.c | 16 +-- + sound/soc/intel/boards/bytcr_rt5651.c | 17 +-- + sound/soc/intel/boards/cht_bsw_rt5645.c | 16 +-- + sound/soc/intel/boards/sof_rt5682.c | 11 +- + sound/soc/intel/common/soc-intel-quirks.h | 115 ++++++++++++++++++ + sound/soc/sof/sof-acpi-dev.c | 57 +-------- + 9 files changed, 135 insertions(+), 185 deletions(-) + create mode 100644 sound/soc/intel/common/soc-intel-quirks.h + +diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c +index f1f4aadb6683..b728fb56ea4d 100644 +--- a/sound/soc/intel/atom/sst/sst_acpi.c ++++ b/sound/soc/intel/atom/sst/sst_acpi.c +@@ -28,12 +28,11 @@ + #include + #include + #include +-#include +-#include + #include + #include + #include "../sst-mfld-platform.h" + #include "../../common/sst-dsp.h" ++#include "../../common/soc-intel-quirks.h" + #include "sst.h" + + /* LPE viewpoint addresses */ +@@ -233,64 +232,6 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx) + return 0; + } + +-static int is_byt(void) +-{ +- bool status = false; +- static const struct x86_cpu_id cpu_ids[] = { +- { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */ +- {} +- }; +- if (x86_match_cpu(cpu_ids)) +- status = true; +- return status; +-} +- +-static bool is_byt_cr(struct platform_device *pdev) +-{ +- struct device *dev = &pdev->dev; +- int status = 0; +- +- if (!is_byt()) +- return false; +- +- if (iosf_mbi_available()) { +- u32 bios_status; +- status = iosf_mbi_read(BT_MBI_UNIT_PMC, /* 0x04 PUNIT */ +- MBI_REG_READ, /* 0x10 */ +- 0x006, /* BIOS_CONFIG */ +- &bios_status); +- +- if (status) { +- dev_err(dev, "could not read PUNIT BIOS_CONFIG\n"); +- } else { +- /* bits 26:27 mirror PMIC options */ +- bios_status = (bios_status >> 26) & 3; +- +- if (bios_status == 1 || bios_status == 3) { +- dev_info(dev, "Detected Baytrail-CR platform\n"); +- return true; +- } +- +- dev_info(dev, "BYT-CR not detected\n"); +- } +- } else { +- dev_info(dev, "IOSF_MBI not available, no BYT-CR detection\n"); +- } +- +- if (platform_get_resource(pdev, IORESOURCE_IRQ, 5) == NULL) { +- /* +- * Some devices detected as BYT-T have only a single IRQ listed, +- * causing platform_get_irq with index 5 to return -ENXIO. +- * The correct IRQ in this case is at index 0, as on BYT-CR. +- */ +- dev_info(dev, "Falling back to Baytrail-CR platform\n"); +- return true; +- } +- +- return false; +-} +- +- + static int sst_acpi_probe(struct platform_device *pdev) + { + struct device *dev = &pdev->dev; +@@ -315,7 +256,7 @@ static int sst_acpi_probe(struct platform_device *pdev) + return -ENODEV; + } + +- if (is_byt()) ++ if (soc_intel_is_byt()) + mach->pdata = &byt_rvp_platform_data; + else + mach->pdata = &chv_platform_data; +@@ -333,7 +274,7 @@ static int sst_acpi_probe(struct platform_device *pdev) + if (ret < 0) + return ret; + +- if (is_byt_cr(pdev)) { ++ if (soc_intel_is_byt_cr(pdev)) { + /* override resource info */ + byt_rvp_platform_data.res_info = &bytcr_res_info; + } +diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c +index 1c4f4c124b00..3f91bc457474 100644 +--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c ++++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c +@@ -8,7 +8,6 @@ + * Intel Skylake I2S Machine driver + */ + +-#include + #include + #include + #include +@@ -21,6 +20,7 @@ + #include "../../codecs/hdac_hdmi.h" + #include "../../codecs/da7219.h" + #include "../../codecs/da7219-aad.h" ++#include "../common/soc-intel-quirks.h" + + #define BXT_DIALOG_CODEC_DAI "da7219-hifi" + #define BXT_MAXIM_CODEC_DAI "HiFi" +@@ -560,11 +560,6 @@ static struct snd_soc_dai_link broxton_dais[] = { + }, + }; + +-static const struct x86_cpu_id glk_ids[] = { +- { X86_VENDOR_INTEL, 6, 0x7A }, /* Geminilake CPU_ID */ +- {} +-}; +- + #define NAME_SIZE 32 + static int bxt_card_late_probe(struct snd_soc_card *card) + { +@@ -574,7 +569,7 @@ static int bxt_card_late_probe(struct snd_soc_card *card) + int err, i = 0; + char jack_name[NAME_SIZE]; + +- if (x86_match_cpu(glk_ids)) ++ if (soc_intel_is_glk()) + snd_soc_dapm_add_routes(&card->dapm, gemini_map, + ARRAY_SIZE(gemini_map)); + else +@@ -637,7 +632,7 @@ static int broxton_audio_probe(struct platform_device *pdev) + + broxton_audio_card.dev = &pdev->dev; + snd_soc_card_set_drvdata(&broxton_audio_card, ctx); +- if (x86_match_cpu(glk_ids)) { ++ if (soc_intel_is_glk()) { + unsigned int i; + + broxton_audio_card.name = "glkda7219max"; +diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c +index 2fe1ce879123..e7fc4f1707e6 100644 +--- a/sound/soc/intel/boards/bytcht_es8316.c ++++ b/sound/soc/intel/boards/bytcht_es8316.c +@@ -22,8 +22,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + #include +@@ -32,6 +30,7 @@ + #include + #include "../atom/sst-atom-controls.h" + #include "../common/sst-dsp.h" ++#include "../common/soc-intel-quirks.h" + + /* jd-inv + terminating entry */ + #define MAX_NO_PROPS 2 +@@ -422,11 +421,6 @@ static struct snd_soc_card byt_cht_es8316_card = { + .resume_post = byt_cht_es8316_resume, + }; + +-static const struct x86_cpu_id baytrail_cpu_ids[] = { +- { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT }, /* Valleyview */ +- {} +-}; +- + static const struct acpi_gpio_params first_gpio = { 0, 0, false }; + + static const struct acpi_gpio_mapping byt_cht_es8316_gpios[] = { +@@ -499,8 +493,8 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) + dmi_id = dmi_first_match(byt_cht_es8316_quirk_table); + if (dmi_id) { + quirk = (unsigned long)dmi_id->driver_data; +- } else if (x86_match_cpu(baytrail_cpu_ids) && +- mach->mach_params.acpi_ipc_irq_index == 0) { ++ } else if (soc_intel_is_byt() && ++ mach->mach_params.acpi_ipc_irq_index == 0) { + /* On BYTCR default to SSP0, internal-mic-in2-map, mono-spk */ + quirk = BYT_CHT_ES8316_SSP0 | BYT_CHT_ES8316_INTMIC_IN2_MAP | + BYT_CHT_ES8316_MONO_SPEAKER; +diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c +index b906cfd5f97d..1e100ae4ba8e 100644 +--- a/sound/soc/intel/boards/bytcr_rt5640.c ++++ b/sound/soc/intel/boards/bytcr_rt5640.c +@@ -20,7 +20,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -30,6 +29,7 @@ + #include "../../codecs/rt5640.h" + #include "../atom/sst-atom-controls.h" + #include "../common/sst-dsp.h" ++#include "../common/soc-intel-quirks.h" + + enum { + BYT_RT5640_DMIC1_MAP, +@@ -1122,18 +1122,6 @@ static struct snd_soc_card byt_rt5640_card = { + .resume_post = byt_rt5640_resume, + }; + +-static bool is_valleyview(void) +-{ +- static const struct x86_cpu_id cpu_ids[] = { +- { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */ +- {} +- }; +- +- if (!x86_match_cpu(cpu_ids)) +- return false; +- return true; +-} +- + struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */ + u64 aif_value; /* 1: AIF1, 2: AIF2 */ + u64 mclock_value; /* usually 25MHz (0x17d7940), ignored */ +@@ -1182,7 +1170,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) + * swap SSP0 if bytcr is detected + * (will be overridden if DMI quirk is detected) + */ +- if (is_valleyview()) { ++ if (soc_intel_is_byt()) { + if (mach->mach_params.acpi_ipc_irq_index == 0) + is_bytcr = true; + } +diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c +index c7b627137a62..6db773e03591 100644 +--- a/sound/soc/intel/boards/bytcr_rt5651.c ++++ b/sound/soc/intel/boards/bytcr_rt5651.c +@@ -22,8 +22,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + #include +@@ -31,6 +29,7 @@ + #include + #include "../../codecs/rt5651.h" + #include "../atom/sst-atom-controls.h" ++#include "../common/soc-intel-quirks.h" + + enum { + BYT_RT5651_DMIC_MAP, +@@ -844,16 +843,6 @@ static struct snd_soc_card byt_rt5651_card = { + .resume_post = byt_rt5651_resume, + }; + +-static const struct x86_cpu_id baytrail_cpu_ids[] = { +- { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT }, /* Valleyview */ +- {} +-}; +- +-static const struct x86_cpu_id cherrytrail_cpu_ids[] = { +- { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_AIRMONT }, /* Braswell */ +- {} +-}; +- + static const struct acpi_gpio_params ext_amp_enable_gpios = { 0, 0, false }; + + static const struct acpi_gpio_mapping cht_rt5651_gpios[] = { +@@ -924,7 +913,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) + * swap SSP0 if bytcr is detected + * (will be overridden if DMI quirk is detected) + */ +- if (x86_match_cpu(baytrail_cpu_ids)) { ++ if (soc_intel_is_byt()) { + if (mach->mach_params.acpi_ipc_irq_index == 0) + is_bytcr = true; + } +@@ -993,7 +982,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) + } + + /* Cherry Trail devices use an external amplifier enable gpio */ +- if (x86_match_cpu(cherrytrail_cpu_ids) && !byt_rt5651_gpios) ++ if (soc_intel_is_cht() && !byt_rt5651_gpios) + byt_rt5651_gpios = cht_rt5651_gpios; + + if (byt_rt5651_gpios) { +diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c +index 2c07ec8b42ae..f331cdab9c08 100644 +--- a/sound/soc/intel/boards/cht_bsw_rt5645.c ++++ b/sound/soc/intel/boards/cht_bsw_rt5645.c +@@ -18,7 +18,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -26,6 +25,7 @@ + #include + #include "../../codecs/rt5645.h" + #include "../atom/sst-atom-controls.h" ++#include "../common/soc-intel-quirks.h" + + #define CHT_PLAT_CLK_3_HZ 19200000 + #define CHT_CODEC_DAI1 "rt5645-aif1" +@@ -501,18 +501,6 @@ static char cht_rt5645_codec_name[SND_ACPI_I2C_ID_LEN]; + static char cht_rt5645_codec_aif_name[12]; /* = "rt5645-aif[1|2]" */ + static char cht_rt5645_cpu_dai_name[10]; /* = "ssp[0|2]-port" */ + +-static bool is_valleyview(void) +-{ +- static const struct x86_cpu_id cpu_ids[] = { +- { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */ +- {} +- }; +- +- if (!x86_match_cpu(cpu_ids)) +- return false; +- return true; +-} +- + struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */ + u64 aif_value; /* 1: AIF1, 2: AIF2 */ + u64 mclock_value; /* usually 25MHz (0x17d7940), ignored */ +@@ -577,7 +565,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) + * swap SSP0 if bytcr is detected + * (will be overridden if DMI quirk is detected) + */ +- if (is_valleyview()) { ++ if (soc_intel_is_byt()) { + if (mach->mach_params.acpi_ipc_irq_index == 0) + is_bytcr = true; + } +diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c +index 3343dbcd506f..e362b71c0419 100644 +--- a/sound/soc/intel/boards/sof_rt5682.c ++++ b/sound/soc/intel/boards/sof_rt5682.c +@@ -10,8 +10,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + #include +@@ -21,6 +19,7 @@ + #include + #include "../../codecs/rt5682.h" + #include "../../codecs/hdac_hdmi.h" ++#include "../common/soc-intel-quirks.h" + + #define NAME_SIZE 32 + +@@ -304,12 +303,6 @@ static struct snd_soc_card sof_audio_card_rt5682 = { + .late_probe = sof_card_late_probe, + }; + +-static const struct x86_cpu_id legacy_cpi_ids[] = { +- { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_SILVERMONT }, /* Baytrail */ +- { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_AIRMONT }, /* Cherrytrail */ +- {} +-}; +- + static struct snd_soc_dai_link_component rt5682_component[] = { + { + .name = "i2c-10EC5682:00", +@@ -498,7 +491,7 @@ static int sof_audio_probe(struct platform_device *pdev) + if (!ctx) + return -ENOMEM; + +- if (x86_match_cpu(legacy_cpi_ids)) { ++ if (soc_intel_is_byt() || soc_intel_is_cht()) { + is_legacy_cpu = 1; + dmic_num = 0; + hdmi_num = 0; +diff --git a/sound/soc/intel/common/soc-intel-quirks.h b/sound/soc/intel/common/soc-intel-quirks.h +new file mode 100644 +index 000000000000..4718fd3cf636 +--- /dev/null ++++ b/sound/soc/intel/common/soc-intel-quirks.h +@@ -0,0 +1,115 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++/* ++ * soc-intel-quirks.h - prototypes for quirk autodetection ++ * ++ * Copyright (c) 2019, Intel Corporation. ++ * ++ */ ++ ++#ifndef _SND_SOC_INTEL_QUIRKS_H ++#define _SND_SOC_INTEL_QUIRKS_H ++ ++#if IS_ENABLED(CONFIG_X86) ++ ++#include ++#include ++#include ++ ++#define ICPU(model) { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, } ++ ++#define SOC_INTEL_IS_CPU(soc, type) \ ++static inline bool soc_intel_is_##soc(void) \ ++{ \ ++ static const struct x86_cpu_id soc##_cpu_ids[] = { \ ++ ICPU(type), \ ++ {} \ ++ }; \ ++ const struct x86_cpu_id *id; \ ++ \ ++ id = x86_match_cpu(soc##_cpu_ids); \ ++ if (id) \ ++ return true; \ ++ return false; \ ++} ++ ++SOC_INTEL_IS_CPU(byt, INTEL_FAM6_ATOM_SILVERMONT); ++SOC_INTEL_IS_CPU(cht, INTEL_FAM6_ATOM_AIRMONT); ++SOC_INTEL_IS_CPU(apl, INTEL_FAM6_ATOM_GOLDMONT); ++SOC_INTEL_IS_CPU(glk, INTEL_FAM6_ATOM_GOLDMONT_PLUS); ++ ++static inline bool soc_intel_is_byt_cr(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ int status = 0; ++ ++ if (!soc_intel_is_byt()) ++ return false; ++ ++ if (iosf_mbi_available()) { ++ u32 bios_status; ++ ++ status = iosf_mbi_read(BT_MBI_UNIT_PMC, /* 0x04 PUNIT */ ++ MBI_REG_READ, /* 0x10 */ ++ 0x006, /* BIOS_CONFIG */ ++ &bios_status); ++ ++ if (status) { ++ dev_err(dev, "could not read PUNIT BIOS_CONFIG\n"); ++ } else { ++ /* bits 26:27 mirror PMIC options */ ++ bios_status = (bios_status >> 26) & 3; ++ ++ if (bios_status == 1 || bios_status == 3) { ++ dev_info(dev, "Detected Baytrail-CR platform\n"); ++ return true; ++ } ++ ++ dev_info(dev, "BYT-CR not detected\n"); ++ } ++ } else { ++ dev_info(dev, "IOSF_MBI not available, no BYT-CR detection\n"); ++ } ++ ++ if (!platform_get_resource(pdev, IORESOURCE_IRQ, 5)) { ++ /* ++ * Some devices detected as BYT-T have only a single IRQ listed, ++ * causing platform_get_irq with index 5 to return -ENXIO. ++ * The correct IRQ in this case is at index 0, as on BYT-CR. ++ */ ++ dev_info(dev, "Falling back to Baytrail-CR platform\n"); ++ return true; ++ } ++ ++ return false; ++} ++ ++#else ++ ++static inline bool soc_intel_is_byt_cr(struct platform_device *pdev) ++{ ++ return false; ++} ++ ++static inline bool soc_intel_is_byt(void) ++{ ++ return false; ++} ++ ++static inline bool soc_intel_is_cht(void) ++{ ++ return false; ++} ++ ++static inline bool soc_intel_is_apl(void) ++{ ++ return false; ++} ++ ++static inline bool soc_intel_is_glk(void) ++{ ++ return false; ++} ++ ++#endif ++ ++ #endif /* _SND_SOC_INTEL_QUIRKS_H */ +diff --git a/sound/soc/sof/sof-acpi-dev.c b/sound/soc/sof/sof-acpi-dev.c +index e9cf69874b5b..c8dafb1ac54e 100644 +--- a/sound/soc/sof/sof-acpi-dev.c ++++ b/sound/soc/sof/sof-acpi-dev.c +@@ -15,10 +15,7 @@ + #include + #include + #include +-#ifdef CONFIG_X86 +-#include +-#endif +- ++#include "../intel/common/soc-intel-quirks.h" + #include "ops.h" + + /* platform specific devices */ +@@ -99,56 +96,6 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = { + .arch_ops = &sof_xtensa_arch_ops + }; + +-#ifdef CONFIG_X86 /* TODO: move this to common helper */ +- +-static bool is_byt_cr(struct platform_device *pdev) +-{ +- struct device *dev = &pdev->dev; +- int status; +- +- if (iosf_mbi_available()) { +- u32 bios_status; +- status = iosf_mbi_read(BT_MBI_UNIT_PMC, /* 0x04 PUNIT */ +- MBI_REG_READ, /* 0x10 */ +- 0x006, /* BIOS_CONFIG */ +- &bios_status); +- +- if (status) { +- dev_err(dev, "could not read PUNIT BIOS_CONFIG\n"); +- } else { +- /* bits 26:27 mirror PMIC options */ +- bios_status = (bios_status >> 26) & 3; +- +- if (bios_status == 1 || bios_status == 3) { +- dev_info(dev, "Detected Baytrail-CR platform\n"); +- return true; +- } +- +- dev_info(dev, "BYT-CR not detected\n"); +- } +- } else { +- dev_info(dev, "IOSF_MBI not available, no BYT-CR detection\n"); +- } +- +- if (platform_get_resource(pdev, IORESOURCE_IRQ, 5) == NULL) { +- /* +- * Some devices detected as BYT-T have only a single IRQ listed, +- * causing platform_get_irq with index 5 to return -ENXIO. +- * The correct IRQ in this case is at index 0, as on BYT-CR. +- */ +- dev_info(dev, "Falling back to Baytrail-CR platform\n"); +- return true; +- } +- +- return false; +-} +-#else +-static int is_byt_cr(struct platform_device *pdev) +-{ +- return 0; +-} +-#endif +- + static const struct sof_dev_desc sof_acpi_cherrytrail_desc = { + .machines = snd_soc_acpi_intel_cherrytrail_machines, + .resindex_lpe_base = 0, +@@ -200,7 +147,7 @@ static int sof_acpi_probe(struct platform_device *pdev) + return -ENODEV; + + #if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) +- if (desc == &sof_acpi_baytrail_desc && is_byt_cr(pdev)) ++ if (desc == &sof_acpi_baytrail_desc && soc_intel_is_byt_cr(pdev)) + desc = &sof_acpi_baytrailcr_desc; + #endif + +-- +2.22.0 + + +From 4a1a1da31e98e90fff056cfabec65028fdfd05b7 Mon Sep 17 00:00:00 2001 +From: Pierre-Louis Bossart +Date: Thu, 30 May 2019 06:50:13 -0500 +Subject: [PATCH 2/4] ASoC: Intel: boards: remove dependency on + asm/platform_sst_audio.h + +This is not needed. Probably a copy/paste that was never removed. + +Signed-off-by: Pierre-Louis Bossart +Signed-off-by: Mark Brown +(am from https://git.kernel.org/broonie/sound/c/0d365acbbe295a67df5e1dc1e3661dc37390dd58) +Signed-off-by: Nathan Chancellor +--- + sound/soc/intel/boards/bytcht_da7213.c | 1 - + sound/soc/intel/boards/bytcht_es8316.c | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c +index ceeba7dc3ec8..97619a7d23a7 100644 +--- a/sound/soc/intel/boards/bytcht_da7213.c ++++ b/sound/soc/intel/boards/bytcht_da7213.c +@@ -15,7 +15,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c +index e7fc4f1707e6..ac0073ee1678 100644 +--- a/sound/soc/intel/boards/bytcht_es8316.c ++++ b/sound/soc/intel/boards/bytcht_es8316.c +@@ -22,7 +22,6 @@ + #include + #include + #include +-#include + #include + #include + #include +-- +2.22.0 + + +From d43d97308c17c9a10b4615e8537a2d0ce50b65fb Mon Sep 17 00:00:00 2001 +From: Tri Vo +Date: Wed, 22 May 2019 17:56:57 -0700 +Subject: [PATCH 3/4] ARM: disable FUNCTION_TRACER when building with Clang + +Clang needs "-meabi gnu" flag to emit calls to "__gnu_mcount_nc". +Otherwise, it inserts calls to undefined "mcount". + + kernel/softirq.o: In function `_local_bh_enable': + ... + undefined reference to `mcount' + +"-meabi gnu" resolves link failures. However, Clang does not implement +calls to "__gnu_mcount_nc" correctly. It does not save the link +register on the stack, which corrupts the stack. The resulting kernel +does not boot. + +Disable FUNCTION_TRACER support when building with Clang. + +Link: https://github.com/ClangBuiltLinux/linux/issues/35 +Suggested-by: Stefan Agner +Signed-off-by: Tri Vo +(am from https://lore.kernel.org/lkml/20190523005657.170008-1-trong@android.com/) +Signed-off-by: Nathan Chancellor +--- + arch/arm/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 8869742a85df..7a1804392795 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -75,7 +75,7 @@ config ARM + select HAVE_EXIT_THREAD + select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL + select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG +- select HAVE_FUNCTION_TRACER if !XIP_KERNEL ++ select HAVE_FUNCTION_TRACER if !XIP_KERNEL && !CC_IS_CLANG + select HAVE_GCC_PLUGINS + select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7) + select HAVE_IDE if PCI || ISA || PCMCIA +-- +2.22.0 + + +From dd419f0f93fbc5b65380b0da5db79f9866763881 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 11 Jun 2019 16:40:03 -0700 +Subject: [PATCH 4/4] ARM/ARM64: Force little endian for allyesconfig + +We want to use ld.lld to link and we want to avoid using the +KCONFIG_ALLCONFIG environment variable. + +Signed-off-by: Nathan Chancellor +--- + arch/arm/mm/Kconfig | 2 +- + arch/arm64/Kconfig | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig +index b169e580bf82..0dea016dd951 100644 +--- a/arch/arm/mm/Kconfig ++++ b/arch/arm/mm/Kconfig +@@ -741,7 +741,7 @@ config SWP_EMULATE + + config CPU_BIG_ENDIAN + bool "Build big-endian kernel" +- depends on ARCH_SUPPORTS_BIG_ENDIAN ++ depends on BROKEN + help + Say Y if you plan on running a kernel in big-endian mode. + Note that your board must be properly built and your board +diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig +index 697ea0510729..1980f089efaa 100644 +--- a/arch/arm64/Kconfig ++++ b/arch/arm64/Kconfig +@@ -808,6 +808,7 @@ config ARM64_PA_BITS + + config CPU_BIG_ENDIAN + bool "Build big-endian kernel" ++ depends on BROKEN + help + Say Y if you plan on running a kernel in big-endian mode. + +-- +2.22.0 + diff --git a/utils.py b/utils.py index d92c26a0..20ac6d53 100755 --- a/utils.py +++ b/utils.py @@ -50,7 +50,9 @@ def download_binutils(folder): check=True) verify_checksum(binutils_tarball) # Extract the tarball then remove it - subprocess.run(["tar", "-xzf", binutils_tarball.name], check=True, cwd=folder.as_posix()) + subprocess.run(["tar", "-xzf", binutils_tarball.name], + check=True, + cwd=folder.as_posix()) create_gitignore(binutils_folder) binutils_tarball.unlink()