From patchwork Tue Mar 21 16:19:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 95641 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1524339qgd; Tue, 21 Mar 2017 09:23:49 -0700 (PDT) X-Received: by 10.98.196.12 with SMTP id y12mr40342573pff.49.1490113429244; Tue, 21 Mar 2017 09:23:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p129si12445575pfb.173.2017.03.21.09.23.49; Tue, 21 Mar 2017 09:23:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933303AbdCUQUz (ORCPT + 18 others); Tue, 21 Mar 2017 12:20:55 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:33922 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757314AbdCUQUX (ORCPT ); Tue, 21 Mar 2017 12:20:23 -0400 Received: by mail-oi0-f65.google.com with SMTP id w81so6646882oig.1; Tue, 21 Mar 2017 09:20:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=P4aFRUrxVNOZaxryipzOpJH9aDLp2YEJPzaqtNzxkqI=; b=q737BI2QLjqEhBy0F7nXmd4Jw9QojzV2kXa7T9vLFsJtktP6fHd5eCJlzSv5oMAS+b OyrlHCvji2tT97ZF/U1zVJy+lZl8oyH0gqAUJ2one2MPSQ7F3JpSLdRNL1rTDl/goSV+ PkYDVpHr+5yNB2hB4L0KJgIa/r+WC3zz6B3/XAULGOLVWNx+5RWjT/oLi8WKTGR1P6wR aVb3Lzs+Phn86CvgFdPzGyO7KetcviU3ErPJjMoQE1FQIi1rphzWd2prDhMcwf4J6Ib8 l10Fb5MFybjdgoVNBh2MZmCVTOtsjDzLIrK/8qekkdRGkJ1uP795JLsGRyXiNKfqyDVM vb3w== X-Gm-Message-State: AFeK/H1pzWdUa8PHsOXzwPoSdXp4jhPOaEn1pYOAWt2kBwKd909TGjvxk6cwGqBkaQBXMQ== X-Received: by 10.202.74.213 with SMTP id x204mr18979495oia.159.1490113200634; Tue, 21 Mar 2017 09:20:00 -0700 (PDT) Received: from rob-hp-laptop.herring.priv (66-90-148-125.dyn.grandenetworks.net. [66.90.148.125]) by smtp.googlemail.com with ESMTPSA id x65sm8960966oix.30.2017.03.21.09.19.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Mar 2017 09:20:00 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frank Rowand , Mark Rutland Subject: [PATCH 1/3] scripts/dtc: automate getting dtc version and log in update script Date: Tue, 21 Mar 2017 11:19:56 -0500 Message-Id: <20170321161958.9658-2-robh@kernel.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170321161958.9658-1-robh@kernel.org> References: <20170321161958.9658-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Further automate the dtc update script to fill in the dtc version and commit log. Signed-off-by: Rob Herring --- scripts/dtc/update-dtc-source.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) -- 2.10.1 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 /#include "libfdt_env.h"/g' ./libfdt/libfdt. sed -i -- 's/#include /#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}"