diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/patch.sh')
-rwxr-xr-x | recipes-kernel/linux/linux-ti33x-psp-3.2/patch.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/patch.sh b/recipes-kernel/linux/linux-ti33x-psp-3.2/patch.sh new file mode 100755 index 00000000..9bc6cf3a --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/patch.sh | |||
@@ -0,0 +1,38 @@ | |||
1 | #!/bin/bash | ||
2 | # (c) 2009 - 2012 Koen Kooi <koen@dominion.thruhere.net> | ||
3 | # This script will take a set of directories with patches and make a git tree out of it | ||
4 | # After all the patches are applied it will output a SRC_URI fragment you can copy/paste into a recipe | ||
5 | set -e | ||
6 | |||
7 | # don't use builtin 'echo' from /bin/sh | ||
8 | export ECHO="$(which echo)" | ||
9 | |||
10 | git tag -f beaglebone-v3.2 09e9651bcf2ee8d86685f2a8075bc6557b1d3b91 | ||
11 | |||
12 | TAG="beaglebone-v3.2" | ||
13 | EXTRATAG="" | ||
14 | PATCHPATH=$(dirname $0) | ||
15 | |||
16 | git am --abort || echo "Do you need to make sure the patches apply cleanly first?" | ||
17 | git reset --hard ${TAG} | ||
18 | |||
19 | rm -Rf export | ||
20 | |||
21 | previous=${TAG} | ||
22 | PATCHSET="3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.2.10 3.2.11 beaglebone" | ||
23 | |||
24 | # apply patches | ||
25 | for patchset in ${PATCHSET} ; do | ||
26 | for patch in $(ls -1 $PATCHPATH/$patchset/* | sort -n) ; do | ||
27 | $ECHO -n "$patch: " | ||
28 | git am -q $patch && echo applied | ||
29 | done | ||
30 | git tag "${TAG}-${patchset}${EXTRATAG}" -f | ||
31 | done | ||
32 | |||
33 | # export patches and output SRC_URI for them | ||
34 | for patchset in ${PATCHSET} ; do | ||
35 | mkdir -p export/$patchset | ||
36 | ( cd export/$patchset && git format-patch ${previous}..${TAG}-${patchset}${EXTRATAG} >& /dev/null && for i in *.patch ; do echo "\tfile://${patchset}/$i \\" ; done ) | ||
37 | previous=${TAG}-${patchset}${EXTRATAG} | ||
38 | done > src-uri.txt | ||