mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Force kernel version correctly
This commit is contained in:
parent
de060afa82
commit
aa64f21ee0
1 changed files with 10 additions and 14 deletions
24
build.sh
24
build.sh
|
@ -37,11 +37,7 @@ OMR_ALL_PACKAGES=${OMR_ALL_PACKAGES:-no}
|
|||
OMR_TARGET=${OMR_TARGET:-x86_64}
|
||||
OMR_TARGET_CONFIG="config-$OMR_TARGET"
|
||||
UPSTREAM=${UPSTREAM:-no}
|
||||
if [ "$UPSTREAM" = "no" ]; then
|
||||
OMR_KERNEL=${OMR_KERNEL:-5.4}
|
||||
else
|
||||
OMR_KERNEL=${OMR_KERNEL:-5.14}
|
||||
fi
|
||||
OMR_KERNEL=${OMR_KERNEL:-5.14}
|
||||
SHORTCUT_FE=${SHORTCUT_FE:-no}
|
||||
#OMR_RELEASE=${OMR_RELEASE:-$(git describe --tags `git rev-list --tags --max-count=1` | sed 's/^\([0-9.]*\).*/\1/')}
|
||||
#OMR_RELEASE=${OMR_RELEASE:-$(git tag --sort=committerdate | tail -1)}
|
||||
|
@ -370,7 +366,7 @@ echo "Done"
|
|||
#echo "Done"
|
||||
|
||||
# Add BBR2 patch, only working on 64bits images for now
|
||||
if [ "$UPSTREAM" = "no" ] && [ "$OMR_KERNEL" != "5.14" ] && ([ "$OMR_TARGET" = "x86_64" ] || [ "$OMR_TARGET" = "bpi-r64" ] || [ "$OMR_TARGET" = "rpi4" ] || [ "$OMR_TARGET" = "espressobin" ] || [ "$OMR_TARGET" = "r2s" ] || [ "$OMR_TARGET" = "r4s" ] || [ "$OMR_TARGET" = "rpi3" ]); then
|
||||
if [ "$OMR_KERNEL" != "5.14" ] && ([ "$OMR_TARGET" = "x86_64" ] || [ "$OMR_TARGET" = "bpi-r64" ] || [ "$OMR_TARGET" = "rpi4" ] || [ "$OMR_TARGET" = "espressobin" ] || [ "$OMR_TARGET" = "r2s" ] || [ "$OMR_TARGET" = "r4s" ] || [ "$OMR_TARGET" = "rpi3" ]); then
|
||||
echo "Checking if BBRv2 patch is set or not"
|
||||
if ! patch -Rf -N -p1 -s --dry-run < ../../patches/bbr2.patch; then
|
||||
echo "apply..."
|
||||
|
@ -443,16 +439,16 @@ fi
|
|||
|
||||
if [ "$OMR_KERNEL" = "5.4" ]; then
|
||||
echo "Set to kernel 5.4 for rpi arch"
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.19%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.4 for x86 arch"
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.19%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.4 for mvebu arch (WRT)"
|
||||
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.19%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.4 for mediatek arch (BPI-R2)"
|
||||
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=4.19%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' {} \;
|
||||
echo "Done"
|
||||
fi
|
||||
if [ "$OMR_KERNEL" = "5.10" ]; then
|
||||
|
@ -472,17 +468,17 @@ if [ "$OMR_KERNEL" = "5.10" ]; then
|
|||
fi
|
||||
if [ "$OMR_KERNEL" = "5.14" ]; then
|
||||
echo "Set to kernel 5.14 for rpi arch"
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for x86 arch"
|
||||
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for mvebu arch (WRT)"
|
||||
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
echo "Set to kernel 5.14 for mediatek arch (BPI-R2)"
|
||||
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.4%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.14%g' {} \;
|
||||
echo "Done"
|
||||
rm -rf /target/linux/generic/files/drivers/net/phy/b53
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue