2017-12-22 11:08:56 +01:00
#!/bin/sh
2020-10-27 18:32:21 +01:00
#
# Copyright (C) 2017 OVH OverTheBox
2024-11-05 14:34:30 +01:00
# Copyright (C) 2017-2024 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter project
2020-10-27 18:32:21 +01:00
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
2017-12-22 11:08:56 +01:00
set -e
umask 0022
unset GREP_OPTIONS SED
2018-07-18 22:36:20 +02:00
_get_repo( ) (
mkdir -p " $1 "
cd " $1 "
[ -d .git ] || git init
if git remote get-url origin >/dev/null 2>/dev/null; then
git remote set-url origin " $2 "
else
git remote add origin " $2 "
fi
2019-08-22 09:03:52 +02:00
git fetch origin -f
git fetch origin --tags -f
2025-02-06 14:25:30 +01:00
git checkout -f " origin/ $3 " -B "build" 2>/dev/null || git checkout -f " $3 " -B "build"
2018-07-18 22:36:20 +02:00
)
2017-12-22 11:08:56 +01:00
2018-02-02 11:23:20 +01:00
OMR_DIST = ${ OMR_DIST :- openmptcprouter }
2018-01-23 15:56:13 +01:00
OMR_HOST = ${ OMR_HOST :- $( curl -sS ifconfig.co) }
2020-09-24 10:07:49 +02:00
OMR_PORT = ${ OMR_PORT :- 80 }
2018-01-26 22:53:41 +01:00
OMR_KEEPBIN = ${ OMR_KEEPBIN :- no }
2018-02-23 09:46:51 +01:00
OMR_IMG = ${ OMR_IMG :- yes }
2020-04-01 14:47:18 +02:00
#OMR_UEFI=${OMR_UEFI:-yes}
2020-06-09 22:40:38 +02:00
OMR_PACKAGES = ${ OMR_PACKAGES :- full }
2018-04-05 17:16:42 +02:00
OMR_ALL_PACKAGES = ${ OMR_ALL_PACKAGES :- no }
2017-12-22 11:08:56 +01:00
OMR_TARGET = ${ OMR_TARGET :- x86_64 }
OMR_TARGET_CONFIG = " config- $OMR_TARGET "
2021-09-28 15:11:38 +02:00
UPSTREAM = ${ UPSTREAM :- no }
2025-02-12 16:27:22 +01:00
#SYSLOG=${SYSLOG:-busybox-syslogd}
SYSLOG = ${ SYSLOG :- syslog -ng }
2021-09-29 10:56:05 +02:00
OMR_KERNEL = ${ OMR_KERNEL :- 5 .4 }
2021-04-15 20:24:52 +02:00
SHORTCUT_FE = ${ SHORTCUT_FE :- no }
2024-04-23 09:31:08 +02:00
DISABLE_FAILSAFE = ${ DISABLE_FAILSAFE :- no }
2020-06-26 21:23:24 +02:00
#OMR_RELEASE=${OMR_RELEASE:-$(git describe --tags `git rev-list --tags --max-count=1` | sed 's/^\([0-9.]*\).*/\1/')}
2020-09-18 16:33:44 +02:00
#OMR_RELEASE=${OMR_RELEASE:-$(git tag --sort=committerdate | tail -1)}
2024-04-02 20:32:46 +02:00
OMR_RELEASE = ${ OMR_RELEASE :- $( git describe --tags ` git rev-list --tags --max-count= 1` | tail -1) }
2022-08-29 20:06:44 +02:00
OMR_REPO = ${ OMR_REPO :- http : // $OMR_HOST : $OMR_PORT /release/ $OMR_RELEASE - $OMR_KERNEL / $OMR_TARGET }
2017-12-22 11:08:56 +01:00
OMR_FEED_URL = " ${ OMR_FEED_URL :- https : //github.com/ysurac/openmptcprouter-feeds } "
2019-12-18 19:22:08 +01:00
OMR_FEED_SRC = " ${ OMR_FEED_SRC :- develop } "
2017-12-22 11:08:56 +01:00
2020-08-03 16:53:41 +02:00
CUSTOM_FEED_URL = " ${ CUSTOM_FEED_URL } "
2023-09-08 15:57:49 +02:00
CUSTOM_FEED_URL_BRANCH = " ${ CUSTOM_FEED_URL_BRANCH :- main } "
2020-08-03 16:53:41 +02:00
2020-04-09 14:57:08 +02:00
OMR_OPENWRT = ${ OMR_OPENWRT :- default }
2024-11-14 10:20:59 +01:00
OMR_OPENWRT_GIT = ${ OMR_OPENWRT_GIT :- https : //github.com }
2021-03-05 16:28:10 +01:00
OMR_FORCE_DSA = ${ OMR_FORCE_DSA :- 0 }
2024-06-06 11:55:00 +02:00
2023-09-29 17:05:03 +02:00
if [ " $OMR_KERNEL " = "5.4" ] && [ " $OMR_TARGET " = "rutx12" ] ; then
OMR_TARGET_CONFIG = "config-rutx"
fi
2017-12-22 11:08:56 +01:00
if [ ! -f " $OMR_TARGET_CONFIG " ] ; then
echo " Target $OMR_TARGET not found ! "
2018-05-11 15:14:40 +02:00
#exit 1
2017-12-22 11:08:56 +01:00
fi
2018-04-17 09:35:12 +02:00
if [ " $OMR_TARGET " = "rpi3" ] ; then
2018-04-17 09:49:09 +02:00
OMR_REAL_TARGET = "aarch64_cortex-a53"
2019-06-25 18:01:36 +02:00
elif [ " $OMR_TARGET " = "rpi4" ] ; then
OMR_REAL_TARGET = "aarch64_cortex-a72"
2018-05-18 15:38:15 +02:00
elif [ " $OMR_TARGET " = "rpi2" ] ; then
OMR_REAL_TARGET = "arm_cortex-a7_neon-vfpv4"
2018-12-23 14:10:39 +01:00
elif [ " $OMR_TARGET " = "wrt3200acm" ] ; then
2021-03-23 15:55:55 +01:00
OMR_REAL_TARGET = "arm_cortex-a9_vfpv3-d16"
2018-12-23 14:10:39 +01:00
elif [ " $OMR_TARGET " = "wrt32x" ] ; then
2021-03-23 15:55:55 +01:00
OMR_REAL_TARGET = "arm_cortex-a9_vfpv3-d16"
2021-03-03 13:12:28 +01:00
elif [ " $OMR_TARGET " = "bpi-r1" ] ; then
2021-03-03 21:43:20 +01:00
OMR_REAL_TARGET = "arm_cortex-a7_neon-vfpv4"
2018-08-28 12:14:12 +02:00
elif [ " $OMR_TARGET " = "bpi-r2" ] ; then
2022-02-23 20:58:19 +01:00
OMR_REAL_TARGET = "arm_cortex-a7_neon-vfpv4"
elif [ " $OMR_TARGET " = "rutx" ] ; then
2018-08-28 12:14:12 +02:00
OMR_REAL_TARGET = "arm_cortex-a7_neon-vfpv4"
2023-09-29 17:05:03 +02:00
elif [ " $OMR_TARGET " = "rutx12" ] ; then
OMR_REAL_TARGET = "arm_cortex-a7_neon-vfpv4"
elif [ " $OMR_TARGET " = "rutx50" ] ; then
OMR_REAL_TARGET = "arm_cortex-a7_neon-vfpv4"
2020-07-10 22:20:19 +02:00
elif [ " $OMR_TARGET " = "bpi-r64" ] ; then
OMR_REAL_TARGET = "aarch64_cortex-a53"
2020-07-20 15:14:13 +02:00
elif [ " $OMR_TARGET " = "espressobin" ] ; then
OMR_REAL_TARGET = "aarch64_cortex-a53"
2024-11-06 17:45:22 +01:00
elif [ " $OMR_TARGET " = "z8102ax_128m" ] || [ " $OMR_TARGET " = "z8102ax_64m" ] ; then
OMR_REAL_TARGET = "aarch64_cortex-a53"
2025-01-21 16:43:41 +01:00
elif [ " $OMR_TARGET " = "bpi-r4" ] || [ " $OMR_TARGET " = "bpi-r4-poe" ] || [ " $OMR_TARGET " = "bpi-r3" ] || [ " $OMR_TARGET " = "bpi-r3-mini" ] ; then
2024-02-01 13:57:07 +01:00
OMR_REAL_TARGET = "aarch64_cortex-a53"
2019-10-23 17:06:10 +02:00
elif [ " $OMR_TARGET " = "x86" ] ; then
OMR_REAL_TARGET = "i386_pentium4"
2021-05-19 19:27:59 +02:00
elif [ " $OMR_TARGET " = "r2s" ] ; then
OMR_REAL_TARGET = "aarch64_generic"
elif [ " $OMR_TARGET " = "r4s" ] ; then
OMR_REAL_TARGET = "aarch64_generic"
2024-02-01 13:57:07 +01:00
elif [ " $OMR_TARGET " = "r5s" ] ; then
OMR_REAL_TARGET = "aarch64_generic"
2021-05-19 19:27:59 +02:00
elif [ " $OMR_TARGET " = "ubnt-erx" ] ; then
OMR_REAL_TARGET = "mipsel_24kc"
2018-04-17 08:32:01 +02:00
else
2018-04-17 09:49:09 +02:00
OMR_REAL_TARGET = ${ OMR_TARGET }
2018-04-17 08:32:01 +02:00
fi
2024-11-14 10:20:59 +01:00
if [ " $ONLY_PREPARE " != "yes" ] ; then
#_get_repo source https://github.com/ysurac/openmptcprouter-source "master"
if [ " $OMR_OPENWRT " = "default" ] ; then
if [ " $OMR_KERNEL " = "5.4" ] ; then
# Use OpenWrt 21.02 for 5.4 kernel
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /openwrt/openwrt "170d9e447df0f52882a8b7a61bf940b062b2cacc"
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /openwrt/packages "b3a6bb839059546a52df00af3e1aa97dba75de22"
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/luci "e4c46338b196e486a88b1a75b78e283708c82bc4"
elif [ " $OMR_KERNEL " = "6.1" ] ; then
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /openwrt/openwrt "acf40c022e3d8949c7bb1f9c5212eb91512ae8a9"
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /openwrt/packages "3ee7b46610e9dbd8fd2bba87bd06024cd0d9c08f"
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/luci "ddda66aa8caa5e929cf7a542a79e2c3ce69eb66c"
2024-12-11 15:33:21 +01:00
elif [ " $OMR_KERNEL " = "6.6" ] || [ " $OMR_KERNEL " = "6.10" ] || [ " $OMR_KERNEL " = "6.11" ] ; then
2024-12-18 15:02:50 +01:00
# Use OpenWRT 24.10 for 6.6 kernel
2025-02-06 14:25:30 +01:00
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /openwrt/openwrt "92e020b50f04535009c91aa708bdb7598f1d9d4a"
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /openwrt/packages "de69db6abd833d9826668ab21ec488439ce9523a"
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/luci "4f7a183b26c2784c5f64937deec9cafa91d0295a"
2025-01-21 16:43:41 +01:00
_get_repo feeds/${ OMR_KERNEL } /routing ${ OMR_OPENWRT_GIT } /openwrt/routing "e87b55c6a642947ad7e24cd5054a637df63d5dbe"
2024-12-11 15:33:21 +01:00
elif [ " $OMR_KERNEL " = "6.12" ] ; then
2025-02-06 14:25:30 +01:00
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /openwrt/openwrt "f480fa60d3dd23ba753aaba3616799fc8fd1af46"
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /openwrt/packages "7c58cd667bb37fd6aec9b4fd625bd6962ec1ed0f"
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/luci "b3d292bf3d9e8761b307f5496ef7ea5f05433bdd"
2025-01-16 16:54:00 +01:00
_get_repo feeds/${ OMR_KERNEL } /routing ${ OMR_OPENWRT_GIT } /openwrt/routing "4a65e359c301d30b70e448e8c25c6edc9c909be5"
2024-11-14 10:20:59 +01:00
fi
elif [ " $OMR_OPENWRT " = "coolsnowwolfmix" ] ; then
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /coolsnowwolf/lede.git "master"
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /openwrt/packages "master"
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/luci "master"
elif [ " $OMR_OPENWRT " = "coolsnowwolf" ] ; then
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /coolsnowwolf/lede.git "master"
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /coolsnowwolf/packages "master"
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /coolsnowwolf/luci "master"
elif [ " $OMR_OPENWRT " = "master" ] ; then
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /openwrt/openwrt "main"
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /openwrt/packages "main"
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/luci "main"
2024-12-11 15:33:21 +01:00
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/routing "main"
2024-11-14 10:20:59 +01:00
else
_get_repo " $OMR_TARGET / ${ OMR_KERNEL } /source " ${ OMR_OPENWRT_GIT } /openwrt/openwrt " ${ OMR_OPENWRT } "
_get_repo feeds/${ OMR_KERNEL } /packages ${ OMR_OPENWRT_GIT } /openwrt/packages " ${ OMR_OPENWRT } "
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/luci " ${ OMR_OPENWRT } "
2024-12-11 15:33:21 +01:00
_get_repo feeds/${ OMR_KERNEL } /luci ${ OMR_OPENWRT_GIT } /openwrt/routing " ${ OMR_OPENWRT } "
2021-10-06 16:33:35 +02:00
fi
2024-11-14 17:37:10 +01:00
fi
2017-12-22 11:08:56 +01:00
2024-11-14 17:37:10 +01:00
if [ -z " $OMR_FEED " ] ; then
OMR_FEED = feeds/openmptcprouter
[ " $ONLY_PREPARE " != "yes" ] && _get_repo " $OMR_FEED " " $OMR_FEED_URL " " $OMR_FEED_SRC "
fi
2017-12-22 11:08:56 +01:00
2024-11-14 17:37:10 +01:00
if [ -n " $CUSTOM_FEED_URL " ] && [ -z " $CUSTOM_FEED " ] ; then
CUSTOM_FEED = feeds/${ OMR_KERNEL } /${ OMR_DIST }
[ " $ONLY_PREPARE " != "yes" ] && _get_repo " $CUSTOM_FEED " " $CUSTOM_FEED_URL " " $CUSTOM_FEED_URL_BRANCH "
2020-08-03 16:53:41 +02:00
fi
2017-12-22 11:08:56 +01:00
if [ -n " $1 " ] && [ -f " $OMR_FEED / $1 /Makefile " ] ; then
OMR_DIST = $1
shift 1
fi
2018-01-26 22:58:20 +01:00
if [ " $OMR_KEEPBIN " = "no" ] ; then
2022-06-01 08:11:16 +02:00
rm -rf " $OMR_TARGET / ${ OMR_KERNEL } /source/bin "
2018-01-26 22:58:20 +01:00
fi
2024-11-14 10:20:59 +01:00
if [ " $ONLY_GET_REPO " = "yes" ] ; then
exit 0
fi
2022-06-01 08:11:16 +02:00
rm -rf " $OMR_TARGET / ${ OMR_KERNEL } /source/files " " $OMR_TARGET / ${ OMR_KERNEL } /source/tmp "
#rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/mediatek/patches-4.14"
2022-07-07 19:40:38 +02:00
#rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/mediatek/patches-5.4"
2022-09-12 19:52:12 +02:00
#rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/package/boot/uboot-mediatek"
#rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/package/boot/arm-trusted-firmware-mediatek"
2023-12-29 21:36:15 +01:00
if [ " ${ OMR_KERNEL } " = "5.4" ] ; then
echo " rm -rf $OMR_TARGET / ${ OMR_KERNEL } /source/package/boot/uboot-rockchip "
rm -rf " ${ OMR_TARGET } / ${ OMR_KERNEL } /source/package/boot/uboot-rockchip "
fi
2023-07-31 21:32:39 +02:00
echo " rm -rf $OMR_TARGET / ${ OMR_KERNEL } /source/package/boot/uboot-mvebu "
rm -rf " ${ OMR_TARGET } / ${ OMR_KERNEL } /source/package/boot/uboot-mvebu "
2024-10-22 15:47:51 +02:00
[ " ${ OMR_KERNEL } " = "6.1" ] || [ " ${ OMR_KERNEL } " = "6.6" ] || [ " ${ OMR_KERNEL } " = "6.10" ] || [ " ${ OMR_KERNEL } " = "6.11" ] || [ " ${ OMR_KERNEL } " = "6.12" ] && {
2023-08-11 21:25:23 +02:00
echo " rm -rf $OMR_TARGET / ${ OMR_KERNEL } /source/package/boot/uboot-ipq40xx "
rm -rf " ${ OMR_TARGET } / ${ OMR_KERNEL } /source/package/boot/uboot-ipq40xx "
}
2023-11-17 17:31:36 +01:00
[ " ${ OMR_KERNEL } " = "6.1" ] && {
rm -rf " ${ OMR_TARGET } / ${ OMR_KERNEL } /source/target/linux/bcm27xx/patches-6.1 "
}
2025-01-06 18:23:04 +01:00
#[ "${OMR_KERNEL}" = "6.6" ] && {
# rm -rf "${OMR_TARGET}/${OMR_KERNEL}/source/package/libs/mbedtls"
#}
#[ "${OMR_KERNEL}" = "6.12" ] && {
# rm -rf "${OMR_TARGET}/${OMR_KERNEL}/source/package/libs/mbedtls"
#}
2023-06-25 08:24:35 +02:00
2024-08-09 09:10:51 +02:00
# Remove current dwarves directory to replace with fixed package
2025-01-09 10:06:18 +01:00
#rm -rf "${OMR_TARGET}/${OMR_KERNEL}/source/tools/dwarves"
2024-08-09 09:10:51 +02:00
2023-06-25 08:24:35 +02:00
[ " ${ OMR_KERNEL } " = "5.4" ] && rm -rf " $OMR_TARGET / ${ OMR_KERNEL } /source/tools/firmware-utils "
2023-09-29 17:05:03 +02:00
if ( [ " $OMR_TARGET " = "rutx" ] || [ " $OMR_TARGET " = "rutx12" ] ) && [ " ${ OMR_KERNEL } " = "5.4" ] ; then
2023-06-30 12:49:02 +02:00
# cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
cp -rf common/* " $OMR_TARGET / ${ OMR_KERNEL } /source/ "
cp -rf ${ OMR_KERNEL } /* " $OMR_TARGET / ${ OMR_KERNEL } /source/ "
else
2022-06-19 09:48:17 +02:00
# There is many customization to support rutx and this seems to break other ipq40xx, so dirty workaround for now
2023-06-30 12:49:02 +02:00
# [ -d "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" ] && mv -f "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old"
2023-04-22 08:07:24 +02:00
# cp -rf root/* "$OMR_TARGET/${OMR_KERNEL}/source"
echo " cp -rf common/* $OMR_TARGET / ${ OMR_KERNEL } /source "
cp -rf common/* " $OMR_TARGET / ${ OMR_KERNEL } /source "
echo " cp -rf ${ OMR_KERNEL } /* $OMR_TARGET / ${ OMR_KERNEL } /source "
cp -rf ${ OMR_KERNEL } /* " $OMR_TARGET / ${ OMR_KERNEL } /source "
2023-06-30 12:49:02 +02:00
# rm -rf "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
# mv -f "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx.old" "$OMR_TARGET/${OMR_KERNEL}/source/target/linux/ipq40xx"
2022-06-19 09:48:17 +02:00
fi
2024-02-11 07:32:13 +01:00
if [ -n " $CUSTOM_FEED " ] && [ -d ${ CUSTOM_FEED } /source/${ OMR_TARGET } /${ OMR_KERNEL } ] ; then
echo " Copy ${ CUSTOM_FEED } /source/ ${ OMR_TARGET } / ${ OMR_KERNEL } /* to $OMR_TARGET / ${ OMR_KERNEL } /source "
cp -rf ${ CUSTOM_FEED } /source/${ OMR_TARGET } /${ OMR_KERNEL } /* " $OMR_TARGET / ${ OMR_KERNEL } /source "
fi
2017-12-22 11:08:56 +01:00
2022-06-01 08:11:16 +02:00
cat >> " $OMR_TARGET / ${ OMR_KERNEL } /source/package/base-files/files/etc/banner " <<EOF
2017-12-22 11:08:56 +01:00
-----------------------------------------------------
PACKAGE: $OMR_DIST
2022-08-29 20:06:44 +02:00
VERSION: $OMR_RELEASE
2021-05-21 19:54:58 +02:00
TARGET: $OMR_TARGET
ARCH: $OMR_REAL_TARGET
2017-12-22 11:08:56 +01:00
BUILD REPO: $( git config --get remote.origin.url)
BUILD DATE: $( date -u)
-----------------------------------------------------
EOF
2022-06-01 08:11:16 +02:00
cat > " $OMR_TARGET / ${ OMR_KERNEL } /source/feeds.conf " <<EOF
src-link packages $( readlink -f feeds/${ OMR_KERNEL } /packages)
src-link luci $( readlink -f feeds/${ OMR_KERNEL } /luci)
2017-12-22 11:08:56 +01:00
src-link openmptcprouter $( readlink -f " $OMR_FEED " )
EOF
2020-08-03 16:53:41 +02:00
if [ -n " $CUSTOM_FEED " ] ; then
2022-06-01 08:11:16 +02:00
echo " src-link ${ OMR_DIST } $( readlink -f ${ CUSTOM_FEED } ) " >> " $OMR_TARGET / ${ OMR_KERNEL } /source/feeds.conf "
2020-08-03 16:53:41 +02:00
fi
2024-12-14 08:36:54 +01:00
if [ " $OMR_KERNEL " != "6.12" ] ; then
if [ " $OMR_DIST " = "openmptcprouter" ] ; then
cat > " $OMR_TARGET / ${ OMR_KERNEL } /source/package/system/opkg/files/customfeeds.conf " <<-EOF
src/gz openwrt_luci http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /luci
src/gz openwrt_packages http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /packages
src/gz openwrt_base http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /base
src/gz openwrt_routing http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /routing
src/gz openwrt_telephony http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /telephony
EOF
elif [ -n " $OMR_PACKAGES_URL " ] ; then
cat > " $OMR_TARGET / ${ OMR_KERNEL } /source/package/system/opkg/files/customfeeds.conf " <<-EOF
src/gz openwrt_luci ${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /luci
src/gz openwrt_packages ${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /packages
src/gz openwrt_base ${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /base
src/gz openwrt_routing ${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /routing
src/gz openwrt_telephony ${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /telephony
EOF
else
# cat > "$OMR_TARGET/${OMR_KERNEL}/source/package/system/opkg/files/customfeeds.conf" <<-EOF
# src/gz openwrt_luci http://downloads.openwrt.org/snapshots/packages/${OMR_REAL_TARGET}/luci
# src/gz openwrt_packages http://downloads.openwrt.org/snapshots/packages/${OMR_REAL_TARGET}/packages
# src/gz openwrt_base http://downloads.openwrt.org/snapshots/packages/${OMR_REAL_TARGET}/base
# src/gz openwrt_routing http://downloads.openwrt.org/snapshots/packages/${OMR_REAL_TARGET}/routing
# src/gz openwrt_telephony http://downloads.openwrt.org/snapshots/packages/${OMR_REAL_TARGET}/telephony
# EOF
# Force use of opkg ipk packages
cat > " $OMR_TARGET / ${ OMR_KERNEL } /source/package/system/opkg/files/customfeeds.conf " <<-EOF
src/gz openwrt_luci http://downloads.openwrt.org/releases/packages-24.10/${ OMR_REAL_TARGET } /luci
src/gz openwrt_packages http://downloads.openwrt.org/releases/packages-24.10/${ OMR_REAL_TARGET } /packages
src/gz openwrt_base http://downloads.openwrt.org/releases/packages-24.10/${ OMR_REAL_TARGET } /base
src/gz openwrt_routing http://downloads.openwrt.org/releases/packages-24.10/${ OMR_REAL_TARGET } /routing
src/gz openwrt_telephony http://downloads.openwrt.org/releases/packages-24.10/${ OMR_REAL_TARGET } /telephony
EOF
fi
2020-06-10 20:25:34 +02:00
else
2024-12-14 08:36:54 +01:00
if [ " $OMR_DIST " = "openmptcprouter" ] ; then
cat > " $OMR_TARGET / ${ OMR_KERNEL } /source/package/system/apk/files/customfeeds.list " <<-EOF
http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /luci/packages.adb
http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /packages/packages.adb
http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /base/packages.adb
http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /routing/packages.adb
http://packages.openmptcprouter.com/${ OMR_RELEASE } /${ OMR_REAL_TARGET } /telephony/packages.adb
EOF
elif [ -n " $OMR_PACKAGES_URL " ] ; then
cat > " $OMR_TARGET / ${ OMR_KERNEL } /source/package/system/apk/files/customfeeds.list " <<-EOF
${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /luci/packages.adb
${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /packages/packages.adb
${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /base/packages.adb
${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /routing/packages.adb
${ OMR_PACKAGES_URL } /${ OMR_RELEASE } /${ OMR_REAL_TARGET } /telephony/packages.adb
EOF
else
cat > " $OMR_TARGET / ${ OMR_KERNEL } /source/package/system/apk/files/customfeeds.list " <<-EOF
http://downloads.openwrt.org/snapshots/packages/${ OMR_REAL_TARGET } /luci/packages.adb
http://downloads.openwrt.org/snapshots/packages/${ OMR_REAL_TARGET } /packages/packages.adb
http://downloads.openwrt.org/snapshots/packages/${ OMR_REAL_TARGET } /base/packages.adb
http://downloads.openwrt.org/snapshots/packages/${ OMR_REAL_TARGET } /routing/packages.adb
http://downloads.openwrt.org/snapshots/packages/${ OMR_REAL_TARGET } /telephony/packages.adb
EOF
fi
2020-06-10 20:25:34 +02:00
fi
2018-04-17 08:32:01 +02:00
2022-02-04 22:39:13 +01:00
if [ -f $OMR_TARGET_CONFIG ] ; then
2022-06-01 08:11:16 +02:00
cat " $OMR_TARGET_CONFIG " config -> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config " <<-EOF
2018-05-18 10:26:49 +02:00
CONFIG_IMAGEOPT = y
CONFIG_VERSIONOPT = y
CONFIG_VERSION_DIST = " $OMR_DIST "
CONFIG_VERSION_REPO = " $OMR_REPO "
2022-02-07 20:04:20 +01:00
CONFIG_VERSION_NUMBER = " ${ OMR_RELEASE } - ${ OMR_KERNEL } "
2018-05-18 10:26:49 +02:00
EOF
else
2022-06-01 08:11:16 +02:00
cat config -> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config " <<-EOF
2018-05-18 10:26:49 +02:00
CONFIG_IMAGEOPT = y
CONFIG_VERSIONOPT = y
CONFIG_VERSION_DIST = " $OMR_DIST "
CONFIG_VERSION_REPO = " $OMR_REPO "
2022-02-07 20:04:20 +01:00
CONFIG_VERSION_NUMBER = " ${ OMR_RELEASE } - ${ OMR_FEED_SRC } - $( git -C " $OMR_FEED " rev-parse --short HEAD) "
2018-05-18 10:26:49 +02:00
EOF
fi
2022-06-01 08:11:16 +02:00
#if [ "${OMR_KERNEL}" = "5.14" ]; then
# echo 'CONFIG_KERNEL_GIT_CLONE_URI="https://github.com/multipath-tcp/mptcp_net-next.git"' >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
# echo 'CONFIG_KERNEL_GIT_REF="78828adaef8fe9b69f9a8c4b60f74b01c5a31c7a"' >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
2021-09-27 18:18:30 +02:00
#fi
2018-04-05 17:16:42 +02:00
if [ " $OMR_ALL_PACKAGES " = "yes" ] ; then
2022-06-01 08:11:16 +02:00
echo 'CONFIG_ALL=y' >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo 'CONFIG_ALL_NONSHARED=y' >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2018-04-05 17:16:42 +02:00
fi
2018-02-14 10:28:01 +01:00
if [ " $OMR_IMG " = "yes" ] && [ " $OMR_TARGET " = "x86_64" ] ; then
2022-06-01 08:11:16 +02:00
echo 'CONFIG_VDI_IMAGES=y' >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo 'CONFIG_VMDK_IMAGES=y' >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo 'CONFIG_VHDX_IMAGES=y' >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2018-02-14 10:28:01 +01:00
fi
2017-12-22 11:08:56 +01:00
2024-04-23 09:31:08 +02:00
if [ " $DISABLE_FAILSAFE " = "yes" ] ; then
rm -f " $OMR_TARGET / ${ OMR_KERNEL } /source/package/base-files/files/lib/preinit/30_failsafe_wait "
rm -f " $OMR_TARGET / ${ OMR_KERNEL } /source/package/base-files/files/lib/preinit/40_run_failsafe_hook "
fi
2024-08-17 17:03:02 +02:00
echo " CONFIG_PACKAGE_ ${ OMR_DIST } - ${ OMR_PACKAGES } =y " >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2020-06-09 22:40:38 +02:00
2024-06-06 11:55:00 +02:00
if [ " $SYSLOG " = "busybox-syslogd" ] ; then
echo "CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo "CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_CFG=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo "CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMP=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo "CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo "CONFIG_BUSYBOX_CONFIG_FEATURE_REMOTE_LOG=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo "CONFIG_BUSYBOX_CONFIG_SYSLOGD=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2024-06-06 15:19:34 +02:00
echo "CONFIG_BUSYBOX_CONFIG_LOGREAD=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2024-06-06 11:55:00 +02:00
echo "CONFIG_PACKAGE_syslogd=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
elif [ " $SYSLOG " = "syslog-ng" ] ; then
echo "CONFIG_PACKAGE_syslog-ng=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
fi
2022-12-21 12:56:40 +01:00
if [ " $SHORTCUT_FE " = "yes" ] ; then
2022-12-21 18:54:18 +01:00
echo "CONFIG_PACKAGE_kmod-fast-classifier=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2022-06-01 08:11:16 +02:00
echo "CONFIG_PACKAGE_kmod-shortcut-fe=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2022-12-21 12:56:40 +01:00
echo "CONFIG_PACKAGE_kmod-shortcut-fe-cm=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo "CONFIG_PACKAGE_shortcut-fe-drv=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2021-04-15 20:24:52 +02:00
else
2022-12-21 18:54:18 +01:00
echo "# CONFIG_PACKAGE_kmod-fast-classifier is not set" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2022-06-01 08:11:16 +02:00
echo "# CONFIG_PACKAGE_kmod-shortcut-fe-cm is not set" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
echo "# CONFIG_PACKAGE_kmod-shortcut-fe is not set" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2022-12-21 12:56:40 +01:00
echo "# CONFIG_PACKAGE_shortcut-fe is not set" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2021-04-15 20:24:52 +02:00
fi
2021-11-24 12:00:33 +01:00
if [ " $OMR_KERNEL " != "5.4" ] && [ " $OMR_TARGET " != "x86_64" ] && [ " $OMR_TARGET " != "x86" ] ; then
2022-06-01 08:11:16 +02:00
echo "# CONFIG_PACKAGE_kmod-r8125 is not set" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2024-09-27 19:39:42 +02:00
# echo "# CONFIG_PACKAGE_kmod-r8168 is not set" >> "$OMR_TARGET/${OMR_KERNEL}/source/.config"
echo "CONFIG_PACKAGE_kmod-r8168=m" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2021-10-08 16:30:03 +02:00
fi
2024-10-22 15:47:51 +02:00
if [ " $OMR_KERNEL " = "6.1" ] || [ " $OMR_KERNEL " = "6.6" ] || [ " $OMR_KERNEL " = "6.10" ] || [ " $OMR_KERNEL " = "6.11" ] || [ " $OMR_KERNEL " = "6.12" ] ; then
2022-12-21 12:56:40 +01:00
echo "# CONFIG_PACKAGE_kmod-rtl8812au-ct is not set" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
fi
2021-04-15 20:24:52 +02:00
2023-09-30 11:11:42 +02:00
if ( [ " $OMR_TARGET " = "rutx" ] || [ " $OMR_TARGET " = "rutx12" ] ) && [ " $OMR_KERNEL " = "5.4" ] ; then
2022-06-01 08:11:16 +02:00
echo "CONFIG_PACKAGE_kmod-r2ec=y" >> " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2022-03-23 14:49:19 +01:00
fi
2021-03-05 12:53:26 +01:00
if [ " $OMR_TARGET " = "bpi-r1" -a " $OMR_OPENWRT " = "master" ] ; then
# We disable mc in master, because it leads to unknown compilation errors on bpi-r1 target
# No time to check this, now, cause i am focused on make this target work
# Maybe someone can do this later
echo -n "Disabling error causing midnight commander (mc) package..."
2022-06-01 08:11:16 +02:00
sed -i "s/CONFIG_PACKAGE_mc=y/# CONFIG_PACKAGE_mc is not set/" " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
sed -i "s/CONFIG_MC_EDITOR=y/# CONFIG_MC_EDITOR is not set/" " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
sed -i "s/CONFIG_MC_SUBSHELL=y/# CONFIG_MC_SUBSHELL is not set/" " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
sed -i "s/CONFIG_MC_CHARSET=y/# CONFIG_MC_CHARSET is not set/" " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
sed -i "s/CONFIG_MC_VFS=y/# CONFIG_MC_VFS is not set/" " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2021-03-05 12:53:26 +01:00
echo "done"
# 2021-03-05 Oliver Welter <oliver@welter.rocks>
fi
if [ " $OMR_TARGET " = "bpi-r1" ] ; then
2021-03-06 16:26:45 +01:00
# Check kernel version
if [ " $OMR_KERNEL " != "5.4" ] ; then
echo "Sorry, but for now kernel 5.4 is the only supported one."
exit 1
fi
2021-03-06 20:42:41 +01:00
# Remove the 310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th patch
echo -n " Removing unwanted patches from kernel $OMR_KERNEL ... "
2022-06-01 08:11:16 +02:00
rm -f " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/patches- $OMR_KERNEL /310-Revert-ARM-dts-sun7i-Add-BCM53125-switch-nodes-to-th.patch " >/dev/null 2>& 1
2021-03-06 20:42:41 +01:00
echo "done"
2021-03-05 16:28:10 +01:00
if [ " $OMR_FORCE_DSA " = "1" ] ; then
# Remove support for swconfig
echo -n "Removing swconfig support from openwrt config..."
2021-03-06 16:26:45 +01:00
for i in DEFAULT_swconfig PACKAGE_swconfig PACKAGE_kmod-swconfig; do
2022-06-01 08:11:16 +02:00
sed -i " s/CONFIG_ ${ i } /# CONFIG_ ${ i } is not set/ " " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2021-03-05 16:28:10 +01:00
done
echo "done"
2021-03-06 16:26:45 +01:00
echo -n " Removing B53 swconfig support from kernel $OMR_KERNEL ... "
2021-03-06 16:10:44 +01:00
for i in SWCONFIG_B53 SWCONFIG_B53_PHY_DRIVER SWCONFIG_LEDS LED_TRIGGER_PHY SWCONFIG_B53_PHY_FIXUP SWCONFIG_B53_SPI_DRIVER SWCONFIG_B53_MMAP_DRIVER SWCONFIG_B53_SRAB_DRIVER; do
2022-06-01 08:11:16 +02:00
sed -i " s/CONFIG_ ${ i } /# CONFIG_ ${ i } is not set/ " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/config- ${ OMR_KERNEL } "
sed -i " s/CONFIG_ ${ i } /# CONFIG_ ${ i } is not set/ " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } "
2021-03-05 16:28:10 +01:00
done
echo "done"
# Add support for distributed switch architecture
2022-06-01 08:11:16 +02:00
echo -n " Adding B53 DSA support to kernel ${ OMR_KERNEL } ... "
2021-03-06 04:49:54 +01:00
for i in B53 B53_MDIO_DRIVER BRIDGE_VLAN_FILTERING MDIO_BUS_MUX_MULTIPLEXER NET_DSA NET_DSA_TAG_8021Q NET_DSA_TAG_BRCM NET_DSA_TAG_BRCM_PREPEND; do
2022-06-01 08:11:16 +02:00
check_sunxi_config = ` grep " CONFIG_ ${ i } =y " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/config- ${ OMR_KERNEL } " || true `
check_cortexa7_config = ` grep " CONFIG_ ${ i } =y " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } " || true `
2021-03-06 16:26:45 +01:00
2022-06-01 08:11:16 +02:00
[ " $check_sunxi_config " = "" -a " $check_cortexa7_config " = "" ] && echo " CONFIG_ ${ i } =y " >> " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } "
2021-03-05 16:28:10 +01:00
done
echo "done"
2021-03-06 04:49:54 +01:00
2021-03-10 00:53:42 +01:00
# Create DSA port map file (will be filled on first boot, by uci-defaults and tells the system, that it is in DSA mode)
2022-06-01 08:11:16 +02:00
touch " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/base-files/etc/dsa.map "
2021-03-10 00:53:42 +01:00
# Remove the b53 hack in preinit
2022-06-01 08:11:16 +02:00
rm -f " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh "
2021-03-05 23:09:04 +01:00
else
2021-03-06 03:42:30 +01:00
# Remove ip-bridge
echo -n "Removing ip-bridge support from openwrt config..."
for i in PACKAGE_ip-bridge; do
2022-06-01 08:11:16 +02:00
sed -i " s/CONFIG_ ${ i } /# CONFIG_ ${ i } is not set/ " " $OMR_TARGET / ${ OMR_KERNEL } /source/.config "
2021-03-06 03:42:30 +01:00
done
echo "done"
2021-03-05 23:09:04 +01:00
# Remove swconfig parts
2022-06-01 08:11:16 +02:00
echo -n " Removing unneeded B53 swconfig parts from kernel ${ OMR_KERNEL } ... "
2021-03-05 23:09:04 +01:00
for i in SWCONFIG_B53_PHY_FIXUP SWCONFIG_B53_SPI_DRIVER SWCONFIG_B53_MMAP_DRIVER SWCONFIG_B53_SRAB_DRIVER; do
2022-06-01 08:11:16 +02:00
sed -i " s/CONFIG_ ${ i } /# CONFIG_ ${ i } is not set/ " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/config- ${ OMR_KERNEL } "
sed -i " s/CONFIG_ ${ i } /# CONFIG_ ${ i } is not set/ " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } "
2021-03-05 23:09:04 +01:00
done
echo "done"
2021-03-05 16:28:10 +01:00
fi
2021-03-05 12:53:26 +01:00
# Add led support
2022-06-01 08:11:16 +02:00
echo -n " Adding LED TRIGGER support to kernel ${ OMR_KERNEL } ... "
2021-03-05 16:28:10 +01:00
if [ " $OMR_FORCE_DSA " != "1" ] ; then
for i in SWCONFIG_LEDS LED_TRIGGER_PHY; do
2022-06-01 08:11:16 +02:00
check_sunxi_config = ` grep " CONFIG_ ${ i } =y " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/config- ${ OMR_KERNEL } " || true `
check_cortexa7_config = ` grep " CONFIG_ ${ i } =y " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } " || true `
2021-03-06 16:26:45 +01:00
2022-06-01 08:11:16 +02:00
[ " $check_sunxi_config " = "" -a " $check_cortexa7_config " = "" ] && echo " CONFIG_ ${ i } =y " >> " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } "
2021-03-05 16:28:10 +01:00
done
fi
2021-03-05 15:22:55 +01:00
for i in TIMER ONESHOT DISK MTD HEARTBEAT BACKLIGHT CPU ACTIVITY GPIO DEFAULT_ON TRANSIENT CAMERA PANIC NETDEV PATTERN AUDIO; do
2022-06-01 08:11:16 +02:00
check_sunxi_config = ` grep " CONFIG_LEDS_TRIGGER_ ${ i } =y " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/config- ${ OMR_KERNEL } " || true `
check_cortexa7_config = ` grep " CONFIG_LEDS_TRIGGER_ ${ i } =y " " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } " || true `
2021-03-06 16:26:45 +01:00
2022-06-01 08:11:16 +02:00
[ " $check_sunxi_config " = "" -a " $check_cortexa7_config " = "" ] && echo " CONFIG_LEDS_TRIGGER_ ${ i } =y " >> " $OMR_TARGET / ${ OMR_KERNEL } /source/target/linux/sunxi/cortexa7/config- ${ OMR_KERNEL } "
2021-03-05 12:53:26 +01:00
done
2022-06-01 08:11:16 +02:00
echo "done"
2021-03-05 12:53:26 +01:00
fi
2021-03-04 23:47:15 +01:00
2022-06-01 08:11:16 +02:00
cd " $OMR_TARGET / ${ OMR_KERNEL } /source "
2017-12-22 11:08:56 +01:00
2020-04-01 14:47:18 +02:00
#if [ "$OMR_UEFI" = "yes" ] && [ "$OMR_TARGET" = "x86_64" ]; then
# echo "Checking if UEFI patch is set or not"
# if [ "$(grep 'EFI_IMAGES' target/linux/x86/image/Makefile)" = "" ]; then
2022-06-01 08:11:16 +02:00
# patch -N -p1 -s < ../../../patches/uefi.patch
2020-04-01 14:47:18 +02:00
# fi
# echo "Done"
#else
# if [ "$(grep 'EFI_IMAGES' target/linux/x86/image/Makefile)" != "" ]; then
2022-06-01 08:11:16 +02:00
# patch -N -R -p1 -s < ../../../patches/uefi.patch
2020-04-01 14:47:18 +02:00
# fi
#fi
2018-02-27 21:54:33 +01:00
2019-06-03 23:21:43 +02:00
#if [ "$OMR_TARGET" = "x86_64" ]; then
# echo "Checking if Hyper-V patch is set or not"
2022-06-01 08:11:16 +02:00
# if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/images.patch; then
# patch -N -p1 -s < ../../../patches/images.patch
2019-06-03 23:21:43 +02:00
# fi
# echo "Done"
#fi
2019-06-01 08:26:22 +02:00
2024-10-22 15:47:51 +02:00
if [ " $OMR_KERNEL " != "6.6" ] && [ " $OMR_KERNEL " != "6.10" ] && [ " $OMR_KERNEL " != "6.11" ] && [ " $OMR_KERNEL " != "6.12" ] ; then
2024-06-19 15:32:31 +02:00
echo "Checking if No check patch is set or not"
if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/nocheck.patch; then
echo "apply..."
patch -N -p1 -s < ../../../patches/nocheck.patch
fi
echo "Done"
else
echo "Checking if No check patch is set or not"
if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/nocheck.6.6.patch; then
echo "apply..."
patch -N -p1 -s < ../../../patches/nocheck.6.6.patch
fi
echo "Done"
2019-06-02 10:12:52 +02:00
fi
2019-12-19 09:40:20 +01:00
echo "Checking if Nanqinlang patch is set or not"
2022-06-01 08:11:16 +02:00
if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/nanqinlang.patch; then
2020-03-28 10:47:41 +01:00
echo "apply..."
2022-06-01 08:11:16 +02:00
patch -N -p1 -s < ../../../patches/nanqinlang.patch
2019-12-19 09:40:20 +01:00
fi
echo "Done"
2023-01-13 17:49:04 +01:00
echo "Checking if Meson patch is set or not"
if [ " $OMR_KERNEL " = "5.4" ] && ! patch -Rf -N -p1 -s --dry-run < ../../../patches/meson.patch; then
patch -N -p1 -s < ../../../patches/meson.patch
fi
echo "Done"
2021-06-24 17:23:36 +02:00
#echo "Checking if remove_abi patch is set or not"
2022-06-01 08:11:16 +02:00
#if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/remove_abi.patch; then
2021-06-24 17:23:36 +02:00
# echo "apply..."
2022-06-01 08:11:16 +02:00
# patch -N -p1 -s < ../../../patches/remove_abi.patch
2021-06-24 17:23:36 +02:00
#fi
#echo "Done"
2021-02-17 19:25:29 +01:00
2020-12-08 09:24:17 +01:00
# Add BBR2 patch, only working on 64bits images for now
2022-08-03 08:07:14 +02:00
if ( [ " $OMR_KERNEL " = "5.4" ] || [ " $OMR_KERNEL " = "5.4" ] ) && ( [ " $OMR_TARGET " = "x86_64" ] || [ " $OMR_TARGET " = "bpi-r64" ] || [ " $OMR_TARGET " = "rpi4" ] || [ " $OMR_TARGET " = "espressobin" ] || [ " $OMR_TARGET " = "r2s" ] || [ " $OMR_TARGET " = "r4s" ] || [ " $OMR_TARGET " = "rpi3" ] ) ; then
2020-12-17 09:33:56 +01:00
echo "Checking if BBRv2 patch is set or not"
2022-06-01 08:11:16 +02:00
if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/bbr2.patch; then
2020-12-17 09:33:56 +01:00
echo "apply..."
2022-06-01 08:11:16 +02:00
patch -N -p1 -s < ../../../patches/bbr2.patch
2020-12-17 09:33:56 +01:00
fi
echo "Done"
2020-11-23 19:46:26 +01:00
fi
2020-03-27 10:19:22 +01:00
echo "Checking if smsc75xx patch is set or not"
2022-06-01 08:11:16 +02:00
if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/smsc75xx.patch; then
2020-03-28 10:47:41 +01:00
echo "apply..."
2022-06-01 08:11:16 +02:00
patch -N -p1 -s < ../../../patches/smsc75xx.patch
2020-03-27 10:19:22 +01:00
fi
echo "Done"
2020-04-20 16:45:17 +02:00
#echo "Checking if ipt-nat patch is set or not"
2022-06-01 08:11:16 +02:00
#if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/ipt-nat6.patch; then
2020-04-20 16:45:17 +02:00
# echo "apply..."
2022-06-01 08:11:16 +02:00
# patch -N -p1 -s < ../../../patches/ipt-nat6.patch
2020-04-20 16:45:17 +02:00
#fi
#echo "Done"
2020-03-27 10:19:22 +01:00
2020-04-17 15:04:15 +02:00
#echo "Checking if mvebu patch is set or not"
#if [ ! -d target/linux/mvebu/patches-5.4 ]; then
# echo "apply..."
2022-06-01 08:11:16 +02:00
# patch -N -p1 -s < ../../../patches/mvebu-5.14.patch
2020-04-17 15:04:15 +02:00
#fi
#echo "Done"
2020-03-27 10:19:22 +01:00
2021-06-24 17:09:41 +02:00
#echo "Checking if opkg install arguement too long patch is set or not"
2022-06-01 08:11:16 +02:00
#if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/package-too-long.patch; then
2021-06-24 17:09:41 +02:00
# echo "apply..."
2022-06-01 08:11:16 +02:00
# patch -N -p1 -s < ../../../patches/package-too-long.patch
2021-06-24 17:09:41 +02:00
#fi
#echo "Done"
2020-04-04 16:00:23 +02:00
2022-10-03 14:02:43 +02:00
#echo "Download via IPv4"
#if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/download-ipv4.patch; then
# patch -N -p1 -s < ../../../patches/download-ipv4.patch
#fi
#echo "Done"
2020-04-17 15:04:15 +02:00
2021-03-08 14:46:21 +01:00
#echo "Remove check rsync"
#if [ "$(grep rsync include/prereq-build.mk)" != "" ]; then
2022-06-01 08:11:16 +02:00
# patch -N -p1 -s < ../../../patches/check-rsync.patch
2021-03-08 14:46:21 +01:00
#fi
#echo "Done"
2020-12-16 17:10:14 +01:00
2020-04-24 21:56:50 +02:00
if [ -f target/linux/mediatek/patches-5.4/0999-hnat.patch ] ; then
rm -f target/linux/mediatek/patches-5.4/0999-hnat.patch
fi
2019-06-02 10:12:52 +02:00
2022-10-04 08:48:59 +02:00
if [ -f target/linux/ipq806x/patches-5.4/0063-2-tsens-support-configurable-interrupts.patch ] ; then
2022-10-14 18:21:23 +02:00
rm -f target/linux/ipq806x/patches-5.4/0063-*
2022-10-04 08:48:59 +02:00
fi
2022-03-25 08:40:46 +01:00
#if [ -f target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch ]; then
# rm -f target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch
#fi
2020-09-22 15:07:54 +02:00
2021-05-20 10:26:43 +02:00
if [ -f package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch ] ; then
rm -f package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-FriendlyARM-NanoPi-R.patch
fi
2019-03-06 18:21:03 +01:00
#echo "Patch protobuf wrong hash"
2022-06-01 08:11:16 +02:00
#patch -N -R -p1 -s < ../../../patches/protobuf_hash.patch
2019-03-06 18:21:03 +01:00
#echo "Done"
2018-12-23 14:10:39 +01:00
#echo "Remove gtime dependency"
2022-06-01 08:11:16 +02:00
#if ! patch -Rf -N -p1 -s --dry-run < ../../../patches/gtime.patch; then
# patch -N -p1 -s < ../../../patches/gtime.patch
2018-12-23 14:10:39 +01:00
#fi
#echo "Done"
2018-05-10 23:10:49 +02:00
2021-09-30 09:31:47 +02:00
#if [ -f target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch ]; then
# rm -f target/linux/generic/backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch
#fi
#if [ -f target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch ]; then
# rm -f target/linux/generic/pending-5.4/640-netfilter-nf_flow_table-add-hardware-offload-support.patch
#fi
#if [ -f target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch ]; then
# rm -f target/linux/generic/pending-5.4/641-netfilter-nf_flow_table-support-hw-offload-through-v.patch
#fi
#if [ -f target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch ]; then
# rm -f target/linux/generic/pending-5.4/642-net-8021q-support-hardware-flow-table-offload.patch
#fi
#if [ -f target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch ]; then
# rm -f target/linux/generic/pending-5.4/643-net-bridge-support-hardware-flow-table-offload.patch
#fi
#if [ -f target/linux/generic/pending-5.4/644-net-pppoe-support-hardware-flow-table-offload.patch ]; then
# rm -f target/linux/generic/pending-5.4/644-net-pppoe-support-hardware-flow-table-offload.patch
#fi
#if [ -f target/linux/generic/pending-5.4/645-netfilter-nf_flow_table-rework-hardware-offload-time.patch ]; then
# rm -f target/linux/generic/pending-5.4/645-netfilter-nf_flow_table-rework-hardware-offload-time.patch
#fi
#if [ -f target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch ]; then
# rm -f target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch
#fi
#if [ -f target/linux/generic/hack-5.4/650-netfilter-add-xt_OFFLOAD-target.patch ]; then
# rm -f target/linux/generic/hack-5.4/650-netfilter-add-xt_OFFLOAD-target.patch
#fi
#if [ -f target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch ]; then
# rm -f target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
#fi
#if [ -f target/linux/generic/hack-5.4/647-netfilter-flow-acct.patch ]; then
# rm -f target/linux/generic/hack-5.4/647-netfilter-flow-acct.patch
#fi
#if [ -f target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch ]; then
# rm -f target/linux/generic/hack-5.4/953-net-patch-linux-kernel-to-support-shortcut-fe.patch
#fi
2022-11-16 21:08:27 +01:00
#if [ -f target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch ]; then
# rm -f target/linux/bcm27xx/patches-5.4/950-1031-net-lan78xx-Ack-pending-PHY-ints-when-resetting.patch
#fi
2021-09-30 09:31:47 +02:00
#if [ -f target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch ]; then
# rm -f target/linux/generic/pending-5.4/770-16-net-ethernet-mediatek-mtk_eth_soc-add-flow-offloadin.patch
#fi
2023-04-22 08:07:24 +02:00
NOT_SUPPORTED = "0"
2021-09-28 20:39:46 +02:00
2020-03-11 16:01:27 +01:00
if [ " $OMR_KERNEL " = "5.4" ] ; then
echo "Set to kernel 5.4 for rpi arch"
2021-09-28 19:26:46 +02:00
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER=5.10%KERNEL_PATCHVER:=5.4%g' { } \;
2021-09-28 17:10:54 +02:00
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' { } \;
2019-05-06 07:48:02 +02:00
echo "Done"
2020-03-11 16:01:27 +01:00
echo "Set to kernel 5.4 for x86 arch"
2021-09-28 17:10:54 +02:00
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' { } \;
2019-05-06 07:48:02 +02:00
echo "Done"
2020-03-27 10:19:22 +01:00
echo "Set to kernel 5.4 for mvebu arch (WRT)"
2021-09-28 17:10:54 +02:00
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' { } \;
2020-03-27 10:19:22 +01:00
echo "Done"
2020-03-11 16:01:27 +01:00
echo "Set to kernel 5.4 for mediatek arch (BPI-R2)"
2021-09-28 17:10:54 +02:00
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=5.4%g' { } \;
2019-05-31 18:56:59 +02:00
echo "Done"
2021-10-07 12:38:07 +02:00
if [ -f package/kernel/mac80211/patches/build/firmware-replace-HOTPLUG-with-UEVENT-in-FW_ACTION-defines.patch ] ; then
rm -f package/kernel/mac80211/patches/build/firmware-replace-HOTPLUG-with-UEVENT-in-FW_ACTION-defines.patch
fi
2022-12-22 16:33:41 +01:00
#if [ -f package/kernel/rtl8812au-ct/patches/003-wireless-5.8.patch ]; then
# rm -f package/kernel/rtl8812au-ct/patches/003-wireless-5.8.patch
#fi
2021-10-07 12:38:07 +02:00
if [ -f target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch ] ; then
rm -f target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch
fi
2021-10-07 20:45:02 +02:00
if [ -f target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch ] ; then
rm -f target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch
fi
2023-06-25 08:24:35 +02:00
echo " rm -rf $OMR_TARGET / ${ OMR_KERNEL } /source/package/boot/uboot-rockchip "
rm -rf " ${ OMR_TARGET } / ${ OMR_KERNEL } /source/package/boot/uboot-rockchip "
2023-04-22 08:07:24 +02:00
#rm -f target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
2021-11-17 17:40:58 +01:00
echo "CONFIG_VERSION_CODE=5.4" >> ".config"
2023-10-09 18:43:46 +02:00
if [ " $OMR_TARGET " = "rpi5" ] ; then
echo "Sorry but kernel 5.4 is not supported on your arch yet"
NOT_SUPPORTED = "1"
exit 1
fi
2024-11-06 17:45:22 +01:00
if ( [ " $OMR_TARGET " = "bpi-r3" ] || [ " $OMR_TARGET " = "bpi-r4" ] || [ " $OMR_TARGET " = "bpi-r4-poe" ] ) ; then
2024-11-05 19:48:52 +01:00
echo "Sorry but kernel 5.4 is not supported on your arch"
NOT_SUPPORTED = "1"
exit 1
fi
2024-02-13 20:06:30 +01:00
if ( [ " $OMR_TARGET " = "z8102ax_128m" ] || [ " $OMR_TARGET " = "z8102ax_64m" ] ) ; then
echo "Sorry but kernel 5.4 is not supported on your arch yet"
NOT_SUPPORTED = "1"
exit 1
fi
2023-10-31 12:36:34 +01:00
if [ " $OMR_TARGET " = "rutx50" ] ; then
echo "Sorry but kernel 5.4 is not supported on your arch yet"
NOT_SUPPORTED = "1"
#exit 1
fi
2019-05-06 07:48:02 +02:00
fi
2022-12-21 12:56:40 +01:00
if [ " $OMR_KERNEL " = "6.1" ] ; then
echo "Set to kernel 6.1 for x86 arch"
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.10%KERNEL_PATCHVER:=6.1%g' { } \;
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
echo "Done"
2023-04-22 08:07:24 +02:00
echo "Set to kernel 6.1 for rockchip arch (R2S/R4S)"
find target/linux/rockchip -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
2022-12-21 12:56:40 +01:00
echo "Done"
2023-08-29 14:29:33 +02:00
#echo "Set to kernel 6.1 for ipq807x"
#find target/linux/ipq807x -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' {} \;
#echo "Done"
2023-04-22 08:07:24 +02:00
echo "Set to kernel 6.1 for bcm27xx"
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
echo "Done"
2023-05-17 20:06:36 +02:00
echo "Set to kernel 6.1 for mvebu"
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
echo "Done"
echo "Set to kernel 6.1 for mediatek"
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
echo "Done"
2023-05-19 10:10:28 +02:00
echo "Set to kernel 6.1 for ipq806x"
find target/linux/ipq806x -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
echo "Done"
2023-06-23 21:16:44 +02:00
echo "Set to kernel 6.1 for ipq40xx"
find target/linux/ipq40xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
echo "Done"
2023-08-02 12:49:12 +02:00
echo "Set to kernel 6.1 for ramips"
find target/linux/ramips -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=5.15%KERNEL_PATCHVER:=6.1%g' { } \;
echo "Done"
2023-07-31 21:32:39 +02:00
rm -f target/linux/bcm27xx/patches-6.1/950-0509-README-Add-README.md-with-CI-kernel-build-status-tag.patch
2023-08-01 12:42:30 +02:00
rm -f target/linux/bcm27xx/patches-6.1/950-0555-README.md-Replace-6.0-build-status-with-6.2.patch
2023-12-29 15:53:55 +01:00
rm -f target/linux/mvebu/patches-6.1/102-leds-turris-omnia-support-HW-controlled-mode-via-pri.patch
2023-11-17 17:31:36 +01:00
rm -f target/linux/bcm27xx/modules/sound.mk
2023-04-22 08:07:24 +02:00
rm -f package/kernel/rtl8812au-ct/patches/002-*
rm -f package/kernel/rtl8812au-ct/patches/003-*
rm -f package/kernel/rtl8812au-ct/patches/004-*
rm -f package/kernel/rtl8812au-ct/patches/100-api_update.patch
2023-06-25 08:24:35 +02:00
#rm -f target/linux/bcm27xx/modules/sound.mk
2023-05-07 08:51:06 +02:00
rm -f package/libs/elfutils/patches/101-no-fts.patch
2023-06-28 15:08:28 +02:00
#rm -f package/kernel/mwlwifi/patches/001-*
#rm -f package/kernel/mwlwifi/patches/002-*
#rm -f package/kernel/mwlwifi/patches/003-*
2023-11-10 11:22:10 +01:00
#rm -rf package/kernel/mt76
2023-06-23 21:16:44 +02:00
rm -rf target/linux/ipq40xx/files/drivers/net/dsa
rm -rf target/linux/ipq40xx/files/drivers/net/ethernet
2023-05-17 20:06:36 +02:00
2023-04-22 08:07:24 +02:00
# echo "CONFIG_DEVEL=y" >> ".config"
# echo "CONFIG_NEED_TOOLCHAIN=y" >> ".config"
# echo "CONFIG_TOOLCHAINOPTS=y" >> ".config"
# echo 'CONFIG_BINUTILS_VERSION_2_36_1=y' >> ".config"
# echo 'CONFIG_BINUTILS_VERSION="2.36.1"' >> ".config"
# echo "CONFIG_BINUTILS_USE_VERSION_2_36_1=y" >> ".config"
# #echo "CONFIG_GCC_USE_VERSION_10=y" >> ".config"
# #echo "CONFIG_GCC_VERSION_10=y" >> ".config"
# #echo 'CONFIG_GCC_VERSION="10.3.0"' >> ".config"
2022-12-21 12:56:40 +01:00
echo "CONFIG_VERSION_CODE=6.1" >> ".config"
2023-04-22 08:07:24 +02:00
# #echo "CONFIG_GCC_USE_VERSION_10=y" >> ".config"
2022-12-21 12:56:40 +01:00
if [ " $TARGET " = "bpi-r2" ] ; then
echo "# CONFIG_VERSION_CODE_FILENAMES is not set" >> ".config"
fi
2023-09-07 14:15:17 +02:00
if [ " $OMR_TARGET " = "bpi-r1" ] ; then
2022-12-21 12:56:40 +01:00
echo "Sorry but kernel 6.1 is not supported on your arch yet"
2023-04-22 08:07:24 +02:00
NOT_SUPPORTED = "1"
#exit 1
2022-12-21 12:56:40 +01:00
fi
fi
2023-09-29 17:05:03 +02:00
if [ " $OMR_KERNEL " = "6.6" ] ; then
echo "Set to kernel 6.6 for x86 arch"
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
2023-11-23 19:55:21 +01:00
echo "Set to kernel 6.6 for mediatek"
2024-04-02 20:32:46 +02:00
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
2023-11-23 19:55:21 +01:00
echo "Done"
2024-04-02 20:32:46 +02:00
echo "Set to kernel 6.6 for qualcommmax"
find target/linux/qualcommax -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
2024-04-11 16:42:51 +02:00
echo "Set to kernel 6.6 for bcm27xx"
2024-04-04 14:17:50 +02:00
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
2024-04-11 16:42:51 +02:00
echo "Set to kernel 6.6 for ipq40xx"
find target/linux/ipq40xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
echo "Set to kernel 6.6 for ipq806x"
find target/linux/ipq806x -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
echo "Set to kernel 6.6 for kirkwood"
find target/linux/kirkwood -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
echo "Set to kernel 6.6 for mpc85xx"
find target/linux/mpc85xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
echo "Set to kernel 6.6 for mvebu"
find target/linux/mvebu -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
echo "Set to kernel 6.6 for ramips"
find target/linux/ramips -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
2024-05-02 08:59:02 +02:00
echo "Set to kernel 6.6 for rockchip"
find target/linux/rockchip -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.1%KERNEL_PATCHVER:=6.6%g' { } \;
echo "Done"
2024-04-11 16:42:51 +02:00
2024-07-29 15:59:21 +02:00
#[ -d target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom ] && mv -f target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/* target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/ && rm -fr target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom
2024-04-02 20:32:46 +02:00
#echo "CONFIG_VERSION_CODE=6.6" >> ".config"
#echo "# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set" >> ".config"
#echo "# CONFIG_PACKAGE_kmod-meraki-mx100 is not set" >> ".config"
2023-09-29 17:05:03 +02:00
echo "# CONFIG_PACKAGE_kmod-gpio-nct5104d is not set" >> ".config"
2024-04-02 20:32:46 +02:00
echo "# CONFIG_PACKAGE_kmod-vfio is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-vfio-pci is not set" >> ".config"
#echo "# CONFIG_PACKAGE_kmod-r8168 is not set" >> ".config"
#echo "# CONFIG_PACKAGE_kmod-button-hotplug is not set" >> ".config"
#echo "# CONFIG_PACKAGE_kmod-cryptodev is not set" >> ".config"
2024-09-06 07:43:09 +02:00
if [ " $OMR_TARGET " != "ubnt-erx" ] && [ " $OMR_TARGET " != "r7800" ] ; then
2024-09-05 16:34:24 +02:00
echo "CONFIG_BPF_TOOLCHAIN=y" >> ".config"
echo "CONFIG_BPF_TOOLCHAIN_HOST=y" >> ".config"
echo "CONFIG_KERNEL_BPF_EVENTS=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF_MODULES=y" >> ".config"
echo "# CONFIG_KERNEL_DEBUG_INFO_REDUCED is not set" >> ".config"
echo "CONFIG_KERNEL_MODULE_ALLOW_BTF_MISMATCH=y" >> ".config"
fi
2023-10-19 12:01:52 +02:00
# Remove for now packages that doesn't compile
2024-02-01 17:23:16 +01:00
#rm -rf package/kernel/mt76
2024-04-02 20:32:46 +02:00
#rm -rf package/kernel/rtl8812au-ct
2023-10-23 14:39:05 +02:00
# Remove not needed patches
2024-04-02 20:32:46 +02:00
#rm -f package/kernel/mac80211/patches/build/200-Revert-wifi-iwlwifi-Use-generic-thermal_zone_get_tri.patch
#rm -f package/kernel/mac80211/patches/build/210-revert-split-op.patch
#rm -f package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch
#rm -f package/kernel/rtl8812au-ct/patches/099-cut-linkid-linux-version-code-conditionals.patch
#rm -f package/kernel/rtl8812au-ct/patches/100-api_update.patch
rm -f target/linux/generic/hack-6.6/212-tools_portability.patch
2024-04-25 14:06:34 +02:00
if [ ! -d target/linux/` sed -nE 's/CONFIG_TARGET_([a-z0-9]*)=y/\1/p' ".config" | tr -d "\n" ` /patches-6.6 ] ; then
2024-04-11 16:42:51 +02:00
echo "Sorry but kernel 6.6 is not supported on your arch yet"
NOT_SUPPORTED = "1"
fi
2023-09-29 17:05:03 +02:00
fi
2024-07-05 19:38:23 +02:00
if [ " $OMR_KERNEL " = "6.10" ] ; then
echo "Set to kernel 6.10 for x86 arch"
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.10%g' { } \;
2023-12-23 08:41:59 +01:00
echo "Done"
2024-07-05 19:38:23 +02:00
echo "Set to kernel 6.10 for mediatek"
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.10%g' { } \;
2023-12-23 08:41:59 +01:00
echo "Done"
2024-07-05 19:38:23 +02:00
echo "CONFIG_VERSION_CODE=6.10" >> ".config"
2023-12-23 08:41:59 +01:00
echo "# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-meraki-mx100 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-gpio-nct5104d is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8168 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-button-hotplug is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-cryptodev is not set" >> ".config"
2024-07-05 19:38:23 +02:00
echo "# CONFIG_PACKAGE_kmod-trelay is not set" >> ".config"
echo "# CONFIG_PACKAGE_464xlat is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-nat46 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers is not set" >> ".config"
2024-08-17 17:03:02 +02:00
echo "CONFIG_BPF_TOOLCHAIN=y" >> ".config"
echo "CONFIG_BPF_TOOLCHAIN_HOST=y" >> ".config"
echo "CONFIG_KERNEL_BPF_EVENTS=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF_MODULES=y" >> ".config"
echo "# CONFIG_KERNEL_DEBUG_INFO_REDUCED is not set" >> ".config"
echo "CONFIG_KERNEL_MODULE_ALLOW_BTF_MISMATCH=y" >> ".config"
2023-12-23 08:41:59 +01:00
# Remove for now packages that doesn't compile
rm -rf package/kernel/mt76
rm -rf package/kernel/rtl8812au-ct
# Remove not needed patches
rm -f package/kernel/mac80211/patches/build/200-Revert-wifi-iwlwifi-Use-generic-thermal_zone_get_tri.patch
rm -f package/kernel/mac80211/patches/build/210-revert-split-op.patch
rm -f package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch
2024-07-05 19:38:23 +02:00
rm -f package/kernel/mac80211/patches/build/240-backport_genl_split_ops.patch
rm -f package/kernel/mac80211/patches/build/250-backport_iwlwifi_thermal.patch
2023-12-23 08:41:59 +01:00
rm -f package/kernel/rtl8812au-ct/patches/099-cut-linkid-linux-version-code-conditionals.patch
rm -f package/kernel/rtl8812au-ct/patches/100-api_update.patch
echo 'CONFIG_KERNEL_GIT_CLONE_URI="https://github.com/multipath-tcp/mptcp_net-next.git"' >> ".config"
2024-07-27 11:03:27 +02:00
echo 'CONFIG_KERNEL_GIT_REF="30be9e34452a634aab77a15634890e9c7637812a"' >> ".config"
2024-09-05 16:34:24 +02:00
fi
if [ " $OMR_KERNEL " = "6.11" ] ; then
echo "Set to kernel 6.11 for x86 arch"
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.11%g' { } \;
echo "Done"
echo "Set to kernel 6.11 for mediatek"
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.11%g' { } \;
echo "Done"
echo "CONFIG_VERSION_CODE=6.11" >> ".config"
echo "# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-meraki-mx100 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-gpio-nct5104d is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8168 is not set" >> ".config"
2024-09-27 19:39:42 +02:00
echo "# CONFIG_PACKAGE_kmod-r8125 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8125-rss is not set" >> ".config"
2024-09-18 14:21:22 +02:00
echo "# CONFIG_PACKAGE_kmod-r8126 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8126-rss is not set" >> ".config"
2024-09-05 16:34:24 +02:00
echo "# CONFIG_PACKAGE_kmod-button-hotplug is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-cryptodev is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-trelay is not set" >> ".config"
echo "# CONFIG_PACKAGE_464xlat is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-nat46 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers is not set" >> ".config"
echo "CONFIG_BPF_TOOLCHAIN=y" >> ".config"
echo "CONFIG_BPF_TOOLCHAIN_HOST=y" >> ".config"
echo "CONFIG_KERNEL_BPF_EVENTS=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF_MODULES=y" >> ".config"
echo "# CONFIG_KERNEL_DEBUG_INFO_REDUCED is not set" >> ".config"
echo "CONFIG_KERNEL_MODULE_ALLOW_BTF_MISMATCH=y" >> ".config"
# Remove for now packages that doesn't compile
rm -rf package/kernel/mt76
rm -rf package/kernel/rtl8812au-ct
# Remove not needed patches
rm -f package/kernel/mac80211/patches/build/200-Revert-wifi-iwlwifi-Use-generic-thermal_zone_get_tri.patch
rm -f package/kernel/mac80211/patches/build/210-revert-split-op.patch
rm -f package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch
rm -f package/kernel/mac80211/patches/build/240-backport_genl_split_ops.patch
rm -f package/kernel/mac80211/patches/build/250-backport_iwlwifi_thermal.patch
rm -f package/kernel/rtl8812au-ct/patches/099-cut-linkid-linux-version-code-conditionals.patch
rm -f package/kernel/rtl8812au-ct/patches/100-api_update.patch
2024-09-18 14:21:22 +02:00
#echo 'CONFIG_KERNEL_GIT_CLONE_URI="https://github.com/multipath-tcp/mptcp_net-next.git"' >> ".config"
#echo 'CONFIG_KERNEL_GIT_REF="92590173530711151d50d13b145a9621b5e8d239"' >> ".config"
2023-12-23 08:41:59 +01:00
fi
2024-10-22 15:47:51 +02:00
if [ " $OMR_KERNEL " = "6.12" ] ; then
echo "Set to kernel 6.12 for x86 arch"
find target/linux/x86 -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.12%g' { } \;
echo "Done"
echo "Set to kernel 6.12 for mediatek"
find target/linux/mediatek -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.12%g' { } \;
echo "Done"
2024-12-20 14:17:26 +01:00
echo "Set to kernel 6.12 for bcm27xx"
find target/linux/bcm27xx -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.12%g' { } \;
echo "Done"
2025-01-10 18:11:03 +01:00
echo "Set to kernel 6.12 for bcm27xx"
find target/linux/qualcommax -type f -name Makefile -exec sed -i 's%KERNEL_PATCHVER:=6.6%KERNEL_PATCHVER:=6.12%g' { } \;
echo "Done"
2024-10-22 15:47:51 +02:00
echo "CONFIG_VERSION_CODE=6.12" >> ".config"
echo "# CONFIG_PACKAGE_kmod-gpio-button-hotplug is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-meraki-mx100 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-gpio-nct5104d is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8168 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8125 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8125-rss is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8126 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-r8126-rss is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-button-hotplug is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-cryptodev is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-trelay is not set" >> ".config"
echo "# CONFIG_PACKAGE_464xlat is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-nat46 is not set" >> ".config"
echo "# CONFIG_PACKAGE_kmod-ath10k-ct-smallbuffers is not set" >> ".config"
echo "CONFIG_BPF_TOOLCHAIN=y" >> ".config"
echo "CONFIG_BPF_TOOLCHAIN_HOST=y" >> ".config"
echo "CONFIG_KERNEL_BPF_EVENTS=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF=y" >> ".config"
echo "CONFIG_KERNEL_DEBUG_INFO_BTF_MODULES=y" >> ".config"
echo "# CONFIG_KERNEL_DEBUG_INFO_REDUCED is not set" >> ".config"
echo "CONFIG_KERNEL_MODULE_ALLOW_BTF_MISMATCH=y" >> ".config"
echo 'CONFIG_EXTRA_OPTIMIZATION="-fno-caller-saves -fno-plt -Wno-stringop-truncation -Wno-stringop-overread -Wno-calloc-transposed-args"' >> ".config"
# Remove for now packages that doesn't compile
rm -rf package/kernel/mt76
rm -rf package/kernel/rtl8812au-ct
# Remove not needed patches
rm -f package/kernel/mac80211/patches/build/200-Revert-wifi-iwlwifi-Use-generic-thermal_zone_get_tri.patch
rm -f package/kernel/mac80211/patches/build/210-revert-split-op.patch
rm -f package/kernel/mac80211/patches/subsys/301-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch
rm -f package/kernel/mac80211/patches/build/240-backport_genl_split_ops.patch
rm -f package/kernel/mac80211/patches/build/250-backport_iwlwifi_thermal.patch
rm -f package/kernel/rtl8812au-ct/patches/099-cut-linkid-linux-version-code-conditionals.patch
rm -f package/kernel/rtl8812au-ct/patches/100-api_update.patch
#echo 'CONFIG_KERNEL_GIT_CLONE_URI="https://github.com/multipath-tcp/mptcp_net-next.git"' >> ".config"
#echo 'CONFIG_KERNEL_GIT_REF="92590173530711151d50d13b145a9621b5e8d239"' >> ".config"
2024-12-14 08:36:54 +01:00
echo 'CONFIG_PACKAGE_apk-openssl=y' >> ".config"
2025-01-03 11:25:27 +01:00
if [ ! -d target/linux/` sed -nE 's/CONFIG_TARGET_([a-z0-9]*)=y/\1/p' ".config" | tr -d "\n" ` /patches-6.12 ] ; then
echo "Sorry but kernel 6.12 is not supported on your arch yet"
NOT_SUPPORTED = "1"
fi
2024-10-22 15:47:51 +02:00
fi
2019-04-22 17:11:52 +02:00
2020-07-10 22:20:19 +02:00
#rm -rf feeds/packages/libs/libwebp
2022-06-01 08:11:16 +02:00
cd "../../.."
rm -rf feeds/${ OMR_KERNEL } /luci/modules/luci-mod-network
2024-04-04 16:03:00 +02:00
2024-04-04 16:26:31 +02:00
if [ -d feeds/${ OMR_KERNEL } /${ OMR_DIST } /luci-mod-status ] ; then
rm -rf feeds/${ OMR_KERNEL } /luci/modules/luci-mod-status
2024-10-22 15:47:51 +02:00
elif [ " $OMR_KERNEL " = "6.6" ] || [ " $OMR_KERNEL " = "6.10" ] || [ " $OMR_KERNEL " = "6.11" ] || [ " $OMR_KERNEL " = "6.12" ] ; then
2024-05-15 14:07:17 +02:00
cd feeds/${ OMR_KERNEL }
2024-08-17 17:03:02 +02:00
#if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-syslog-6.6.patch; then
# patch -N -p1 -s < ../../patches/luci-syslog-6.6.patch
#fi
2024-08-19 10:44:08 +02:00
if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-syslog-6.10.patch; then
patch -N -p1 -s < ../../patches/luci-syslog-6.10.patch
fi
2024-05-15 14:07:17 +02:00
cd -
2024-04-05 08:46:10 +02:00
else
cd feeds/${ OMR_KERNEL }
if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-syslog.patch; then
patch -N -p1 -s < ../../patches/luci-syslog.patch
fi
cd -
2024-04-04 16:26:31 +02:00
fi
2024-12-11 15:33:21 +01:00
cd feeds/${ OMR_KERNEL }
if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-unbound-logread.patch; then
patch -N -p1 -s < ../../patches/luci-unbound-logread.patch
fi
cd -
2024-04-04 16:03:00 +02:00
[ -d feeds/${ OMR_KERNEL } /${ OMR_DIST } /luci-app-statistics ] && rm -rf feeds/${ OMR_KERNEL } /luci/applications/luci-app-statistics
2024-05-28 19:39:09 +02:00
[ -d feeds/${ OMR_KERNEL } /${ OMR_DIST } /luci-proto-modemmanager ] && rm -rf feeds/${ OMR_KERNEL } /luci/protocols/luci-proto-modemmanager
2024-04-02 20:32:46 +02:00
#if [ -d ${OMR_FEED}/netifd ] && [ "${OMR_KERNEL}" != "5.4" ]; then
# rm -rf ${OMR_TARGET}/${OMR_KERNEL}/source/package/network/config/netifd
#fi
2024-04-25 10:30:49 +02:00
[ -d ${ OMR_FEED } /libgpiod ] && rm -rf feeds/${ OMR_KERNEL } /packages/libs/libgpiod
2022-06-01 08:11:16 +02:00
[ -d ${ OMR_FEED } /iperf3 ] && rm -rf feeds/${ OMR_KERNEL } /packages/net/iperf3
2024-11-20 20:07:47 +01:00
[ -d ${ OMR_FEED } /golang ] && {
rm -rf feeds/${ OMR_KERNEL } /packages/lang/golang
cp -r ${ OMR_FEED } /golang feeds/${ OMR_KERNEL } /packages/lang/
}
2023-08-17 11:31:25 +02:00
[ -d ${ OMR_FEED } /openvpn ] && rm -rf feeds/${ OMR_KERNEL } /packages/net/openvpn
2023-11-10 10:15:10 +01:00
[ -d ${ OMR_FEED } /iproute2 ] && rm -rf feeds/${ OMR_KERNEL } /packages/network/utils/iproute2
2024-10-28 14:48:39 +01:00
[ -d ${ CUSTOM_FEED } /syslog-ng ] && rm -rf feeds/${ OMR_KERNEL } /packages/admin/syslog-ng
2024-07-05 19:38:23 +02:00
( [ " $OMR_KERNEL " = "6.6" ] || [ " $OMR_KERNEL " = "6.10" ] ) && [ -d ${ OMR_FEED } /xtables-addons ] && rm -rf feeds/${ OMR_KERNEL } /packages/net/xtables-addons
2020-06-11 08:35:21 +02:00
2020-10-14 15:32:54 +02:00
echo "Add Occitan translation support"
2022-06-01 08:11:16 +02:00
cd feeds/${ OMR_KERNEL }
if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-occitan.patch; then
patch -N -p1 -s < ../../patches/luci-occitan.patch
2020-10-14 15:32:54 +02:00
#sh feeds/luci/build/i18n-add-language.sh oc
fi
2023-12-07 21:22:28 +01:00
if [ " $OMR_KERNEL " = "5.4" ] && ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-base-add_array_sort_utilities.patch; then
patch -N -p1 -s < ../../patches/luci-base-add_array_sort_utilities.patch
fi
2024-04-11 19:17:53 +02:00
#if [ -d luci/modules/luci-mod-status ]; then
# if ! patch -Rf -N -p1 -s --dry-run < ../../patches/luci-nftables.patch; then
# patch -N -p1 -s < ../../patches/luci-nftables.patch
# fi
#fi
2023-09-08 15:57:49 +02:00
2022-06-01 08:11:16 +02:00
cd ../..
[ -d $OMR_FEED /luci-base/po/oc ] && cp -rf $OMR_FEED /luci-base/po/oc feeds/${ OMR_KERNEL } /luci/modules/luci-base/po/
2020-10-14 15:32:54 +02:00
echo "Done"
2022-06-01 08:11:16 +02:00
cd " $OMR_TARGET / ${ OMR_KERNEL } /source "
2020-10-14 15:32:54 +02:00
echo "Update feeds index"
2017-12-22 11:08:56 +01:00
cp .config .config.keep
scripts/feeds clean
scripts/feeds update -a
2020-04-02 14:14:51 +02:00
2020-04-09 15:01:48 +02:00
#cd -
#echo "Checking if fullconenat-luci patch is set or not"
##if ! patch -Rf -N -p1 -s --dry-run < patches/fullconenat-luci.patch; then
# echo "apply..."
# patch -N -p1 -s < patches/fullconenat-luci.patch
#fi
#echo "Done"
2022-06-01 08:11:16 +02:00
#cd "$OMR_TARGET/${OMR_KERNEL}/source"
2020-04-02 14:14:51 +02:00
2018-04-05 17:16:42 +02:00
if [ " $OMR_ALL_PACKAGES " = "yes" ] ; then
2020-05-14 16:49:19 +02:00
scripts/feeds install -a -d m -p packages
scripts/feeds install -a -d m -p luci
2018-04-05 17:16:42 +02:00
fi
2020-08-03 16:53:41 +02:00
if [ -n " $CUSTOM_FEED " ] ; then
scripts/feeds install -a -d m -p openmptcprouter
scripts/feeds install -a -d y -f -p ${ OMR_DIST }
else
scripts/feeds install -a -d y -f -p openmptcprouter
fi
2023-12-07 21:22:28 +01:00
# Use iproute2 package from the normal repo for 5.4
if [ " $OMR_KERNEL " = "5.4" ] ; then
scripts/feeds uninstall iproute2
scripts/feeds uninstall libbpf
scripts/feeds uninstall netifd
scripts/feeds install iproute2
scripts/feeds install netifd
2024-02-11 19:25:41 +01:00
#else
# scripts/feeds uninstall rust
# scripts/feeds install -p packages rust
2023-12-07 21:22:28 +01:00
fi
2025-01-29 21:07:08 +01:00
#if [ "$OMR_KERNEL" != "5.4" ] && [ "$OMR_KERNEL" != "6.1" ]; then
# scripts/feeds uninstall netifd
# scripts/feeds install netifd
#fi
2017-12-22 11:08:56 +01:00
cp .config.keep .config
2021-06-17 08:09:30 +02:00
scripts/feeds install kmod-macremapper
2018-02-27 21:54:33 +01:00
echo "Done"
2017-12-22 11:08:56 +01:00
2023-04-22 08:07:24 +02:00
if [ ! -f " ../../../ $OMR_TARGET_CONFIG " ] || [ " $NOT_SUPPORTED " = "1" ] ; then
2018-05-11 15:14:40 +02:00
echo " Target $OMR_TARGET not found ! You have to configure and compile your kernel manually. "
exit 1
fi
2024-11-14 10:20:59 +01:00
[ " $ONLY_PREPARE " = "yes" ] && exit 0
2022-06-01 08:11:16 +02:00
echo " Building $OMR_DIST for the target $OMR_TARGET with kernel ${ OMR_KERNEL } "
2017-12-22 11:08:56 +01:00
make defconfig
2018-04-17 08:32:01 +02:00
make IGNORE_ERRORS = m " $@ "
2018-02-27 21:54:33 +01:00
echo "Done"