Skip to content

Commit

Permalink
Update init_build.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Kyo <[email protected]>
  • Loading branch information
kyogithub authored Jan 7, 2025
1 parent 2ad8f5c commit b61ad3d
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions script/init_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,29 @@ tag="" #commit hash
if [ $type = "foss" ]; then
#official MX4300 PR from testuser7
#https://github.com/openwrt/openwrt/pull/16070
PATCH="https://github.com/openwrt/openwrt/pull/16070.diff"
#only necessary in 24.10 atm.
#PATCH="https://github.com/openwrt/openwrt/pull/16070.diff"
case $ver in
"snapshot")
PATCH=" "
;;
"24.10"*)
PATCH="https://github.com/openwrt/openwrt/pull/16070.diff"
;;
esac
elif [ $type = "nss" ]; then
#qosmio NSS patch
#https://github.com/qosmio/openwrt-ipq
#for snapshot, apply "main-nss"
#for 24.10, apply "24.10-nss-mx4300" as PR16070 failed on ipq8174-mx4200.dtsi
case $ver in
"snapshot")
PATCH="https://github.com/openwrt/openwrt/compare/main...qosmio:openwrt-ipq:main-nss-mx4300.diff"
NSSBRANCH="main-nss-mx4300"
PATCH="https://github.com/openwrt/openwrt/compare/main...qosmio:openwrt-ipq:main-nss.diff"
NSSBRANCH="main-nss"
;;
"24.10"*)
PATCH="https://github.com/openwrt/openwrt/compare/openwrt-24.10...qosmio:openwrt-ipq:24.10-nss-mx4300.diff"
#PATCH="https://github.com/openwrt/openwrt/compare/openwrt-24.10...qosmio:openwrt-ipq:24.10-nss.diff https://github.com/openwrt/openwrt/pull/16070.diff"
NSSBRANCH="24.10-nss-mx4300"
;;
esac
Expand All @@ -49,8 +61,7 @@ if [ $sync = "y" ]; then
fi

echo $PATCH
curl -L $PATCH -o mx4300.diff
patch -p1 < mx4300.diff
for p in $PATCH; do curl -L $p | patch -p1; done

#1. support both 24.10-snapshot and (tagged) release
#2. Handle package/firmware/ipq-wifi/Makefile in *possible* patch failure.
Expand All @@ -73,4 +84,3 @@ fi
rej=$(find . -name "*.rej" | wc -l)
if [ ! $rej = "0" ]; then
exit 1
fi

0 comments on commit b61ad3d

Please sign in to comment.