|
17 | 17 |
|
18 | 18 | env: |
19 | 19 | REMOTE_REPOSITORY: openwrt/openwrt |
20 | | - REMOTE_BRANCH: openwrt-24.10 |
| 20 | + REMOTE_BRANCH: main |
21 | 21 | RELEASE_PREFIX: Mediatek_mt7988a_bpi-r4_mediatek |
22 | 22 | DEVICE_CONFIG: ${{ inputs.DEVICE_CONFIG == 'poe' && 'configs/mediatek/mt7988a/bpi-r4-poe' || 'configs/mediatek/mt7988a/bpi-r4' }} |
23 | 23 | ROLE_CONFIG: configs/common/main-router |
@@ -64,84 +64,45 @@ jobs: |
64 | 64 |
|
65 | 65 | - name: Clone Mediatek feed |
66 | 66 | run: | |
67 | | - git clone https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds mtk-openwrt-feeds |
| 67 | + git clone https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds |
68 | 68 |
|
69 | | - - name: Comment function that breaks .config rendering |
| 69 | + # NOTE: no need to add qosify and sqm-scripts due there is hw qos done by mtk folks |
| 70 | + - name: Dump my packages into a file |
70 | 71 | run: | |
71 | | - sed -i 's/apply_autobuild_script_patch modify_feeds_conf update_feeds/apply_autobuild_script_patch update_feeds/g' mtk-openwrt-feeds/autobuild/unified/rules |
72 | | -
|
73 | | - - name: Run Mediatek prepare |
74 | | - run: | |
75 | | - bash ./mtk-openwrt-feeds/autobuild/unified/autobuild.sh filogic-mac80211-mt7988_rfb-mt7996 prepare log_file=make |
76 | | -
|
77 | | - - name: Configure firmware image |
| 72 | + curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/mediatek/mt7988a/bpi-r4 >> my-config |
| 73 | + curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/main-router >> my-config |
| 74 | + curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/snapshot >> my-config |
| 75 | + curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/sfp >> my-config |
| 76 | + sed -i '/CONFIG_PACKAGE_wpad-mbedtls=y/d' my-config |
| 77 | + curl -SL https://raw.githubusercontent.com/danpawlik/openwrt-builder/master/configs/common/snapshot-mtk-feed >> my-config |
| 78 | + sed -i '/CONFIG_PACKAGE_qosify=y/d' my-config |
| 79 | + sed -i '/CONFIG_PACKAGE_sqm-scripts=y/d' my-config |
| 80 | +
|
| 81 | + - name: Add my packages into the mtk feed defconfig |
78 | 82 | run: | |
79 | | - curl -SL "https://raw.githubusercontent.com/${{ github.repository_owner }}/openwrt-builder/master/${{ env.DEVICE_CONFIG }}" > .config |
80 | | - curl -SL "https://raw.githubusercontent.com/${{ github.repository_owner }}/openwrt-builder/master/${{ env.ROLE_CONFIG }}" >> .config |
81 | | - curl -SL "https://raw.githubusercontent.com/${{ github.repository_owner }}/openwrt-builder/master/configs/common/snapshot" >> .config |
82 | | - curl -SL "https://raw.githubusercontent.com/${{ github.repository_owner }}/openwrt-builder/master/configs/common/snapshot-mtk-feed" >> .config |
| 83 | + grep '^CONFIG_PACKAGE*' my-config >> mtk-openwrt-feeds/autobuild/unified/filogic/master/defconfig |
| 84 | + grep '^CONFIG_PACKAGE*' my-config >> mtk-openwrt-feeds/autobuild/unified/filogic/25.12/defconfig |
| 85 | + grep '^CONFIG_PACKAGE*' my-config >> mtk-openwrt-feeds/autobuild/unified/filogic/24.10/defconfig |
83 | 86 |
|
84 | | - - name: Add missing kernel config or remove problematic and not needed for bpi-r4 |
85 | | - run: | |
86 | | - echo 'CONFIG_PINCTRL_MT7987=y' >> target/linux/mediatek/filogic/config-6.6 |
87 | | - echo 'CONFIG_COMMON_CLK_MT7987=y' >> target/linux/mediatek/filogic/config-6.6 |
88 | | - echo 'CONFIG_VIRTIO_BLK=n' >> target/linux/mediatek/filogic/config-6.6 |
89 | | - echo 'CONFIG_VIRTIO_NET=n' >> target/linux/mediatek/filogic/config-6.6 |
90 | | - echo 'CONFIG_REMOTEPROC_CDEV=n' >> target/linux/mediatek/filogic/config-6.6 |
91 | | - echo 'CONFIG_MTK_SCP=n' >> target/linux/mediatek/filogic/config-6.6 |
92 | | - echo 'CONFIG_MEDIATEK_NETSYS_V2=y' >> target/linux/mediatek/filogic/config-6.6 |
93 | | - echo 'CONFIG_MEDIATEK_NETSYS_V3=y' >> target/linux/mediatek/filogic/config-6.6 |
94 | | - sed -i '/CONFIG_EXTRA_FIRMWARE/d' target/linux/mediatek/filogic/config-6.6 |
95 | | - sed -i '/CONFIG_EXTRA_FIRMWARE_DIR/d' target/linux/mediatek/filogic/config-6.6 |
96 | | - sed -i 's/# CONFIG_PACKAGE_kmod-phy-airoha-en8811h is not set/CONFIG_PACKAGE_kmod-phy-airoha-en8811h=y/g' .config |
97 | | -
|
98 | | - - name: Run defconfig |
| 87 | + - name: Make symlink for mtk feed |
99 | 88 | run: | |
100 | | - make defconfig |
101 | | -# |
102 | | -### EEPROM FIX ### |
103 | | -# |
| 89 | + ln -s mtk-openwrt-feeds ../ |
104 | 90 |
|
105 | | - # https://github.com/openwrt/mt76/pull/954 |
106 | | - - name: Use patch from Yukariin |
| 91 | + - name: Run Mediatek build - without additional packages |
107 | 92 | run: | |
108 | | - mkdir -p package/kernel/mt76/patches |
109 | | - curl -SL https://github.com/openwrt/mt76/commit/8088940ffd047a6d282a95af829562e8038f5b2d.patch > package/kernel/mt76/patches/001-Add-tx_power-check-Yukariin.patch |
| 93 | + bash ../mtk-openwrt-feeds/autobuild/unified/autobuild.sh filogic bootloader=1 log_file=make || true |
110 | 94 |
|
111 | | -# # https://github.com/openwrt/mt76/pull/968 |
112 | | -# - name: Use patch from im-0 |
113 | | -# run: | |
114 | | -# mkdir -p package/kernel/mt76/patches |
115 | | -# curl -SL https://github.com/openwrt/mt76/commit/aaf90b24fde77a38ee9f0a60d7097ded6a94ad1f.patch > package/kernel/mt76/patches/001-use-tx_power-from-default-fw-if-EEPROM-contains-0s-im-0.patch |
116 | | - |
117 | | -################# |
118 | | -# - name: Workaround for golang |
119 | | -# run: | |
120 | | -# curl -SL https://raw.githubusercontent.com/openwrt/packages/refs/heads/master/lang/golang/golang/Makefile > package/feeds/packages/golang/Makefile |
121 | | - |
122 | | - - name: Print config file |
| 95 | + - name: Print the config file |
123 | 96 | run: cat .config |
124 | 97 |
|
125 | | - - name: Run defconfig |
| 98 | + - name: Disable nf-flow-netlink |
126 | 99 | run: | |
127 | | - make defconfig |
| 100 | + find feeds -type f -exec sed -i 's/\+kmod-nf-flow-netlink//g' {} \; |
| 101 | + sed -i 's/+kmod-nf-flow-netlink//g' feeds/mtk_openwrt_feed/feed/app/flowtable/Makefile |
128 | 102 |
|
129 | | - - name: Remove packages that are marked as modules just to save time |
| 103 | + - name: Build image with packages |
130 | 104 | run: | |
131 | | - grep "=m" .config | grep -v 'CONFIG_PACKAGE_libustream-mbedtls=m' | while read -r line; do module=$(echo "$line" | cut -f1 -d'='); sed -i "s/^$line$/# $module is not set/" .config; done |
132 | | -
|
133 | | - - name: Comment crypto-eip due it will raise an error |
134 | | - run: | |
135 | | - sed -i 's/CONFIG_PACKAGE_kmod-crypto-eip=y/# CONFIG_PACKAGE_kmod-crypto-eip is not set/g' .config |
136 | | -
|
137 | | - - name: Run defconfig once again |
138 | | - run: make defconfig |
139 | | - |
140 | | - - name: Print the config file |
141 | | - run: cat .config |
142 | | - |
143 | | - - name: Build the firmware image |
144 | | - run: make -j $(nproc) download world |
| 105 | + make -j$(nproc) world |
145 | 106 |
|
146 | 107 | - name: Compress all packages |
147 | 108 | run: | |
|
0 commit comments