cb44573117
- Switch to 5.15 branch - Update to 85100e1f3d44 (2021-12-02) OBS-URL: https://build.opensuse.org/request/show/935974 OBS-URL: https://build.opensuse.org/package/show/hardware:boot/raspberrypi-firmware-dt?expand=0&rev=84
40 lines
1.2 KiB
Bash
40 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
LINUX_BRANCH=rpi-5.15.y
|
|
|
|
# this is a huge hunk of stuff, so reuse the local repo if possible
|
|
if [ -d linux/.git ]; then
|
|
set -e
|
|
cd linux
|
|
git remote update
|
|
# Check we are on the right branch, otherwise clone the right one
|
|
git checkout origin/$LINUX_BRANCH || (cd .. && (echo "ERROR: Please remove the linux folder as we cannot switch to $LINUX_BRANCH branch"; exit 1) )
|
|
cd ..
|
|
set +e
|
|
else
|
|
set -e
|
|
git clone -b $LINUX_BRANCH --depth 1 --no-single-branch https://github.com/raspberrypi/linux.git
|
|
set +e
|
|
fi
|
|
|
|
TOPDIR=$(pwd)
|
|
|
|
# Copy device tree files
|
|
SOURCES="COPYING arch/arm/boot/dts arch/arm64/boot/dts/broadcom/*bcm27* scripts/dtc/include-prefixes/ include"
|
|
cd linux
|
|
LINE=$(git log --format=format:"%h %ai" -- ${SOURCES}|head -n 1)
|
|
set -- $LINE
|
|
REV=$1
|
|
DATE=$2
|
|
VER=${DATE//-/.}
|
|
set -e
|
|
git archive --prefix=raspberrypi-firmware-dt-$VER/ -o $TOPDIR/raspberrypi-firmware-dt-${VER}.tar HEAD -- ${SOURCES}
|
|
cd ..
|
|
osc rm -f raspberrypi-firmware-dt-*.tar.xz || true
|
|
xz --force raspberrypi-firmware-dt-${VER}.tar
|
|
osc add raspberrypi-firmware-dt-${VER}.tar.xz
|
|
|
|
sed -i "s/^Version:.*/Version: $VER/" raspberrypi-firmware-dt.spec
|
|
osc vc raspberrypi-firmware-dt -m "Update to $REV ($DATE)"
|
|
sh pre_checkin.sh
|