aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dtc/update-dtc-source.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/update-dtc-source.sh')
-rwxr-xr-xscripts/dtc/update-dtc-source.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/dtc/update-dtc-source.sh b/scripts/dtc/update-dtc-source.sh
index f5cde799db03..b8ebcc6722d2 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
36DTC_GENERATED="dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h" 36DTC_GENERATED="dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h"
37LIBFDT_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" 37LIBFDT_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"
38 38
39get_last_dtc_version() {
40 git log --oneline scripts/dtc/ | grep 'upstream' | head -1 | sed -e 's/^.* \(.*\)/\1/'
41}
42
43last_dtc_ver=$(get_last_dtc_version)
44
39# Build DTC 45# Build DTC
40cd $DTC_UPSTREAM_PATH 46cd $DTC_UPSTREAM_PATH
41make clean 47make clean
42make check 48make check
49dtc_version=$(git describe HEAD)
50dtc_log=$(git log --oneline ${last_dtc_ver}..)
51
43 52
44# Copy the files into the Linux tree 53# Copy the files into the Linux tree
45cd $DTC_LINUX_PATH 54cd $DTC_LINUX_PATH
@@ -60,4 +69,13 @@ sed -i -- 's/#include <libfdt_env.h>/#include "libfdt_env.h"/g' ./libfdt/libfdt.
60sed -i -- 's/#include <fdt.h>/#include "fdt.h"/g' ./libfdt/libfdt.h 69sed -i -- 's/#include <fdt.h>/#include "fdt.h"/g' ./libfdt/libfdt.h
61git add ./libfdt/libfdt.h 70git add ./libfdt/libfdt.h
62 71
63git commit -e -v -m "scripts/dtc: Update to upstream version [CHANGEME]" 72commit_msg=$(cat << EOF
73scripts/dtc: Update to upstream version ${dtc_version}
74
75This adds the following commits from upstream:
76
77${dtc_log}
78EOF
79)
80
81git commit -e -v -s -m "${commit_msg}"