@@ -41,20 +41,32 @@ dax2Ipll="fe80::aa63:7dff:fe2e:97d8%$cIface"
4141hlk1Ipll=" 169.254.145.20"
4242hlk2Ipll=" 169.254.145.22"
4343
44+ youhuaIpll=" fe80::d65f:25ff:feeb:63d8%$cIface "
45+
4446source " ${KCONFIG_UTILS_DIR} /kconfig-utils.sh"
4547
46- function fTestConf ()
48+ function fHostapdSourceTreeOverride ()
4749{
48- kconfig_set CONFIG_DEVEL
49- kconfig_set CONFIG_SRC_TREE_OVERRIDE
50-
5150 local mHostapdGitSrc=" $OPENWRT_BUILD_DIR /package/network/services/hostapd/git-src"
5251 rm -f " $mHostapdGitSrc "
5352 ln -s " ${HOSTAPD_REPO_DIR} /.git" " $mHostapdGitSrc "
53+ }
5454
55+ function fNetifdSourceTreeOverride()
56+ {
5557 local mNetifdGitSrc=" $OPENWRT_BUILD_DIR /package/network/config/netifd/git-src"
5658 rm -f " $mNetifdGitSrc "
5759 ln -s " $NETIFD_REPO_DIR /.git" " $mNetifdGitSrc "
60+ }
61+
62+ function fTestConf()
63+ {
64+ kconfig_set CONFIG_DEVEL
65+ kconfig_set CONFIG_SRC_TREE_OVERRIDE
66+
67+ # fHostapdSourceTreeOverride
68+
69+ fNetifdSourceTreeOverride
5870
5971 kconfig_set CONFIG_PACKAGE_iperf3
6072
@@ -93,6 +105,34 @@ function fBuildDapX()
93105 popd
94106}
95107
108+ function fBuildYouhua()
109+ {
110+ pushd " $OPENWRT_BUILD_DIR "
111+
112+ ./scripts/feeds update -a
113+ ./scripts/feeds install -a
114+
115+ # Prepare firmware for D-Link DAP-X1860
116+ echo " " > " $KCONFIG_CONFIG_PATH "
117+ kconfig_init_register
118+
119+ kconfig_set CONFIG_TARGET_ramips
120+ kconfig_set CONFIG_TARGET_ramips_mt7621
121+ kconfig_set CONFIG_TARGET_ramips_mt7621_DEVICE_youhua_wr1200js
122+ make defconfig
123+
124+ fTestConf
125+ make defconfig
126+
127+ kconfig_check
128+ kconfig_wipe_register
129+
130+ clean_hostapd
131+
132+ make -j $(( $(nproc)- 1 ))
133+ popd
134+ }
135+
96136function fBuildHlk()
97137{
98138 pushd " $OPENWRT_BUILD_DIR "
@@ -166,18 +206,22 @@ function dWait()
166206
167207function wait_all()
168208{
169- dWait ${hlk1Ipll }
170- dWait ${hlk2Ipll }
171- return
209+ # dWait ${youhuaIpll }
210+ # dWait ${dax1Ipll }
211+ # return
172212
173- dWait ${dax1Ipll}
174- dWait ${dax2Ipll}
175- return
213+ # dWait ${hlk1Ipll}
214+ # dWait ${hlk2Ipll}
215+ # return
216+
217+ # dWait ${dax1Ipll}
218+ # dWait ${dax2Ipll}
219+ # return
176220
177221 dWait ${verdeIP}
178- dWait ${neroIP}
179- dWait ${bluIP}
180- dWait ${bianco43IP}
222+ # dWait ${neroIP}
223+ # dWait ${bluIP}
224+ # dWait ${bianco43IP}
181225}
182226
183227function dConf()
@@ -223,59 +267,68 @@ EOF
223267
224268function conf_all()
225269{
226- dConf ${hlk1Ipll} " OpenWrt-Hlk1" " 169.254.145.20"
227- dConf ${hlk2Ipll} " OpenWrt-Hlk2" " 169.254.145.22"
228- return
270+ # dConf ${youhuaIpll} "OpenWrt-Youhua" "192.168.1.24"
271+ # dConf ${dax1Ipll} "OpenWrt-Dax1" "192.168.1.16"
272+ # return
273+
274+ # dConf ${hlk1Ipll} "OpenWrt-Hlk1" "169.254.145.20"
275+ # dConf ${hlk2Ipll} "OpenWrt-Hlk2" "169.254.145.22"
276+ # return
229277
230- dConf ${dax1Ipll} " OpenWrt-Dax1" " 192.168.1.16"
231- dConf ${dax2Ipll} " OpenWrt-Dax2" " 192.168.1.18"
232- return
278+ # dConf ${dax1Ipll} "OpenWrt-Dax1" "192.168.1.16"
279+ # dConf ${dax2Ipll} "OpenWrt-Dax2" "192.168.1.18"
280+ # return
233281
234282 dConf ${verdeIP} " OpenWrt-Verde" " 192.168.1.4"
235- dConf ${neroIP} " OpenWrt-nero" " 192.168.1.10"
236- dConf ${bluIP} " OpenWrt-blu" " 192.168.1.8"
237- dConf ${bianco43IP} " OpenWrt-bianco43" " 192.168.1.12"
283+ # dConf ${neroIP} "OpenWrt-nero" "192.168.1.10"
284+ # dConf ${bluIP} "OpenWrt-blu" "192.168.1.8"
285+ # dConf ${bianco43IP} "OpenWrt-bianco43" "192.168.1.12"
238286}
239287
240288function flash_all()
241289{
242- dflash ${hlk1Ipll} " ${OPENWRT_BUILD_DIR} /bin/targets/ramips/mt7621/openwrt-ramips-mt7621-hilink_hlk-7621a-evb-squashfs-sysupgrade.bin"
243- dflash ${hlk2Ipll} " ${OPENWRT_BUILD_DIR} /bin/targets/ramips/mt7621/openwrt-ramips-mt7621-hilink_hlk-7621a-evb-squashfs-sysupgrade.bin"
290+ # dflash ${hlk1Ipll} "${OPENWRT_BUILD_DIR}/bin/targets/ramips/mt7621/openwrt-ramips-mt7621-hilink_hlk-7621a-evb-squashfs-sysupgrade.bin"
291+ # dflash ${hlk2Ipll} "${OPENWRT_BUILD_DIR}/bin/targets/ramips/mt7621/openwrt-ramips-mt7621-hilink_hlk-7621a-evb-squashfs-sysupgrade.bin"
244292
245293# dflash ${dax1Ipll} "${OPENWRT_BUILD_DIR}/bin/targets/ramips/mt7621/openwrt-ramips-mt7621-dlink_dap-x1860-a1-squashfs-sysupgrade.bin"
246294# dflash ${dax2Ipll} "${OPENWRT_BUILD_DIR}/bin/targets/ramips/mt7621/openwrt-ramips-mt7621-dlink_dap-x1860-a1-squashfs-sysupgrade.bin"
247295
248- # dflash ${verdeIP} "${OPENWRT_BUILD_DIR}/bin/targets/ath79/generic/openwrt-ath79-generic-tplink_tl-wdr3600-v1-squashfs-sysupgrade.bin"
296+ dflash ${verdeIP} " ${OPENWRT_BUILD_DIR} /bin/targets/ath79/generic/openwrt-ath79-generic-tplink_tl-wdr3600-v1-squashfs-sysupgrade.bin"
249297# dflash ${neroIP} "${OPENWRT_BUILD_DIR}/bin/targets/ath79/generic/openwrt-ath79-generic-tplink_tl-wdr3600-v1-squashfs-sysupgrade.bin"
250298# dflash ${bluIP} "${OPENWRT_BUILD_DIR}/bin/targets/ath79/generic/openwrt-ath79-generic-tplink_tl-wdr3600-v1-squashfs-sysupgrade.bin"
251299# dflash ${bianco43IP} "${OPENWRT_BUILD_DIR}/bin/targets/ath79/generic/openwrt-ath79-generic-tplink_tl-wdr4300-v1-squashfs-sysupgrade.bin"
252300
301+ # dflash ${youhuaIpll} "${OPENWRT_BUILD_DIR}/bin/targets/ramips/mt7621/openwrt-ramips-mt7621-youhua_wr1200js-squashfs-sysupgrade.bin"
302+
253303 wait_all
254304
255305 conf_all
256306
257- ssh root@${hlk1Ipll} reboot
258- ssh root@${hlk2Ipll} reboot
259-
260- return
307+ # ssh root@${hlk1Ipll} reboot
308+ # ssh root@${hlk2Ipll} reboot
261309
262-
263- ssh root@${dax1Ipll} reboot
264- ssh root@${dax2Ipll} reboot
265-
266- return
310+ # ssh root@${dax1Ipll} reboot
311+ # ssh root@${dax2Ipll} reboot
267312
268313 ssh root@${verdeIP} reboot
269- ssh root@${neroIP} reboot
270- ssh root@${bluIP} reboot
271- ssh root@${bianco43IP} reboot
314+ # ssh root@${neroIP} reboot
315+ # ssh root@${bluIP} reboot
316+ # ssh root@${bianco43IP} reboot
317+
318+ # ssh root@${youhuaIpll} reboot
272319}
273320
274321function dev_packages_paths()
275322{
276- echo package/network/config/netifd \
277- package/network/config/wifi-scripts \
278- package/network/services/hostapd
323+ echo package/feeds/libremesh/lime-system \
324+ package/feeds/libremesh/lime-proto-batadv \
325+ package/feeds/libremesh/lime-proto-babeld
326+
327+ # package/feeds/libremesh/lime-proto-anygw
328+
329+ # echo package/network/config/netifd
330+ # package/network/config/wifi-scripts \
331+ # package/network/services/hostapd
279332}
280333
281334function clean_packages()
@@ -313,11 +366,10 @@ function upgrade_packages()
313366
314367 local mInstalls=" "
315368
316- for mPackageName in \
317- netifd \
318- hostapd-common wpad-basic-mbedtls wifi-scripts ; do
369+ for mPackageName in $( dev_packages_paths) ; do
370+ mPackageName=" $( basename " $mPackageName " ) "
319371
320- local mPkgPath=" $( ls " $OPENWRT_BUILD_DIR /bin/packages/$dPkgArch /base /$mPackageName " * .ipk) "
372+ local mPkgPath=" $( ls " $OPENWRT_BUILD_DIR /bin/packages/$dPkgArch /" * " /$mPackageName " * .ipk | head -n 1 ) "
321373 scp -O " $mPkgPath " root@[${dAddress} ]:/tmp/
322374
323375 mInstalls=" $mInstalls \" /tmp/$( basename $mPkgPath ) \" "
@@ -328,16 +380,18 @@ function upgrade_packages()
328380
329381function upgrade_packages_all()
330382{
331- upgrade_packages ${hlk1Ipll}
332- upgrade_packages ${hlk2Ipll}
383+ # upgrade_packages ${hlk1Ipll}
384+ # upgrade_packages ${hlk2Ipll}
385+
386+ # upgrade_packages ${dax1Ipll}
387+ # upgrade_packages ${dax2Ipll}
333388
334- # upgrade_hostapd ${dax1Ipll}
335- # upgrade_hostapd ${dax2Ipll}
389+ upgrade_packages $verdeIP mips_24kc
390+ # upgrade_packages ${neroIP} mips_24kc
391+ # upgrade_packages $bluIP mips_24kc
392+ # upgrade_packages ${bianco43IP} mips_24kc
336393
337- # upgrade_hostapd $verdeIP
338- # upgrade_hostapd ${neroIP}
339- # upgrade_hostapd $bluIP
340- # upgrade_hostapd ${bianco43IP}
394+ # upgrade_packages ${youhuaIpll}
341395
342396 sleep 5s
343397
@@ -370,17 +424,17 @@ function dTestUbusDev()
370424{
371425 local dAddress=" $1 "
372426
373- ssh root@${dAddress} reboot ; sleep 10
427+ # ssh root@${dAddress} reboot ; sleep 10
374428
375- dWait ${dAddress}
429+ # dWait ${dAddress}
376430
377431 ssh root@${dAddress} << REMOTE_HOST_EOS
378- ubus call network add_dynamic_device '{"name":"nomestru ", "type":"8021ad", "ifname":"wlan0.peer1", "vid":"47"}'
379- ubus call network add_dynamic '{"name":"ifstru ", "proto":"static", "auto":1, "device":"nomestru", "ipaddr":"169.254.145.20", "netmask":"255.255.255.255"}'
380- ubus call network.interface.ifstru up
381- ubus call network.device status '{"name":"nomestru "}'
432+ ubus call network add_dynamic_device '{"name":"wlan0_peer1_47 ", "type":"8021ad", "ifname":"wlan0.peer1", "vid":"47"}'
433+ ubus call network add_dynamic '{"name":"wlan0_peer1_47 ", "proto":"static", "auto":1, "device":"nomestru", "ipaddr":"169.254.145.20", "netmask":"255.255.255.255"}'
434+ ubus call network.interface.wlan0_peer1_47 up
435+ ubus call network.device status '{"name":"wlan0_peer1_47 "}'
382436
383- ip address show nomestru
437+ ip address show wlan0_peer1_47
384438REMOTE_HOST_EOS
385439}
386440
@@ -422,17 +476,23 @@ function DO_NOT_CALL_prepareHostapdChangesForSubmission()
422476}
423477
424478# fBuildDapX
479+ # fBuildYouhua
480+
425481# fBuildHlk
426482
427483# flash_all
428484
429- # build_packages
430- # upgrade_packages_all
485+ build_packages
486+ upgrade_packages_all
431487
432- dTestUbusDev ${hlk1Ipll}
488+ # dTestUbusDev ${youhuaIpll}
489+ # dTestUbusDev ${hlk1Ipll}
433490
434491# conf_all
435492
493+ # dTestUbusDev ${verdeIP}
494+
495+
436496# dTestMulticast ${dax1Ipll}
437497# dTestMulticast ${dax2Ipll}
438498
0 commit comments