added wifi support for orangepi_zero_2w
This commit is contained in:
@@ -1 +1 @@
|
||||
task [S] /etc/finit.d/available/modprobe.sh
|
||||
run [S] /etc/finit.d/available/modprobe.sh
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# Запуск DHCP-клиента после поднятия интерфейса wlan0
|
||||
service [2345] /usr/bin/udhcpc -R -n -p /var/run/udhcpc.wlan0.pid -i wlan0 -- DHCP Client
|
||||
@@ -0,0 +1,2 @@
|
||||
# Запуск wpa_supplicant для интерфейса wlan0 при загрузке системы
|
||||
service [S12345] /usr/bin/wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -- WPA Supplicant
|
||||
@@ -0,0 +1 @@
|
||||
../available/udhcpc@wlan0.conf
|
||||
@@ -0,0 +1 @@
|
||||
../available/wifi@wlan0.conf
|
||||
@@ -1,3 +1,6 @@
|
||||
uwe5622_bsp_sdio
|
||||
sprdwl_ng
|
||||
sprdbt_tty
|
||||
g_serial
|
||||
sunxi_cedrus
|
||||
sunxi_cir
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto wlan0
|
||||
iface wlan0 inet dhcp
|
||||
@@ -0,0 +1,7 @@
|
||||
ctrl_interface=/var/run/wpa_supplicant
|
||||
update_config=1
|
||||
|
||||
network={
|
||||
ssid="Worlt_5G"
|
||||
psk="Simba28082020"
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
[Section 1: Version]
|
||||
Major = 2
|
||||
Minor = 2
|
||||
|
||||
[Section 2: Board Config]
|
||||
Calib_Bypass = 11758
|
||||
TxChain_Mask = 2
|
||||
RxChain_Mask = 2
|
||||
|
||||
[Section 3: Board Config TPC]
|
||||
DPD_LUT_idx = 0x33,0x33,0x0,0x11,0x22,0x33,0x33,0x33
|
||||
TPC_Goal_Chain0 = 0,0,0,0,0,0,0,0
|
||||
TPC_Goal_Chain1 = 159,167,162,152,159,167,162,152
|
||||
|
||||
[Section 4: TPC-LUT]
|
||||
Chain0_LUT_0 = 6,0,40,0
|
||||
Chain0_LUT_1 = 6,1,24,0
|
||||
Chain0_LUT_2 = 6,2,8,0
|
||||
Chain0_LUT_3 = 10,2,0,0
|
||||
Chain0_LUT_4 = 14,2,0,0
|
||||
Chain0_LUT_5 = 18,2,0,0
|
||||
Chain0_LUT_6 = 22,2,0,0
|
||||
Chain0_LUT_7 = 26,2,0,0
|
||||
Chain1_LUT_0 = 6,0,40,0
|
||||
Chain1_LUT_1 = 6,1,24,0
|
||||
Chain1_LUT_2 = 6,2,8,0
|
||||
Chain1_LUT_3 = 10,2,0,0
|
||||
Chain1_LUT_4 = 14,2,0,0
|
||||
Chain1_LUT_5 = 18,2,0,0
|
||||
Chain1_LUT_6 = 22,2,0,0
|
||||
Chain1_LUT_7 = 26,2,0,0
|
||||
|
||||
[Section 5: Board Config Frequency Compensation]
|
||||
2G_Channel_Chain0 = 6,6,6,6,7,7,7,7,7,7,7,7,7,7
|
||||
2G_Channel_Chain1 = 6,6,6,6,7,7,7,7,7,7,7,7,7,7
|
||||
5G_Channel_Chain0 = 11,11,11,11,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,9,9,9,9,9
|
||||
5G_Channel_Chain1 = 11,11,11,11,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,9,9,9,9,9
|
||||
|
||||
[Section 6: Rate To Power with BW 20M]
|
||||
11b_Power = 20,20,20,20
|
||||
11ag_Power = 28,32,36,44,28,32,36,48
|
||||
11n_Power = 34,38,38,40,40,44,44,48,32,36,36,40,40,44,44,54,48
|
||||
11ac_Power = 32,36,36,40,40,44,44,48,50,66,32,36,36,40,40,44,44,48,50,66
|
||||
|
||||
[Section 7: Power Backoff]
|
||||
Green_WIFI_offset = 0
|
||||
HT40_Power_offset = 0
|
||||
VHT40_Power_offset = 0
|
||||
VHT80_Power_offset = 0
|
||||
SAR_Power_offset = 0
|
||||
Mean_Power_offset = 36
|
||||
|
||||
[Section 8: Reg Domain]
|
||||
reg_domain1 = 0x00000001
|
||||
reg_domain2 = 0x00000002
|
||||
|
||||
[Section 9: Band Edge Power offset (MKK, FCC, ETSI)]
|
||||
BW20M = 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41
|
||||
BW40M = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21
|
||||
BW80M = 6,5,4,3,2,1
|
||||
|
||||
[Section 10: TX Scale]
|
||||
Chain0_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
|
||||
Chain1_1 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
|
||||
Chain0_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17
|
||||
Chain1_2 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17
|
||||
Chain0_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18
|
||||
Chain1_3 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,18
|
||||
Chain0_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19
|
||||
Chain1_4 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,19
|
||||
Chain0_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20
|
||||
Chain1_5 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,20
|
||||
Chain0_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21
|
||||
Chain1_6 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,21
|
||||
Chain0_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22
|
||||
Chain1_7 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,22
|
||||
Chain0_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23
|
||||
Chain1_8 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,23
|
||||
Chain0_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24
|
||||
Chain1_9 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,24
|
||||
Chain0_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25
|
||||
Chain1_10 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,25
|
||||
Chain0_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26
|
||||
Chain1_11 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,26
|
||||
Chain0_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27
|
||||
Chain1_12 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,27
|
||||
Chain0_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28
|
||||
Chain1_13 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28
|
||||
Chain0_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29
|
||||
Chain1_14 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,29
|
||||
Chain0_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30
|
||||
Chain1_36 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,30
|
||||
Chain0_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31
|
||||
Chain1_40 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,31
|
||||
Chain0_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32
|
||||
Chain1_44 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,32
|
||||
Chain0_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33
|
||||
Chain1_48 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,33
|
||||
Chain0_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34
|
||||
Chain1_52 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,34
|
||||
Chain0_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35
|
||||
Chain1_56 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,35
|
||||
Chain0_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36
|
||||
Chain1_60 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,36
|
||||
Chain0_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37
|
||||
Chain1_64 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,37
|
||||
Chain0_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38
|
||||
Chain1_100 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,38
|
||||
Chain0_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39
|
||||
Chain1_104 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,39
|
||||
Chain0_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40
|
||||
Chain1_108 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,40
|
||||
Chain0_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41
|
||||
Chain1_112 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,41
|
||||
Chain0_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42
|
||||
Chain1_116 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,42
|
||||
Chain0_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43
|
||||
Chain1_120 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,43
|
||||
Chain0_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44
|
||||
Chain1_124 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,44
|
||||
Chain0_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45
|
||||
Chain1_128 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,45
|
||||
Chain0_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46
|
||||
Chain1_132 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,46
|
||||
Chain0_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47
|
||||
Chain1_136 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,47
|
||||
Chain0_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48
|
||||
Chain1_140 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,48
|
||||
Chain0_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49
|
||||
Chain1_144 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,49
|
||||
Chain0_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50
|
||||
Chain1_149 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,50
|
||||
Chain0_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51
|
||||
Chain1_153 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,51
|
||||
Chain0_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52
|
||||
Chain1_157 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,52
|
||||
Chain0_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53
|
||||
Chain1_161 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,53
|
||||
Chain0_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54
|
||||
Chain1_165 = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,54
|
||||
|
||||
[Section 11: misc]
|
||||
DFS_switch = 1
|
||||
power_save_switch = 2
|
||||
ex-Fem_and_ex-LNA_param_setup = 3
|
||||
rssi_report_diff = 4
|
||||
|
||||
[Section 12: debug reg]
|
||||
address = 0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0x10,0x11,0x12,0x13,0x14,0x15,0x16
|
||||
value = 0x16,0x17,0x18,0x19,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x30,0x31
|
||||
|
||||
[Section 13: coex_config]
|
||||
bt_performance_cfg0 = 0x01010101
|
||||
bt_performance_cfg1 = 0x01000000
|
||||
wifi_performance_cfg0 = 0x01050A01
|
||||
wifi_performance_cfg2 = 0x00000000
|
||||
strategy_cfg0 = 0x01010100
|
||||
strategy_cfg1 = 0x03000000
|
||||
strategy_cfg2 = 0x08020000
|
||||
compatibility_cfg0 = 0x04040000
|
||||
compatibility_cfg1 = 0x0
|
||||
ant_cfg0 = 0x0
|
||||
ant_cfg1 = 0x0
|
||||
isolation_cfg0 = 0x0505
|
||||
isolation_cfg1 = 0x0
|
||||
reserved_cfg0 = 0x0
|
||||
reserved_cfg1 = 0x0
|
||||
reserved_cfg2 = 0x0
|
||||
reserved_cfg3 = 0x0
|
||||
reserved_cfg4 = 0x0
|
||||
reserved_cfg5 = 0x0
|
||||
reserved_cfg6 = 0x0
|
||||
reserved_cfg7 = 0x0
|
||||
|
||||
[Section 14: rf_tlv_config]
|
||||
rf_config = 0xAA,0x55,0x00,0xFF,0x8,0xA,0x0,0x5,0x0,0x0,0x0,0x0,0x0,0x0
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
CONFIG_BACKEND=file
|
||||
CONFIG_CTRL_IFACE=y
|
||||
CONFIG_DEBUG_FILE=y
|
||||
CONFIG_DEBUG_SYSLOG=y
|
||||
CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
|
||||
CONFIG_DRIVER_NL80211=y
|
||||
CONFIG_DRIVER_WEXT=y
|
||||
CONFIG_DRIVER_WIRED=y
|
||||
CONFIG_EAP_GTC=y
|
||||
CONFIG_EAP_LEAP=y
|
||||
CONFIG_EAP_MD5=y
|
||||
CONFIG_EAP_MSCHAPV2=y
|
||||
CONFIG_EAP_OTP=y
|
||||
CONFIG_EAP_PEAP=y
|
||||
CONFIG_EAP_TLS=y
|
||||
CONFIG_EAP_TTLS=y
|
||||
CONFIG_IEEE8021X_EAPOL=y
|
||||
CONFIG_IPV6=y
|
||||
CONFIG_LIBNL32=y
|
||||
CONFIG_PEERKEY=y
|
||||
CONFIG_PKCS12=y
|
||||
CONFIG_SMARTCARD=y
|
||||
CONFIG_WPS=y
|
||||
@@ -19,6 +19,7 @@
|
||||
. ./scripts/finit_init.sh
|
||||
. ./scripts/libsqlite3.sh
|
||||
. ./scripts/lm_sensors.sh
|
||||
. ./scripts/wpa_supplicant.sh
|
||||
|
||||
case $1 in
|
||||
build)
|
||||
@@ -76,6 +77,9 @@ case $1 in
|
||||
lm_sensors)
|
||||
lm_sensors
|
||||
;;
|
||||
wpa_supplicant)
|
||||
build_wpa_supplicant
|
||||
;;
|
||||
*)
|
||||
printf "$UYELLOW** $0 script using: $0 {clean|build|download|rootfs}\n$RESET"
|
||||
exit 1
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
. ./scripts/finit_init.sh
|
||||
. ./scripts/libsqlite3.sh
|
||||
. ./scripts/lm_sensors.sh
|
||||
. ./scripts/wpa_supplicant.sh
|
||||
|
||||
#----------- Building rootfs ----------------------
|
||||
rootfs() {
|
||||
@@ -81,6 +82,7 @@ EOF
|
||||
[ "$GITEA_ENABLE" = "y" ] && gitea
|
||||
[ "$LIBNL_ENABLE" = "y" ] && libnl
|
||||
[ "$IW_ENABLE" = "y" ] && iw
|
||||
[ "$WPA_SUPPLICANT_ENABLE" = "y" ] && build_wpa_supplicant
|
||||
[ "$HOSTAPD_ENABLE" = "y" ] && hostapd
|
||||
[ "$IPTABLES_ENABLE" = "y" ] && iptables
|
||||
[ "$KO8821AU_ENABLE" = "y" ] && ko8821au
|
||||
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./scripts/colors.sh
|
||||
. ./scripts/funcs.sh
|
||||
. ./scripts/config.sh
|
||||
. ./scripts/libnl.sh
|
||||
. ./scripts/openssl.sh
|
||||
|
||||
build_wpa_supplicant() {
|
||||
[ ! -d $build/libnl ] && libnl
|
||||
[ ! -d $build/openssl ] && openssl
|
||||
pkgname=wpa_supplicant
|
||||
pkgver=2.11
|
||||
printf "$GREEN** Building and installing iw\n$RESET"
|
||||
[ ! -d $build/wpa_supplicant ] && mkdir $build/wpa_supplicant
|
||||
cd $build/wpa_supplicant
|
||||
tar -xvf $root/downloads/${pkgname}-${pkgver}.tar.gz
|
||||
cd ${pkgname}-${pkgver}/wpa_supplicant
|
||||
cp $root/board/${BOARD_NAME}/wpa_supplicant.config .config
|
||||
CC=${CROSS_COMPILE}-gcc \
|
||||
PKG_CONFIG_PATH=/opt/toolchains/$CROSS_COMPILE/$CROSS_COMPILE/sysroot/usr/lib/pkgconfig \
|
||||
make ${makeflags} BINDIR=/usr/bin LIBDIR=/usr/lib
|
||||
check $? "Build ${pkgname}"
|
||||
${CROSS_COMPILE}-strip wpa_cli wpa_passphrase wpa_supplicant
|
||||
check $? "Stripping ${pkgname} binary"
|
||||
cp -v wpa_cli wpa_passphrase wpa_supplicant $rootfspath/usr/bin/
|
||||
check $? "Install to rootfs ${pkgname}"
|
||||
}
|
||||
@@ -25,3 +25,4 @@ https://dl.gitea.com/gitea/1.22.4/gitea-1.22.4-linux-arm-5
|
||||
# https://github.com/troglobit/libuev
|
||||
# https://github.com/troglobit/finit
|
||||
# https://github.com/LuaDist/libsqlite3.git
|
||||
# https://w1.fi/releases/wpa_supplicant-2.11.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user