RPi: Fix linux patch generation to support non-rebased trees

-Xours keeps conflicts that are present in the rpi branch
This commit is contained in:
MilhouseVH 2018-02-19 16:02:12 +00:00
parent 6881674f3e
commit dcf439b1b4

View File

@ -74,13 +74,14 @@ fi
# Apply the following config change to reduce chance of duplicate hashes
git config --local core.abbrev 40
git fetch --all --depth=${DEPTH}
git fetch --all --depth=${DEPTH} --no-tags
git reset --hard origin/rpi-${BRANCH}.y${REBASE}
if [ -n "${BASEREV}" ]; then
:
elif [ -z "${KERNEL}" ]; then
BASEREV="linux-stable/linux-${BRANCH}.y"
KERNEL="$(git log --grep "Linux ${BRANCH}" --pretty=oneline | head -1 | awk '{ print $NF }')"
else
BASEREV="$(git log --grep "Linux ${KERNEL}" --pretty=oneline | head -1)"
[ -z "${BASEREV}" ] && BASEREV="$(git log --grep "Linux v${KERNEL}" --pretty=oneline | head -1)"
@ -93,7 +94,7 @@ else
BASEREV="${BASEREV%% *}"
fi
GIT_SEQUENCE_EDITOR=${BIN}/rpi-linux-rebase.sh git rebase -i ${BASEREV}
GIT_SEQUENCE_EDITOR=${BIN}/rpi-linux-rebase.sh git rebase -Xours -i ${BASEREV}
git format-patch --no-signature --stdout ${BASEREV} > /tmp/linux-01-RPi_support.patch
cd .. && rm -fr raspberrypi-linux
@ -103,6 +104,7 @@ cat /tmp/dropped
echo
echo "Dropped patches: /tmp/dropped"
echo "New patch file : /tmp/linux-01-RPi_support.patch"
echo