blob: 716b1b26ed5e0afbf587054500534b9a46b8828a [file] [log] [blame]
developer843fd2b2022-04-15 18:30:12 +08001#!/bin/sh
2echo "clone.........."
3git clone --branch master https://gerrit.mediatek.inc/openwrt/lede mac80211_package
4git clone --branch openwrt-21.02 https://gerrit.mediatek.inc/openwrt/lede openwrt
5git clone --branch master https://gerrit.mediatek.inc/openwrt/feeds/mtk_openwrt_feeds
6git clone https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic
7
8echo "copy.........."
9mkdir -p mac80211_package/package/kernel/mt76/patches
10cp openwrt/package/kernel/mt76/patches/100-Revert-of-net-pass-the-dst-buffer-to-of_get_mac_addr.patch mac80211_package/package/kernel/mt76/patches
11cp -rfa mtk_openwrt_feeds/autobuild_mac80211_release/package/ mac80211_package/
12
13echo "gen mt76 patches.........."
developer19694572022-04-18 19:58:01 +080014cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/kernel/mt76
developer843fd2b2022-04-15 18:30:12 +080015cd mac80211_package/package/kernel/mt76
16./rdkb_inc_helper patches
17mv patches.inc patches
18cd -
19rm -rf meta-filogic/recipes-kernel/linux-mt76/files/patches
20cp -rf mac80211_package/package/kernel/mt76/patches meta-filogic/recipes-kernel/linux-mt76/files/
21
22echo "gen mac80211 patches.........."
developer19694572022-04-18 19:58:01 +080023cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/kernel/mac80211/patches
developer843fd2b2022-04-15 18:30:12 +080024cd mac80211_package/package/kernel/mac80211/patches
25./rdkb_inc_helper subsys/
26./rdkb_inc_helper build/
27mv subsys.inc subsys
28mv build.inc build
29mkdir patches
30cp -r subsys patches
31cp -r build patches
32cd -
33rm -rf meta-filogic/recipes-kernel/linux-mac80211/files/patches
34cp -rf mac80211_package/package/kernel/mac80211/patches/patches meta-filogic/recipes-kernel/linux-mac80211/files
35
36echo "copy mt76 firmware.........."
37rm -rf meta-filogic/recipes-kernel/linux-mt76/files/src
38cp -rf mac80211_package/package/kernel/mt76/src meta-filogic/recipes-kernel/linux-mt76/files/
39
40echo "Update bb file version.........."
41ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/kernel/mt76/Makefile | cut -c 21-`
42sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-kernel/linux-mt76/linux-mt76.bb
43ver2=`grep "PKG_VERSION:=" mac80211_package/package/kernel/mac80211/Makefile | cut -c 14-`
44sed -i 's/PV =.*/PV = "'${ver2%-*}'"/g' meta-filogic/recipes-kernel/linux-mac80211/linux-mac80211.bb
45ver3=`grep "PKG_HASH" mac80211_package/package/kernel/mac80211/Makefile | cut -c 11-`
46sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${ver3}'"/g' meta-filogic/recipes-kernel/linux-mac80211/linux-mac80211.bb
47
developer64ad4e62022-04-29 18:17:53 +080048echo "gen hostapd patches.........."
49cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/network/services/hostapd
50cd mac80211_package/package/network/services/hostapd
51./rdkb_inc_helper patches
52mv patches.inc patches
53echo "some patch do not apply to RDKB"
54sed -i 's/450-scan_wait.patch/&;apply=no/' patches/patches.inc
55
56cd -
57rm -rf meta-filogic/recipes-connectivity/hostapd/files/patches
58cp -rf mac80211_package/package/network/services/hostapd/patches meta-filogic/recipes-connectivity/hostapd/files/
59rm -rf meta-filogic/recipes-connectivity/hostapd/files/src
60cp -rf mac80211_package/package/network/services/hostapd/src meta-filogic/recipes-connectivity/hostapd/files/
61
62echo "Update hostapd bb file version.........."
63ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/network/services/hostapd/Makefile | cut -c 21-`
64sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-connectivity/hostapd//hostapd_2.10.bb
65
developer843fd2b2022-04-15 18:30:12 +080066echo "Sync from OpenWRT done , ready to commit meta-filogic!!!"