From: Rob Herring <robh@kernel.org>
To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Frank Rowand <frowand.list@gmail.com>,
Mark Rutland <mark.rutland@arm.com>
Subject: [PATCH 1/3] scripts/dtc: automate getting dtc version and log in update script
Date: Tue, 21 Mar 2017 11:19:56 -0500 [thread overview]
Message-ID: <20170321161958.9658-2-robh@kernel.org> (raw)
In-Reply-To: <20170321161958.9658-1-robh@kernel.org>
Further automate the dtc update script to fill in the dtc version and
commit log.
Signed-off-by: Rob Herring <robh@kernel.org>
---
scripts/dtc/update-dtc-source.sh | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh
index f5cde799db03..c92e6bd9458d 100755
--- a/scripts/dtc/update-dtc-source.sh
+++ b/scripts/dtc/update-dtc-source.sh
@@ -36,10 +36,19 @@ DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c
DTC_GENERATED="dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h"
LIBFDT_SOURCE="Makefile.libfdt fdt.c fdt.h fdt_empty_tree.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c fdt_wip.c libfdt.h libfdt_env.h libfdt_internal.h"
+get_last_dtc_version() {
+ git log --oneline scripts/dtc/ | grep 'upstream' | head -1 | sed -e 's/^.* \(.*\)/\1/'
+}
+
+last_dtc_ver=$(get_last_dtc_version)
+
# Build DTC
cd $DTC_UPSTREAM_PATH
make clean
make check
+dtc_version=$(git describe HEAD)
+dtc_log=$(git log --oneline ${last_dtc_ver}..)
+
# Copy the files into the Linux tree
cd $DTC_LINUX_PATH
@@ -60,4 +69,12 @@ sed -i -- 's/#include <libfdt_env.h>/#include "libfdt_env.h"/g' ./libfdt/libfdt.
sed -i -- 's/#include <fdt.h>/#include "fdt.h"/g' ./libfdt/libfdt.h
git add ./libfdt/libfdt.h
-git commit -e -v -m "scripts/dtc: Update to upstream version [CHANGEME]"
+commit_msg=$(cat << EOF
+scripts/dtc: Update to upstream version ${dtc_version}
+
+This adds the following commits from upstream:
+
+${dtc_log}
+EOF
+)
+git commit -e -v -s -m "${commit_msg}"
--
2.10.1
next prev parent reply other threads:[~2017-03-21 16:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-21 16:19 [PATCH 0/3] dtc updates for 4.12 Rob Herring
2017-03-21 16:19 ` Rob Herring [this message]
2017-03-21 16:19 ` [PATCH 2/3] scripts/dtc: Update to upstream version v1.4.4-8-g756ffc4f52f6 Rob Herring
2017-03-21 16:19 ` [PATCH 3/3] dtc: update warning settings for new bus and node/property name checks Rob Herring
2017-03-21 16:49 ` [PATCH 0/3] dtc updates for 4.12 Florian Fainelli
2017-03-21 19:36 ` Rob Herring
2017-03-21 19:15 ` Olof Johansson
[not found] ` <CAOesGMiWFPERPapOLCW4iqSuFWiqesBBjGN0ny6XjzFXNfKr4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-21 19:55 ` Rob Herring
2017-03-21 19:55 ` Rob Herring
2017-03-29 21:41 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170321161958.9658-2-robh@kernel.org \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.