diff options
Diffstat (limited to 'util')
46 files changed, 53 insertions, 46 deletions
diff --git a/util/acpi/acpidump-all b/util/acpi/acpidump-all index 2a04af049e..f43b7ef720 100755 --- a/util/acpi/acpidump-all +++ b/util/acpi/acpidump-all @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (C) 2007-2010 by coresystems GmbH # diff --git a/util/amdtools/k8-compare-pci-space.pl b/util/amdtools/k8-compare-pci-space.pl index 77fdb59dd4..505d5b47c8 100755 --- a/util/amdtools/k8-compare-pci-space.pl +++ b/util/amdtools/k8-compare-pci-space.pl @@ -1,7 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl use Getopt::Long; use strict; +use warnings; my $NAME = $0; my $VERSION = '0.01'; diff --git a/util/amdtools/k8-interpret-extended-memory-settings.pl b/util/amdtools/k8-interpret-extended-memory-settings.pl index 176defc881..104e669d02 100755 --- a/util/amdtools/k8-interpret-extended-memory-settings.pl +++ b/util/amdtools/k8-interpret-extended-memory-settings.pl @@ -1,7 +1,8 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl use Getopt::Long; use strict; +use warnings; my $NAME = $0; my $VERSION = '0.01'; diff --git a/util/amdtools/k8-read-mem-settings.sh b/util/amdtools/k8-read-mem-settings.sh index a0e62544c8..55b707141e 100755 --- a/util/amdtools/k8-read-mem-settings.sh +++ b/util/amdtools/k8-read-mem-settings.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This is an example that generates data files that are understood by the # k8-interpret-extended-memory-settings.pl script. Adjust the pci ids for your diff --git a/util/amdtools/parse-bkdg.pl b/util/amdtools/parse-bkdg.pl index d0bb4c7b6f..31f3873436 100755 --- a/util/amdtools/parse-bkdg.pl +++ b/util/amdtools/parse-bkdg.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl my $NAME = $0; my $VERSION = '0.01'; @@ -11,6 +11,7 @@ my $URL = "https://coreboot.org"; my $DEBUG = 0; use strict; +use warnings; # Run the bkdg for k8 through pdftotext first (from the poppler package) diff --git a/util/board_status/set_up_live_image.sh b/util/board_status/set_up_live_image.sh index d80434eb35..9fac15304e 100755 --- a/util/board_status/set_up_live_image.sh +++ b/util/board_status/set_up_live_image.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script is used to set up a ubuntu-based live image to be used # with coreboot's board_status script. It modifies the system so that diff --git a/util/broadcom/secimage/test/hmac.sh b/util/broadcom/secimage/test/hmac.sh index 21176bded9..ded0eb77dd 100755 --- a/util/broadcom/secimage/test/hmac.sh +++ b/util/broadcom/secimage/test/hmac.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## ## This file is part of the coreboot project. diff --git a/util/cavium/devicetree_convert.py b/util/cavium/devicetree_convert.py index 70d89af686..656fdf6c34 100644 --- a/util/cavium/devicetree_convert.py +++ b/util/cavium/devicetree_convert.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # devicetree_convert Tool to convert a DTB to a static C file # Copyright (C) 2018 Facebook Inc. diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile index f4dca3f36d..d7137e907b 100644 --- a/util/cbfstool/Makefile +++ b/util/cbfstool/Makefile @@ -6,7 +6,7 @@ CONFIG_FMD_GENPARSER ?= n HOSTCC ?= $(CC) PREFIX ?= /usr/local BINDIR ?= $(PREFIX)/bin -INSTALL ?= /usr/bin/install +INSTALL ?= /usr/bin/env install OBJCOPY ?= objcopy VBOOT_SOURCE ?= $(top)/3rdparty/vboot diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile index 44756ded33..eed08a4cb3 100644 --- a/util/cbmem/Makefile +++ b/util/cbmem/Makefile @@ -16,7 +16,7 @@ PROGRAM = cbmem ROOT = ../../src CC ?= $(CROSS_COMPILE)gcc -INSTALL ?= /usr/bin/install +INSTALL ?= /usr/bin/env install PREFIX ?= /usr/local CFLAGS ?= -O2 CFLAGS += -Wall -Werror diff --git a/util/chromeos/crosfirmware.sh b/util/chromeos/crosfirmware.sh index 9e00ba6aff..ba0c2590d2 100755 --- a/util/chromeos/crosfirmware.sh +++ b/util/chromeos/crosfirmware.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This file is part of the coreboot project. # diff --git a/util/chromeos/extract_blobs.sh b/util/chromeos/extract_blobs.sh index af9d026234..a674ada91f 100755 --- a/util/chromeos/extract_blobs.sh +++ b/util/chromeos/extract_blobs.sh @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/usr/bin/env bash # # This file is part of the coreboot project. # @@ -14,6 +14,8 @@ # GNU General Public License for more details. # +set -x + IMAGE=$1 if [ ! -r "$IMAGE" ]; then diff --git a/util/ectool/Makefile b/util/ectool/Makefile index 234e931e4a..c4b94da75f 100644 --- a/util/ectool/Makefile +++ b/util/ectool/Makefile @@ -17,7 +17,7 @@ CC = gcc CFLAGS = -O2 -Wall -W PROGRAM = ectool -INSTALL = /usr/bin/install +INSTALL = /usr/bin/env install PREFIX = /usr/local OS_ARCH = $(shell uname) diff --git a/util/genprof/log2dress b/util/genprof/log2dress index 99d1f2f59c..a7ec4bfdbd 100755 --- a/util/genprof/log2dress +++ b/util/genprof/log2dress @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #Parse a log and get back the function names and line numbers #Provide a log file as first argument diff --git a/util/gitconfig/gitconfig.sh b/util/gitconfig/gitconfig.sh index 5d6fe3610b..4df93cf2c5 100755 --- a/util/gitconfig/gitconfig.sh +++ b/util/gitconfig/gitconfig.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## ## This file is part of the coreboot project. diff --git a/util/ifdtool/Makefile b/util/ifdtool/Makefile index cf6d37812f..e1188b209c 100644 --- a/util/ifdtool/Makefile +++ b/util/ifdtool/Makefile @@ -16,7 +16,7 @@ PROGRAM = ifdtool CC = gcc -INSTALL = /usr/bin/install +INSTALL = /usr/bin/env install PREFIX = /usr/local CFLAGS = -O2 -g -Wall -W -Werror -I../../src/commonlib/include LDFLAGS = diff --git a/util/intelmetool/Makefile b/util/intelmetool/Makefile index d8c056c3a7..128c1fe9d5 100644 --- a/util/intelmetool/Makefile +++ b/util/intelmetool/Makefile @@ -15,7 +15,7 @@ PROGRAM = intelmetool CC ?= gcc -INSTALL ?= /usr/bin/install +INSTALL ?= /usr/bin/env install PREFIX ?= /usr/local CFLAGS ?= -O0 -g -Wall -W -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function LDFLAGS += -lpci -lz diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile index 96fd1404a5..d88063be75 100644 --- a/util/inteltool/Makefile +++ b/util/inteltool/Makefile @@ -20,7 +20,7 @@ PROGRAM = inteltool top ?= $(abspath ../..) CC ?= gcc -INSTALL ?= /usr/bin/install +INSTALL ?= /usr/bin/env install PREFIX ?= /usr/local CFLAGS ?= -O2 -g -Wall -W LDFLAGS += -lpci -lz diff --git a/util/ipqheader/createxbl.py b/util/ipqheader/createxbl.py index b01e628544..7f2d987319 100755 --- a/util/ipqheader/createxbl.py +++ b/util/ipqheader/createxbl.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #============================================================================ # #/** @file createxbl.py diff --git a/util/ipqheader/mbn_tools.py b/util/ipqheader/mbn_tools.py index c4d26c1793..8a17563606 100755 --- a/util/ipqheader/mbn_tools.py +++ b/util/ipqheader/mbn_tools.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python #=============================================================================== # # MBN TOOLS diff --git a/util/k8resdump/Makefile b/util/k8resdump/Makefile index e2603511fa..a1d4dfa682 100644 --- a/util/k8resdump/Makefile +++ b/util/k8resdump/Makefile @@ -16,7 +16,7 @@ PROGRAM = k8resdump CC = gcc -INSTALL = /usr/bin/install +INSTALL = /usr/bin/env install PREFIX = /usr/local #CFLAGS = -O2 -g -Wall -Werror CFLAGS = -Os -Wall -Werror diff --git a/util/kconfig/miniconfig b/util/kconfig/miniconfig index 065a7846f0..29a40353d7 100755 --- a/util/kconfig/miniconfig +++ b/util/kconfig/miniconfig @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # miniconfig - utility to minimize your coreboot config files # diff --git a/util/lint/check_lint_tests b/util/lint/check_lint_tests index 741d2459c8..5ba33c8e37 100755 --- a/util/lint/check_lint_tests +++ b/util/lint/check_lint_tests @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # test to make sure the lint tests fail SPACE=' ' diff --git a/util/lint/checkpatch_json.py b/util/lint/checkpatch_json.py index 44b2a8b887..74ad96a100 100755 --- a/util/lint/checkpatch_json.py +++ b/util/lint/checkpatch_json.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright (C) 2018 Intel Corporation. # written by Naresh G Solanki<naresh.solanki@intel.com> and # Maulik V Vaghela <maulik.v.vaghela@intel.com> diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index 62997dd2b8..eddd8de6ee 100755 --- a/util/lint/kconfig_lint +++ b/util/lint/kconfig_lint @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # # This file is part of the coreboot project. diff --git a/util/me_cleaner/me_cleaner.py b/util/me_cleaner/me_cleaner.py index 03fbbcb56b..f592863f80 100755 --- a/util/me_cleaner/me_cleaner.py +++ b/util/me_cleaner/me_cleaner.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # me_cleaner - Tool for partial deblobbing of Intel ME/TXE firmware images # Copyright (C) 2016-2018 Nicola Corna <nicola@corna.info> diff --git a/util/me_cleaner/setup.py b/util/me_cleaner/setup.py index 92fd359ad4..c831ef8962 100755 --- a/util/me_cleaner/setup.py +++ b/util/me_cleaner/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python from setuptools import setup diff --git a/util/mma/mma_automated_test.sh b/util/mma/mma_automated_test.sh index b43325ba14..1c324f34ad 100755 --- a/util/mma/mma_automated_test.sh +++ b/util/mma/mma_automated_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This file is part of the coreboot project. diff --git a/util/mma/mma_get_result.sh b/util/mma/mma_get_result.sh index cb30a80db7..f797e7f36b 100755 --- a/util/mma/mma_get_result.sh +++ b/util/mma/mma_get_result.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This file is part of the coreboot project. diff --git a/util/mma/mma_setup_test.sh b/util/mma/mma_setup_test.sh index ec7baf92ce..b2a0de92bc 100755 --- a/util/mma/mma_setup_test.sh +++ b/util/mma/mma_setup_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This file is part of the coreboot project. diff --git a/util/nvramtool/Makefile b/util/nvramtool/Makefile index 8da7c76c8c..f5a4fd5d70 100644 --- a/util/nvramtool/Makefile +++ b/util/nvramtool/Makefile @@ -17,7 +17,7 @@ PROGRAM = nvramtool CC = gcc -INSTALL = /usr/bin/install +INSTALL = /usr/bin/env install PREFIX = /usr/local CFLAGS = -O2 -g -Wall -W -I. -DCMOS_HAL=1 #CFLAGS = -Os -Wall diff --git a/util/pmh7tool/Makefile b/util/pmh7tool/Makefile index 091fbc533e..384d3d9c4e 100644 --- a/util/pmh7tool/Makefile +++ b/util/pmh7tool/Makefile @@ -16,7 +16,7 @@ CC = gcc CFLAGS = -O2 -Wall -W -Werror PROGRAM = pmh7tool -INSTALL = /usr/bin/install +INSTALL = /usr/bin/env install PREFIX = /usr/local all: $(PROGRAM) diff --git a/util/release/build-release b/util/release/build-release index a3cec3eb8c..e4330d450d 100755 --- a/util/release/build-release +++ b/util/release/build-release @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # ${VERSION_NAME}: new version name # ${COMMIT_ID}: commit id (if not master) # ${USERNAME}: username (if not default to https) diff --git a/util/release/genrelnotes b/util/release/genrelnotes index 3038eb3de8..42848a18a2 100755 --- a/util/release/genrelnotes +++ b/util/release/genrelnotes @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This file is part of the coreboot project. # diff --git a/util/riscv/sifive-gpt.py b/util/riscv/sifive-gpt.py index fd82997fc6..7f522d9379 100755 --- a/util/riscv/sifive-gpt.py +++ b/util/riscv/sifive-gpt.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # This file is part of the coreboot project. # # Copyright (C) 2018 Jonathan Neuschäfer diff --git a/util/scripts/config b/util/scripts/config index e0e39826da..ba11e350e8 100755 --- a/util/scripts/config +++ b/util/scripts/config @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: GPL-2.0 # Manipulate options in a .config file from the command line diff --git a/util/scripts/dts-to-fmd.sh b/util/scripts/dts-to-fmd.sh index 00e718bebd..b468b35bcd 100755 --- a/util/scripts/dts-to-fmd.sh +++ b/util/scripts/dts-to-fmd.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright 2015 Google Inc. # diff --git a/util/scripts/gerrit-rebase b/util/scripts/gerrit-rebase index c4f8a80e2a..276142d6b9 100755 --- a/util/scripts/gerrit-rebase +++ b/util/scripts/gerrit-rebase @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 Google Inc. # diff --git a/util/scripts/get_maintainer.pl b/util/scripts/get_maintainer.pl index 4f34a4e6fb..c24a6d4d69 100755 --- a/util/scripts/get_maintainer.pl +++ b/util/scripts/get_maintainer.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl # (c) 2007, Joe Perches <joe@perches.com> # created from checkpatch.pl # @@ -11,6 +11,7 @@ # Licensed under the terms of the GNU GPL License version 2 use strict; +use warnings; my $P = $0; my $V = '0.26'; diff --git a/util/scripts/parse-maintainers.pl b/util/scripts/parse-maintainers.pl index a0fe34349b..c0fd88cdc3 100755 --- a/util/scripts/parse-maintainers.pl +++ b/util/scripts/parse-maintainers.pl @@ -1,6 +1,7 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl use strict; +use warnings; my %map; diff --git a/util/scripts/prepare-commit-msg.clang-format b/util/scripts/prepare-commit-msg.clang-format index 7033f3cc07..a6b3d08a26 100755 --- a/util/scripts/prepare-commit-msg.clang-format +++ b/util/scripts/prepare-commit-msg.clang-format @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash files=`git diff --cached --name-only | grep '\.[ch]$'` if [ -z "$files" ]; then exit 0 diff --git a/util/scripts/ucode_h_to_bin.sh b/util/scripts/ucode_h_to_bin.sh index 2d7f5fa132..f08b053b8e 100755 --- a/util/scripts/ucode_h_to_bin.sh +++ b/util/scripts/ucode_h_to_bin.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This file is part of the coreboot project. # diff --git a/util/scripts/update_submodules b/util/scripts/update_submodules index b555495eda..68d8a948ac 100755 --- a/util/scripts/update_submodules +++ b/util/scripts/update_submodules @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This file is part of the coreboot project. # diff --git a/util/superiotool/Makefile b/util/superiotool/Makefile index cedd63128f..3a0bcf0abe 100644 --- a/util/superiotool/Makefile +++ b/util/superiotool/Makefile @@ -17,7 +17,7 @@ PROGRAM = superiotool CC ?= gcc -INSTALL ?= /usr/bin/install +INSTALL ?= /usr/bin/env install PREFIX ?= /usr/local # Set the superiotool version string to the output of 'git describe'. diff --git a/util/util_readme/util_readme.sh b/util/util_readme/util_readme.sh index 420ffae698..cdd94dcb1a 100755 --- a/util/util_readme/util_readme.sh +++ b/util/util_readme/util_readme.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Creates `./util/README.md` and `./Documentation/Util.md` of description files # in `./util` subdirectories diff --git a/util/viatool/Makefile b/util/viatool/Makefile index 365497a308..b2a62917d6 100644 --- a/util/viatool/Makefile +++ b/util/viatool/Makefile @@ -19,7 +19,7 @@ PROGRAM = viatool CC ?= gcc -INSTALL ?= /usr/bin/install +INSTALL ?= /usr/bin/env install PREFIX ?= /usr/local CFLAGS ?= -O2 -g -Wall -W -I$(CURDIR) LDFLAGS += -lpci -lz |