forked from pool/u-boot
Guillaume GARDET
31045129c4
- Conditionalize pine64plus ATF support on uboot_atf_pine64 - u-boot-board.spec.in: Update license - Add poplar - Update to 2018.05 - Update to 2018.05-rc3 - Include u-boot.spec in autogeneration logic - Add support for .bif generation in mkimage - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0006-tools-zynqmpimage-Add-partition-rea.patch 0007-tools-zynqmpimage-Move-defines-to-h.patch 0008-MAINTAINERS-Declare-tools-zynq-.-c-.patch 0009-tools-zynqmpimage-Add-bif-support.patch 0010-tools-zynqmpbif-Add-support-for-loa.patch - Add generic ZynqMP support - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0005-zynqmp-Add-generic-target.patch - Update to 2018.05-rc2 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch 0010-Temp-workaround-for-Chromebook-snow.patch * Patches added: 0004-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches added: 0010-Temp-workaround-for-Chromebook-snow.patch - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0009-rpi-Allow-to-boot-without-serial.patch 0010-mmc-use-core-clock-frequency-in-bcm.patch * Patches added: 0008-rpi-Allow-to-boot-without-serial.patch 0009-mmc-use-core-clock-frequency-in-bcm.patch - Update to 2018.05-rc1 - Patch queue updated from git://github.com/openSUSE/u-boot.git tumbleweed-2018.05 * Patches dropped: 0003-Revert-rockchip-mkimage-remove-plac.patch 0004-rpi-Use-firmware-provided-device-tr.patch 0005-rpi3-Enable-lan78xx-driver.patch 0006-net-Only-access-network-devices-aft.patch 0007-rpi-Add-identifier-for-the-new-RPi3.patch 0008-efi_loader-Fix-network-DP-with-DM_E.patch * Patches added: 0003-rpi-Use-firmware-provided-device-tr.patch 0004-rpi3-Enable-lan78xx-driver.patch 0005-rpi-Add-identifier-for-the-new-RPi3.patch 0006-efi_loader-Fix-network-DP-with-DM_E.patch 0007-mkimage-do-not-fail-if-there-is-no-.patch OBS-URL: https://build.opensuse.org/request/show/607419 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/u-boot?expand=0&rev=16
160 lines
5.5 KiB
Bash
160 lines
5.5 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Instead of a quilt workflow, we use a git tree that contains
|
|
# all the commits on top of a stable tarball.
|
|
#
|
|
# When updating this package, just either update the git tree
|
|
# below (use rebase!) or change the tree path and use your own
|
|
#
|
|
# That way we can easily rebase against the next stable release
|
|
# when it comes.
|
|
|
|
set -e
|
|
|
|
GIT_TREE=git://github.com/openSUSE/u-boot.git
|
|
GIT_LOCAL_TREE=~/git/u-boot-opensuse
|
|
GIT_BRANCH=tumbleweed-2018.05
|
|
GIT_UPSTREAM_TAG=v2018.05
|
|
GIT_DIR=/dev/shm/u-boot-factory-git-dir
|
|
CMP_DIR=/dev/shm/u-boot-factory-cmp-dir
|
|
|
|
rm -rf $GIT_DIR
|
|
rm -rf $CMP_DIR
|
|
|
|
if [ -d "$GIT_LOCAL_TREE" ]; then
|
|
echo "Processing $GIT_BRANCH branch of local git tree, using tag:" \
|
|
"$GIT_UPSTREAM_TAG"
|
|
if ! (cd $GIT_LOCAL_TREE && git show-branch $GIT_BRANCH &>/dev/null); then
|
|
echo "Error: Branch $GIT_BRANCH not found - please create a remote" \
|
|
"tracking branch of origin/$GIT_BRANCH"
|
|
exit
|
|
fi
|
|
git clone -ls $GIT_LOCAL_TREE $GIT_DIR -b $GIT_BRANCH
|
|
if ! (cd $GIT_LOCAL_TREE && git remote show upstream &>/dev/null); then
|
|
echo "Remote for upstream git tree not found. Next time add remote" \
|
|
"named upstream for git://git.denx.de/u-boot.git and update"
|
|
(cd $GIT_DIR && git remote add upstream git://git.denx.de/u-boot.git)
|
|
(cd $GIT_DIR && git remote update)
|
|
fi
|
|
else
|
|
echo "Processing $GIT_BRANCH branch of remote git tree, using tag:" \
|
|
"$GIT_UPSTREAM_TAG"
|
|
echo "(For much faster processing, consider establishing a local git tree" \
|
|
"at $GIT_LOCAL_TREE)"
|
|
git clone $GIT_TREE $GIT_DIR -b $GIT_BRANCH
|
|
(cd $GIT_DIR && git remote add upstream git://git.denx.de/u-boot.git)
|
|
(cd $GIT_DIR && git remote update)
|
|
fi
|
|
(cd $GIT_DIR && git format-patch -N $GIT_UPSTREAM_TAG --suffix= -o $CMP_DIR >/dev/null)
|
|
UBOOT_VERSION=$(egrep '^VERSION = ' $GIT_DIR/Makefile | cut -d ' ' -f 3)
|
|
UBOOT_PATCHLEVEL=$(egrep '^PATCHLEVEL = ' $GIT_DIR/Makefile | cut -d ' ' -f 3)
|
|
UBOOT_SUBLEVEL=$(egrep '^SUBLEVEL = ' $GIT_DIR/Makefile | cut -d ' ' -f 3)
|
|
UBOOT_EXTRAVERSION=$(egrep '^EXTRAVERSION = ' $GIT_DIR/Makefile | cut -d ' ' -f 3)
|
|
UBOOT_VERSION="${UBOOT_VERSION}.${UBOOT_PATCHLEVEL}"
|
|
if [ -n "${UBOOT_SUBLEVEL}" ]; then
|
|
UBOOT_VERSION="${UBOOT_VERSION}.${UBOOT_SUBLEVEL}"
|
|
fi
|
|
UBOOT_VERSION="${UBOOT_VERSION}${UBOOT_EXTRAVERSION}"
|
|
echo "U-Boot version: $UBOOT_VERSION"
|
|
|
|
rm -rf $GIT_DIR
|
|
|
|
(
|
|
CHANGED_COUNT=0
|
|
UNCHANGED_COUNT=0
|
|
DELETED_COUNT=0
|
|
ADDED_COUNT=0
|
|
|
|
shopt -s nullglob
|
|
|
|
# Process patches to eliminate useless differences: limit file names to 40 chars
|
|
# before extension and remove git signature. ('32' below gets us past dir prefix)
|
|
for i in $CMP_DIR/*; do
|
|
# format-patch may append a signature, which per default contains the git version
|
|
# wipe everything starting from the signature tag
|
|
sed '/^-- $/Q' $i > $CMP_DIR/${i:32:40}.patch
|
|
rm $i
|
|
done
|
|
|
|
for i in 0???-*.patch; do
|
|
if [ -e $CMP_DIR/$i ]; then
|
|
if cmp -s $CMP_DIR/$i $i; then
|
|
rm $CMP_DIR/$i
|
|
let UNCHANGED_COUNT+=1
|
|
else
|
|
mv $CMP_DIR/$i .
|
|
let CHANGED_COUNT+=1
|
|
fi
|
|
else
|
|
osc rm --force $i
|
|
let DELETED_COUNT+=1
|
|
echo " ${i##*/}" >> u-boot.changes.deleted
|
|
fi
|
|
done
|
|
|
|
for i in $CMP_DIR/*; do
|
|
mv $i .
|
|
osc add ${i##*/}
|
|
let ADDED_COUNT+=1
|
|
echo " ${i##*/}" >> u-boot.changes.added
|
|
done
|
|
|
|
for package in u-boot u-boot-board; do
|
|
while IFS= read -r line; do
|
|
if [ "$line" = "PATCH_FILES" ]; then
|
|
for i in 0???-*.patch; do
|
|
NUM=${i%%-*}
|
|
echo -e "Patch$NUM: $i"
|
|
done
|
|
elif [ "$line" = "PATCH_EXEC" ]; then
|
|
for i in 0???-*.patch; do
|
|
NUM=${i%%-*}
|
|
echo "%patch$NUM -p1"
|
|
done
|
|
elif [ "$line" = "ARCHIVE_VERSION" ]; then
|
|
echo "%define archive_version $UBOOT_VERSION"
|
|
elif [ "$line" = "UBOOT_VERSION" ]; then
|
|
echo "Version: $(echo $UBOOT_VERSION | sed 's/-/~/g')"
|
|
else
|
|
echo "$line"
|
|
fi
|
|
done < $package.spec.in > $package.spec.tmp
|
|
done
|
|
|
|
# Factory requires all deleted and added patches to be mentioned
|
|
if [ -e u-boot.changes.deleted ] || [ -e u-boot.changes.added ]; then
|
|
echo "Patch queue updated from ${GIT_TREE} ${GIT_BRANCH}" > u-boot.changes.proposed
|
|
fi
|
|
if [ -e u-boot.changes.deleted ]; then
|
|
echo "* Patches dropped:" >> u-boot.changes.proposed
|
|
cat u-boot.changes.deleted >> u-boot.changes.proposed
|
|
fi
|
|
if [ -e u-boot.changes.added ]; then
|
|
echo "* Patches added:" >> u-boot.changes.proposed
|
|
cat u-boot.changes.added >> u-boot.changes.proposed
|
|
fi
|
|
if [ -e u-boot.changes.proposed ]; then
|
|
osc vc --file=u-boot.changes.proposed u-boot
|
|
rm -f u-boot.changes.proposed
|
|
fi
|
|
if [ -e u-boot.changes.deleted ]; then
|
|
rm -f u-boot.changes.deleted
|
|
fi
|
|
if [ -e u-boot.changes.added ]; then
|
|
rm -f u-boot.changes.added
|
|
fi
|
|
echo "git patch summary"
|
|
echo " unchanged: $UNCHANGED_COUNT"
|
|
echo " changed: $CHANGED_COUNT"
|
|
echo " deleted: $DELETED_COUNT"
|
|
echo " added: $ADDED_COUNT"
|
|
)
|
|
|
|
rm -rf $CMP_DIR
|
|
|
|
osc service localrun format_spec_file
|
|
|
|
/bin/sh pre_checkin.sh
|
|
|
|
echo "Please remember to run pre_checkin.sh after modifying u-boot.changes."
|