Commit graph

17 commits

Author SHA1 Message Date
Patrick Georgi
d3d19bfbe1 UPSTREAM: util/scripts/gerrit-rebase: allow skipping old history
This might provide a minor speedup but more importantly it allows
skipping commits without Reviewed-on line (which we have a couple of
due to mistakes with git push).

To use, add a line starting with "Gerrit-Rebase-Ignore-CLs-Before:"
pointing out a match string (ie "something that comes after Reviewed-on")
prior to which no changes are considered on the originating branch. The
target branch is still fully considered to avoid issues with changes
that were retargetted out of order around the new cut and would then
make a reappearance (or be skipped).

BUG=none
BRANCH=none
TEST=none

Change-Id: I888fb6952f9fafb5541b9a1905678a477e63c76c
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 8f8668d87f
Original-Change-Id: I9f2679891e93f6d28a781315aebd2aa60a1e3b23
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://review.coreboot.org/20185
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/539523
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-06-19 15:33:08 -07:00
Martin Roth
3a2a594545 UPSTREAM: util/scripts/get_maintainer.pl: Remove linux tree check
This was removed from the previous version, but we'd like it in
a separate patch, so it's obvious and can easily be applied to the
next version.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id1de5d6dac3a230804d03748346bcc35183f52d1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 93757f8543
Original-Change-Id: I9396009e82e762aa0cc037dbe9e7133962af6354
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18577
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/451362
2017-03-07 14:15:56 -08:00
Martin Roth
2b5f7da848 UPSTREAM: util/scripts: Update get_maintainer.pl to latest from linux kernel
This is version 03aed21 from linux/scripts, updated on Dec 12, 2016.

The version needs to be updated because Perl version 5.20 deprecated the
/C regex expression.  Perl version 5.24 removed it completely, so the
old version fails to run on the coreboot builders.

BUG=none
BRANCH=none
TEST=none

Change-Id: I11ca194a4b8bb58433b3408006326f78217a6c71
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ae34e97ad7
Original-Change-Id: Ib97997237ca64c65d7f91d568ae4bec000804331
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/18571
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <f4bug@amsat.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/451361
2017-03-07 14:15:56 -08:00
Patrick Georgi
3c1f742a08 UPSTREAM: util/scripts: extend cross-repo-cherrypick
The script now automatically discovers the original branch (if known)
and configures itself appropriately.
Additionally, commit messages for changes coming _from_ upstream will
be prefixed with "UPSTREAM: ".
With the optional --cros argument, it also adds a BUG/BRANCH/TEST block
at the right place in the commit message (right above the metadata) if
one doesn't already exist.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7ad3fb5317d9e3090f43ea983fcfb2ab099c43a4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6f27edd377
Original-Change-Id: I81864ddca62fd99a9eb905d7075e5b53f58c4eb5
Original-Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/18135
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/430179
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2017-01-19 06:11:09 -08:00
Patrick Georgi
8404cc2fc0 UPSTREAM: util/scripts: add copyright notices
BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/17102
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: Ia40543e5585845e5e6c178a620052c6a25927a5c
Reviewed-on: https://chromium-review.googlesource.com/402699
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-10-25 14:46:57 -07:00
Patrick Georgi
21127c7f99 UPSTREAM: Rename and move util/gitconfig/rebase.sh
It has nothing to do with git configuration, but is one of our
convenience scripts. It also has nothing to do with rebases (except that
it can be comfortably used through git rebase --exec)

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/17101
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: Icc60c4de486a0027fe2230e93b441e62ba022193
Reviewed-on: https://chromium-review.googlesource.com/402698
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-10-25 14:46:55 -07:00
Patrick Georgi
2688800971 UPSTREAM: Drop convert-all-depthcharge-fmap.dts.sh script
The relevant data is gone in Chrome OS depthcharge's master branch, and
so the script outlived its usefulness.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/17100
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>

Change-Id: I04f3f168e23d4bc7c31692263a8eec3f97ee50de
Reviewed-on: https://chromium-review.googlesource.com/402697
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-10-25 14:46:53 -07:00
Patrick Georgi
d0cd18f3f4 UPSTREAM: util/scripts: add gerrit-rebase script
gerrit-rebase is a gerrit-context aware rebase script. Given a source
and a target branch (that need to have a common ancestor), it prepares
a rebase todo list that applies all commits from source that aren't
already found on target.

It matches commits using Reviewed-on lines in the commit message that
are added by gerrit when submitting commits using the "cherry-pick"
strategy.
This has been shown to be the best preserved meta data to work from in
existing data (Change-Id was mangled in all kinds of ways).

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/16695
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I9618c1b66ebc1fb7ed006efbc1665fb08386e1a5
Reviewed-on: https://chromium-review.googlesource.com/396257
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-10-11 14:33:18 -07:00
Marshall Dawson
135fd4b46d UPSTREAM: util/scripts: Support cygwin in ucode conversion tool
Check for the existence of TMPFILE with a .exe extension and if found
rename it with no extension.  This allows the program to be run and
removed properly.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/15437
Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-by: Martin Roth <martinroth@google.com>

Change-Id: I26928f9b8bf82d1c07fa456a88d624f7a8838bd3
Reviewed-on: https://chromium-review.googlesource.com/373735
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-22 23:26:43 -07:00
Patrick Georgi
1000a5561d chromeos.fmd: Mark RW_LEGACY as CBFS
Change the existing chromeos.fmd files and the dts-to-fmd script to mark
RW_LEGACY as CBFS, so it's properly "formatted".

BUG=chromium:595715
BRANCH=none
TEST=none

Change-Id: I76de26032ea8da0c7755a76a01e7bea9cfaebe23
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 717a00c459906fa87f61314ea4541c31b50539f4
Original-Change-Id: I4b037b60d10be3da824c6baecabfd244eec2cdac
Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/336403
Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/14240
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-04-05 13:37:31 +02:00
Ben Gardner
5d7cbc272e util/get_maintainer.pl: Fix top_of_kernel_tree check
The script checks for a folder called documentation, while the folder
name is Documentation.

Without this change, I get this when running the script:
util/scripts/get_maintainer.pl: The current directory does not appear to be
 a coreboot source tree.

Change-Id: Ied7ead7dfec33e9324f06d0ef60dcd6d7ba40104
Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Reviewed-on: https://review.coreboot.org/13062
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-01-22 19:25:07 +01:00
Patrick Georgi
5d7ab39024 chromeos: import Chrome OS fmaps
These are generated from depthcharge's board/*/fmap.dts using the
dts-to-fmd.sh script.

One special case is google/veyron's chromeos.fmd, which is used for a
larger set of boards - no problem since the converted fmd was the same
for all of them.

Set aside 128K for the bootblock on non-x86 systems (where the COREBOOT
region ends up at the beginning of flash). This becomes necessary
because we're working without a real cbfs master header (exists for
transition only), which carved out the space for the offset.

Change-Id: Ieeb33702d3e58e07e958523533f83da97237ecf1
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12715
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-01-21 19:40:57 +01:00
Martin Roth
295358454a utils/scripts: Add microcode conversion tool
This is an update to the script in the blobs repo that converts
individual or multiple files into a microcode binary.

Change-Id: I66fb650bbfa334d1f07e8e3914ef6deb8e72bbb4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: http://review.coreboot.org/12332
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2015-11-10 18:46:04 +01:00
Patrick Georgi
ee0028da3b util/scripts/no-fsf-addresses.sh: Strip last paragraph
checkpatch.pl that we inherited from Linux checks for its absence, so it
may be easiest to follow their style of not caring for the FSF's address
anymore.

TEST=visual check that `git diff` and `git diff |grep "^[+-]" | \
grep -v "^--- " |grep -v "^+++ " |sort | uniq -c  |sort -n` look
reasonable (matching number of removed and added comment terminators */,
etc.).
Also, `git grep -A3 "You should have received a copy"` only
returns license texts, imported files, patches and help strings in
applications as remaining copies of that paragraph

Change-Id: I7c43860b6fd7ec526983c24b608994539128cfb9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/11887
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-31 21:38:15 +01:00
Stefan Reinauer
1ecf252c38 MAINTAINERS: Add script to test database and find maintainers
This utility should make it easier to complete and maintain
the database of coreboot subsystem maintainers (MAINTAINERS
file)

This will need a bit of tender love and care to print information
in an easily machine readable output for the build system, but its
a first start to query the maintainers database.

Build with:
   $ go build util/scripts/maintainers.go

Find a maintainer for a set of files with:
   $ ./maintainers Makefile Makefile.inc
   Makefile is in subsystem BUILD SYSTEM
   Maintainers:  [Patrick Georgi <patrick@georgi-clan.de>]
   Makefile.inc is in subsystem BUILD SYSTEM
   Maintainers:  [Patrick Georgi <patrick@georgi-clan.de>]

Check the maintainer database with:
   $ ./maintainers
   .gitignore has no subsystem defined in MAINTAINERS
   .gitmodules has no subsystem defined in MAINTAINERS
   .gitreview has no subsystem defined in MAINTAINERS
   3rdparty/arm-trusted-firmware has no subsystem defined in MAINTAINERS
   3rdparty/blobs has no subsystem defined in MAINTAINERS
   3rdparty/vboot has no subsystem defined in MAINTAINERS
   COPYING has no subsystem defined in MAINTAINERS
   Documentation/AMD-S3.txt has no subsystem defined in MAINTAINERS
   Documentation/CorebootBuildingGuide.tex has no subsystem defined in MAINTAINERS
   Documentation/Doxyfile.coreboot has no subsystem defined in MAINTAINERS
   [..]

Change-Id: I49c43911971152b0e4d626ccdeb33c088e362695
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/12119
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2015-10-23 01:47:39 +02:00
Patrick Georgi
3270369986 util/scripts: add some support scripts
These scripts were bit-rotting on my box and may be useful for somebody else.

no-fsf-addresses.sh removes various FSF addresses from license headers

find-unused-kconfig-symbols.sh points out Kconfig variables that may be
unused. There are some false positives, but it serves as a starting point.

Change-Id: I8ddb5bea5fe87d39eed5f39f32077944b37d0665
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/10675
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-06-30 08:24:38 +02:00
Stefan Reinauer
c6e1f8aa12 Add MAINTAINERS file
Add a Linux style MAINTAINERS file and the get_maintainer.pl
script from the Linux kernel source (adapted to work in the
coreboot source tree)

Change-Id: I983e30c20c371d238cfa7c0a074587b731387c63
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10021
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
2015-05-06 19:38:18 +02:00