mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 00:59:50 +00:00
ax1800/axt1800: add kernel 5.4 support
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
This commit is contained in:
parent
920b71015c
commit
34774a1a41
14
config-wlan-ap-5.4.yml
Normal file
14
config-wlan-ap-5.4.yml
Normal file
@ -0,0 +1,14 @@
|
||||
repo: https://github.com/Telecominfraproject/wlan-ap.git
|
||||
branch: main
|
||||
git_clone_dir: wlan-ap
|
||||
openwrt_root_dir: wlan-ap/openwrt
|
||||
revision: d4442efbfee4f5d4da2827e334a22d7ec965a491
|
||||
|
||||
patch_folders:
|
||||
- patches-wlan-ap-5.4
|
||||
|
||||
files_folders:
|
||||
- files-wlan-ap-5.4/
|
||||
|
||||
wlan_ap: true
|
||||
next: true
|
||||
@ -0,0 +1,13 @@
|
||||
Index: dnsmasq-2.85/src/rfc2131.c
|
||||
===================================================================
|
||||
--- dnsmasq-2.85.orig/src/rfc2131.c
|
||||
+++ dnsmasq-2.85/src/rfc2131.c
|
||||
@@ -724,7 +724,7 @@ size_t dhcp_reply(struct dhcp_context *c
|
||||
borken_opt = 1;
|
||||
else
|
||||
daemon->dhcp_buff[len] = 0;
|
||||
- if (legal_hostname(daemon->dhcp_buff))
|
||||
+ // if (legal_hostname(daemon->dhcp_buff))
|
||||
client_hostname = daemon->dhcp_buff;
|
||||
}
|
||||
|
||||
339
files-wlan-ap-5.4/openwrt/package/network/services/ppp/files/ppp.sh
Executable file
339
files-wlan-ap-5.4/openwrt/package/network/services/ppp/files/ppp.sh
Executable file
@ -0,0 +1,339 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -x /usr/sbin/pppd ] || exit 0
|
||||
|
||||
[ -n "$INCLUDE_ONLY" ] || {
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
. ../netifd-proto.sh
|
||||
init_proto "$@"
|
||||
}
|
||||
|
||||
ppp_select_ipaddr()
|
||||
{
|
||||
local subnets=$1
|
||||
local res
|
||||
local res_mask
|
||||
|
||||
for subnet in $subnets; do
|
||||
local addr="${subnet%%/*}"
|
||||
local mask="${subnet#*/}"
|
||||
|
||||
if [ -n "$res_mask" -a "$mask" != 32 ]; then
|
||||
[ "$mask" -gt "$res_mask" ] || [ "$res_mask" = 32 ] && {
|
||||
res="$addr"
|
||||
res_mask="$mask"
|
||||
}
|
||||
elif [ -z "$res_mask" ]; then
|
||||
res="$addr"
|
||||
res_mask="$mask"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$res"
|
||||
}
|
||||
|
||||
ppp_exitcode_tostring()
|
||||
{
|
||||
local errorcode=$1
|
||||
[ -n "$errorcode" ] || errorcode=5
|
||||
|
||||
case "$errorcode" in
|
||||
0) echo "OK" ;;
|
||||
1) echo "FATAL_ERROR" ;;
|
||||
2) echo "OPTION_ERROR" ;;
|
||||
3) echo "NOT_ROOT" ;;
|
||||
4) echo "NO_KERNEL_SUPPORT" ;;
|
||||
5) echo "USER_REQUEST" ;;
|
||||
6) echo "LOCK_FAILED" ;;
|
||||
7) echo "OPEN_FAILED" ;;
|
||||
8) echo "CONNECT_FAILED" ;;
|
||||
9) echo "PTYCMD_FAILED" ;;
|
||||
10) echo "NEGOTIATION_FAILED" ;;
|
||||
11) echo "PEER_AUTH_FAILED" ;;
|
||||
12) echo "IDLE_TIMEOUT" ;;
|
||||
13) echo "CONNECT_TIME" ;;
|
||||
14) echo "CALLBACK" ;;
|
||||
15) echo "PEER_DEAD" ;;
|
||||
16) echo "HANGUP" ;;
|
||||
17) echo "LOOPBACK" ;;
|
||||
18) echo "INIT_FAILED" ;;
|
||||
19) echo "AUTH_TOPEER_FAILED" ;;
|
||||
20) echo "TRAFFIC_LIMIT" ;;
|
||||
21) echo "CNID_AUTH_FAILED";;
|
||||
*) echo "UNKNOWN_ERROR" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
ppp_generic_init_config() {
|
||||
proto_config_add_string username
|
||||
proto_config_add_string password
|
||||
proto_config_add_string keepalive
|
||||
proto_config_add_boolean keepalive_adaptive
|
||||
proto_config_add_int demand
|
||||
proto_config_add_string pppd_options
|
||||
proto_config_add_string 'connect:file'
|
||||
proto_config_add_string 'disconnect:file'
|
||||
[ -e /proc/sys/net/ipv6 ] && proto_config_add_string ipv6
|
||||
proto_config_add_boolean authfail
|
||||
proto_config_add_int mtu
|
||||
proto_config_add_string pppname
|
||||
proto_config_add_string unnumbered
|
||||
proto_config_add_boolean persist
|
||||
proto_config_add_int maxfail
|
||||
proto_config_add_int holdoff
|
||||
}
|
||||
|
||||
ppp_generic_setup() {
|
||||
local config="$1"; shift
|
||||
local localip
|
||||
|
||||
json_get_vars ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff peerdns
|
||||
|
||||
[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
|
||||
|
||||
if [ "$ipv6" = 0 ]; then
|
||||
ipv6=""
|
||||
elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
|
||||
ipv6=1
|
||||
autoipv6=1
|
||||
fi
|
||||
|
||||
if [ "${demand:-0}" -gt 0 ]; then
|
||||
demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
|
||||
else
|
||||
demand=""
|
||||
fi
|
||||
if [ -n "$persist" ]; then
|
||||
[ "${persist}" -lt 1 ] && persist="nopersist" || persist="persist"
|
||||
fi
|
||||
if [ -z "$maxfail" ]; then
|
||||
[ "$persist" = "persist" ] && maxfail=0 || maxfail=1
|
||||
fi
|
||||
[ -n "$mtu" ] || json_get_var mtu mtu
|
||||
[ -n "$pppname" ] || pppname="${proto:-ppp}-$config"
|
||||
[ -n "$unnumbered" ] && {
|
||||
local subnets
|
||||
( proto_add_host_dependency "$config" "" "$unnumbered" )
|
||||
network_get_subnets subnets "$unnumbered"
|
||||
localip=$(ppp_select_ipaddr "$subnets")
|
||||
[ -n "$localip" ] || {
|
||||
proto_block_restart "$config"
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
[ -n "$keepalive" ] || keepalive="5 1"
|
||||
|
||||
local lcp_failure="${keepalive%%[, ]*}"
|
||||
local lcp_interval="${keepalive##*[, ]}"
|
||||
local lcp_adaptive="lcp-echo-adaptive"
|
||||
[ "${lcp_failure:-0}" -lt 1 ] && lcp_failure=""
|
||||
[ "$lcp_interval" != "$keepalive" ] || lcp_interval=5
|
||||
[ "${keepalive_adaptive:-1}" -lt 1 ] && lcp_adaptive=""
|
||||
[ -n "$connect" ] || json_get_var connect connect
|
||||
[ -n "$disconnect" ] || json_get_var disconnect disconnect
|
||||
|
||||
proto_run_command "$config" /usr/sbin/pppd \
|
||||
nodetach ipparam "$config" \
|
||||
ifname "$pppname" \
|
||||
${localip:+$localip:} \
|
||||
${lcp_failure:+lcp-echo-interval $lcp_interval lcp-echo-failure $lcp_failure $lcp_adaptive} \
|
||||
${ipv6:++ipv6} \
|
||||
${ipv6:-noipv6} \
|
||||
${autoipv6:+set AUTOIPV6=1} \
|
||||
${ip6table:+set IP6TABLE=$ip6table} \
|
||||
${peerdns:+set PEERDNS=$peerdns} \
|
||||
nodefaultroute \
|
||||
usepeerdns \
|
||||
$demand $persist maxfail $maxfail \
|
||||
${holdoff:+holdoff "$holdoff"} \
|
||||
${username:+user "$username" password "$password"} \
|
||||
${connect:+connect "$connect"} \
|
||||
${disconnect:+disconnect "$disconnect"} \
|
||||
ip-up-script /lib/netifd/ppp-up \
|
||||
${ipv6:+ipv6-up-script /lib/netifd/ppp6-up} \
|
||||
ip-down-script /lib/netifd/ppp-down \
|
||||
${ipv6:+ipv6-down-script /lib/netifd/ppp-down} \
|
||||
${mtu:+mtu $mtu mru $mtu} \
|
||||
"$@" $pppd_options
|
||||
}
|
||||
|
||||
ppp_generic_teardown() {
|
||||
local interface="$1"
|
||||
local errorstring=$(ppp_exitcode_tostring $ERROR)
|
||||
|
||||
case "$ERROR" in
|
||||
0)
|
||||
;;
|
||||
2)
|
||||
proto_notify_error "$interface" "$errorstring"
|
||||
proto_block_restart "$interface"
|
||||
;;
|
||||
11|19)
|
||||
json_get_var authfail authfail
|
||||
proto_notify_error "$interface" "$errorstring"
|
||||
if [ "${authfail:-0}" -gt 0 ]; then
|
||||
proto_block_restart "$interface"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
proto_notify_error "$interface" "$errorstring"
|
||||
;;
|
||||
esac
|
||||
|
||||
proto_kill_command "$interface"
|
||||
}
|
||||
|
||||
# PPP on serial device
|
||||
|
||||
proto_ppp_init_config() {
|
||||
proto_config_add_string "device"
|
||||
ppp_generic_init_config
|
||||
no_device=1
|
||||
available=1
|
||||
lasterror=1
|
||||
}
|
||||
|
||||
proto_ppp_setup() {
|
||||
local config="$1"
|
||||
|
||||
json_get_var device device
|
||||
ppp_generic_setup "$config" "$device"
|
||||
}
|
||||
|
||||
proto_ppp_teardown() {
|
||||
ppp_generic_teardown "$@"
|
||||
}
|
||||
|
||||
proto_pppoe_init_config() {
|
||||
ppp_generic_init_config
|
||||
proto_config_add_string "ac"
|
||||
proto_config_add_string "service"
|
||||
proto_config_add_string "host_uniq"
|
||||
proto_config_add_int "padi_attempts"
|
||||
proto_config_add_int "padi_timeout"
|
||||
|
||||
lasterror=1
|
||||
}
|
||||
|
||||
proto_pppoe_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
for module in slhc ppp_generic pppox pppoe; do
|
||||
/sbin/insmod $module 2>&- >&-
|
||||
done
|
||||
|
||||
json_get_var mtu mtu
|
||||
mtu="${mtu:-1492}"
|
||||
|
||||
json_get_var ac ac
|
||||
json_get_var service service
|
||||
json_get_var host_uniq host_uniq
|
||||
json_get_var padi_attempts padi_attempts
|
||||
json_get_var padi_timeout padi_timeout
|
||||
|
||||
ppp_generic_setup "$config" \
|
||||
plugin rp-pppoe.so \
|
||||
${ac:+rp_pppoe_ac "$ac"} \
|
||||
${service:+rp_pppoe_service "$service"} \
|
||||
${host_uniq:+host-uniq "$host_uniq"} \
|
||||
${padi_attempts:+pppoe-padi-attempts $padi_attempts} \
|
||||
${padi_timeout:+pppoe-padi-timeout $padi_timeout} \
|
||||
"nic-$iface"
|
||||
}
|
||||
|
||||
proto_pppoe_teardown() {
|
||||
ppp_generic_teardown "$@"
|
||||
}
|
||||
|
||||
proto_pppoa_init_config() {
|
||||
ppp_generic_init_config
|
||||
proto_config_add_int "atmdev"
|
||||
proto_config_add_int "vci"
|
||||
proto_config_add_int "vpi"
|
||||
proto_config_add_string "encaps"
|
||||
no_device=1
|
||||
available=1
|
||||
lasterror=1
|
||||
}
|
||||
|
||||
proto_pppoa_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
for module in slhc ppp_generic pppox pppoatm; do
|
||||
/sbin/insmod $module 2>&- >&-
|
||||
done
|
||||
|
||||
json_get_vars atmdev vci vpi encaps
|
||||
|
||||
case "$encaps" in
|
||||
1|vc) encaps="vc-encaps" ;;
|
||||
*) encaps="llc-encaps" ;;
|
||||
esac
|
||||
|
||||
ppp_generic_setup "$config" \
|
||||
plugin pppoatm.so \
|
||||
${atmdev:+$atmdev.}${vpi:-8}.${vci:-35} \
|
||||
${encaps}
|
||||
}
|
||||
|
||||
proto_pppoa_teardown() {
|
||||
ppp_generic_teardown "$@"
|
||||
}
|
||||
|
||||
proto_pptp_init_config() {
|
||||
ppp_generic_init_config
|
||||
proto_config_add_string "server"
|
||||
proto_config_add_string "interface"
|
||||
available=1
|
||||
no_device=1
|
||||
lasterror=1
|
||||
}
|
||||
|
||||
proto_pptp_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
local ip serv_addr server interface
|
||||
json_get_vars interface server
|
||||
[ -n "$server" ] && {
|
||||
for ip in $(resolveip -t 5 "$server"); do
|
||||
( proto_add_host_dependency "$config" "$ip" $interface )
|
||||
serv_addr=1
|
||||
done
|
||||
}
|
||||
[ -n "$serv_addr" ] || {
|
||||
echo "Could not resolve server address"
|
||||
sleep 5
|
||||
proto_setup_failed "$config"
|
||||
exit 1
|
||||
}
|
||||
|
||||
local load
|
||||
for module in slhc ppp_generic ppp_async ppp_mppe ip_gre gre pptp; do
|
||||
grep -q "^$module " /proc/modules && continue
|
||||
/sbin/insmod $module 2>&- >&-
|
||||
load=1
|
||||
done
|
||||
[ "$load" = "1" ] && sleep 1
|
||||
|
||||
ppp_generic_setup "$config" \
|
||||
plugin pptp.so \
|
||||
pptp_server $server \
|
||||
file /etc/ppp/options.pptp
|
||||
}
|
||||
|
||||
proto_pptp_teardown() {
|
||||
ppp_generic_teardown "$@"
|
||||
}
|
||||
|
||||
[ -n "$INCLUDE_ONLY" ] || {
|
||||
add_protocol ppp
|
||||
[ -f /usr/lib/pppd/*/rp-pppoe.so ] && add_protocol pppoe
|
||||
[ -f /usr/lib/pppd/*/pppoatm.so ] && add_protocol pppoa
|
||||
[ -f /usr/lib/pppd/*/pptp.so ] && add_protocol pptp
|
||||
}
|
||||
|
||||
@ -0,0 +1,13 @@
|
||||
Index: libiwinfo-2021-06-09-c0414642/iwinfo_lib.c
|
||||
===================================================================
|
||||
--- libiwinfo-2021-06-09-c0414642.orig/iwinfo_lib.c
|
||||
+++ libiwinfo-2021-06-09-c0414642/iwinfo_lib.c
|
||||
@@ -37,6 +37,8 @@ const char *IWINFO_KMGMT_NAMES[] = {
|
||||
"NONE",
|
||||
"802.1X",
|
||||
"PSK",
|
||||
+ "SAE",
|
||||
+ "OWE",
|
||||
};
|
||||
|
||||
const char *IWINFO_AUTH_NAMES[] = {
|
||||
@ -0,0 +1,60 @@
|
||||
--- a/libopkg/opkg_cmd.c
|
||||
+++ b/libopkg/opkg_cmd.c
|
||||
@@ -41,6 +41,29 @@
|
||||
#include "opkg_configure.h"
|
||||
#include "xsystem.h"
|
||||
|
||||
+int exec_command(const char *command)
|
||||
+{
|
||||
+ opkg_msg(NOTICE, "Updating database.\n");
|
||||
+ remove("/var/lock/opkg.lock");
|
||||
+
|
||||
+ FILE *fp;
|
||||
+
|
||||
+ fp = popen(command, "r");
|
||||
+ if (fp == NULL) {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ pclose(fp);
|
||||
+
|
||||
+ fp = fopen("/var/lock/opkg.lock", "w+");
|
||||
+ if (fp != NULL) {
|
||||
+ fclose(fp);
|
||||
+ }
|
||||
+
|
||||
+ opkg_msg(NOTICE, "Database update completed.\n");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void print_pkg(pkg_t * pkg)
|
||||
{
|
||||
char *version = pkg_version_str_alloc(pkg);
|
||||
@@ -200,7 +224,7 @@ static int opkg_update_cmd(int argc, cha
|
||||
rmdir(tmp);
|
||||
free(tmp);
|
||||
free(lists_dir);
|
||||
-
|
||||
+ exec_command("update_plugins_db update");
|
||||
return failures;
|
||||
}
|
||||
|
||||
@@ -486,7 +510,8 @@ static int opkg_install_cmd(int argc, ch
|
||||
err = -1;
|
||||
|
||||
write_status_files_if_changed();
|
||||
-
|
||||
+ if (err == 0)
|
||||
+ exec_command("update_plugins_db install");
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -914,6 +939,8 @@ static int opkg_remove_cmd(int argc, cha
|
||||
opkg_msg(NOTICE, "No packages removed.\n");
|
||||
|
||||
write_status_files_if_changed();
|
||||
+ if (err == 0)
|
||||
+ exec_command("update_plugins_db remove");
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
--- a/libopkg/opkg_install.c
|
||||
+++ b/libopkg/opkg_install.c
|
||||
@@ -1151,7 +1151,7 @@ static int resolve_conffiles(pkg_t * pkg
|
||||
char *new_conffile;
|
||||
sprintf_alloc(&new_conffile, "%s-opkg",
|
||||
root_filename);
|
||||
- opkg_msg(ERROR,
|
||||
+ opkg_msg(NOTICE,
|
||||
"Existing conffile %s "
|
||||
"is different from the conffile in the new package."
|
||||
" The new conffile will be placed at %s.\n",
|
||||
--- a/opkg-2021-06-13-1bf042dd/libopkg/pkg.c
|
||||
+++ b/libopkg/pkg.c
|
||||
@@ -1409,7 +1409,7 @@ int pkg_run_script(pkg_t * pkg, const ch
|
||||
return 0;
|
||||
}
|
||||
|
||||
- sprintf_alloc(&cmd, "%s %s", path, args);
|
||||
+ sprintf_alloc(&cmd, "%s %s 2>&1", path, args);
|
||||
free(path);
|
||||
{
|
||||
const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
|
||||
@ -0,0 +1,192 @@
|
||||
From 0ec6cdcaccb31d22ab7244bf0577ac99f21160de Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Mon, 23 May 2022 16:24:07 +0800
|
||||
Subject: [PATCH] ax1800/axt1800: fit dts for gl.inet
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
.../boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts | 6 +++
|
||||
.../boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi | 42 ++++++++++++++-----
|
||||
.../boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts | 35 ++++++++++++++--
|
||||
3 files changed, 69 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts
|
||||
index 77682246..9f98ef6d 100644
|
||||
--- a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts
|
||||
+++ b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dts
|
||||
@@ -27,6 +27,12 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&gl_hw {
|
||||
+ model = "ax1800";
|
||||
+ lan = "eth1 eth2 eth3 eth4";
|
||||
+ usb-port = "1-1";
|
||||
+};
|
||||
+
|
||||
&mdio0 {
|
||||
phy3: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
diff --git a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
|
||||
index 3afff938..f8d44187 100644
|
||||
--- a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
|
||||
+++ b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
|
||||
@@ -28,11 +28,6 @@
|
||||
ethernet0 = "/soc/dp1";
|
||||
ethernet1 = "/soc/dp2";
|
||||
ethernet2 = "/soc/dp3";
|
||||
-
|
||||
- led-boot = &led_run;
|
||||
- led-failsafe = &led_run;
|
||||
- led-running = &led_run;
|
||||
- led-upgrade = &led_run;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -44,6 +39,25 @@
|
||||
#endif
|
||||
};
|
||||
|
||||
+ gl_hw: gl_hw {
|
||||
+ compatible = "gl-hw-info";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+ model = "axt1800";
|
||||
+ wan = "eth0";
|
||||
+ switch-button = "gpio-16";
|
||||
+ reset-button = "gpio-50";
|
||||
+ usb-port = "1-1";
|
||||
+ flash_size = <128>;
|
||||
+ factory_data {
|
||||
+ device_mac = "0:ART", "0x0";
|
||||
+ device_ddns = "0:ART", "0x20";
|
||||
+ device_sn_bak = "0:ART", "0x30";
|
||||
+ device_sn = "0:ART", "0x40";
|
||||
+ country_code = "0:ART", "0x98";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
/*
|
||||
* +=========+==============+========================+
|
||||
* | | | |
|
||||
@@ -241,7 +255,7 @@
|
||||
pinctrl-0 = <&leds_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
- led_run: led@35 {
|
||||
+ led@35 {
|
||||
label = "white:sys";
|
||||
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
@@ -274,6 +288,18 @@
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+ gpio-export {
|
||||
+ compatible = "gpio-export";
|
||||
+ pinctrl-0 = <&usb_pins>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ usb_power {
|
||||
+ gpio-export,name = "usb_power";
|
||||
+ gpio-export,output = <1>;
|
||||
+ gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&blsp1_uart3 {
|
||||
@@ -324,7 +350,6 @@
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1200000 1100000
|
||||
- 1608000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
@@ -335,7 +360,6 @@
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1200000 1100000
|
||||
- 1608000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
@@ -346,7 +370,6 @@
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1200000 1100000
|
||||
- 1608000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
@@ -357,7 +380,6 @@
|
||||
864000 1100000
|
||||
1056000 1100000
|
||||
1200000 1100000
|
||||
- 1608000 1100000
|
||||
>;
|
||||
clock-latency = <200000>;
|
||||
};
|
||||
diff --git a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts
|
||||
index 0e5de3f1..483a6559 100644
|
||||
--- a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts
|
||||
+++ b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-axt1800.dts
|
||||
@@ -24,6 +24,21 @@
|
||||
aliases {
|
||||
sdhc0 = &sdhc_2;
|
||||
};
|
||||
+
|
||||
+ gl_fan {
|
||||
+ compatible = "gl-fan";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ fan_speed_gpio = <31>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&gl_hw {
|
||||
+ model = "axt1800";
|
||||
+ lan = "eth1 eth2";
|
||||
+ usb-port = "1-1";
|
||||
+ fan = "pwmchip0";
|
||||
+ dfs;
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
@@ -73,15 +88,27 @@
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
- pwm-fan {
|
||||
+ fan0: pwm-fan {
|
||||
compatible = "pwm-fan";
|
||||
pinctrl-0 = <&fan_pins>;
|
||||
pinctrl-names = "default";
|
||||
cooling-min-state = <0>;
|
||||
- cooling-max-state = <3>;
|
||||
+ cooling-max-state = <255>;
|
||||
#cooling-cells = <2>;
|
||||
- pwms = <&pwm 1 255>;
|
||||
- cooling-levels = <0 150 200 255>;
|
||||
+ pwms = <&pwm 1 40000 0>;
|
||||
+ cooling-levels = <0 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
|
||||
+ 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 37 38 39
|
||||
+ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
||||
+ 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
||||
+ 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
||||
+ 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
||||
+ 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
||||
+ 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
||||
+ 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
||||
+ 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
|
||||
+ 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
|
||||
+ 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
|
||||
+ 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255>;
|
||||
};
|
||||
};
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
26
patches-wlan-ap-5.4/0002-wifi-ax-fix-gen-macaddr.patch
Normal file
26
patches-wlan-ap-5.4/0002-wifi-ax-fix-gen-macaddr.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From 75535f2faf877838e412c4439311cf9971a16c98 Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Mon, 23 May 2022 15:50:48 +0800
|
||||
Subject: [PATCH] wifi-ax: fix gen macaddr
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh b/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
index 87abe4ea..7632d4d5 100644
|
||||
--- a/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
+++ b/feeds/wifi-ax/mac80211/files/lib/netifd/wireless/mac80211.sh
|
||||
@@ -558,7 +558,7 @@ mac80211_generate_mac() {
|
||||
macidx=$(($id + 1))
|
||||
|
||||
local use_global=0
|
||||
- [ "$id" -gt 0 -a "$macidx" -le "$num_global_macaddr" ] && use_global=1
|
||||
+ [ "$id" -gt 0 -a "$id" -lt "$num_global_macaddr" ] && use_global=1
|
||||
|
||||
[ "$((0x$mask1))" -gt 0 -a "$use_global" -lt 1 ] && {
|
||||
b1="0x$1"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
53451
patches-wlan-ap-5.4/0003-ipq807x-add-wireguard-support.patch
Normal file
53451
patches-wlan-ap-5.4/0003-ipq807x-add-wireguard-support.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,31 @@
|
||||
From dc760635ca3a6d37c3b2ca0f1d7f27fe86f9750b Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Mon, 23 May 2022 18:11:22 +0800
|
||||
Subject: [PATCH] ipq807x: change the suffix of nand-factory.bin
|
||||
|
||||
changed to nand-factory.img
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
feeds/ipq807x/ipq807x/image/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/feeds/ipq807x/ipq807x/image/Makefile b/feeds/ipq807x/ipq807x/image/Makefile
|
||||
index 3a219e6d..49c6cc5a 100644
|
||||
--- a/feeds/ipq807x/ipq807x/image/Makefile
|
||||
+++ b/feeds/ipq807x/ipq807x/image/Makefile
|
||||
@@ -13,9 +13,9 @@ define Device/Default
|
||||
ROOTFSNAME_IN_UBI := ubi_rootfs
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
- IMAGES := sysupgrade.tar nand-factory.bin
|
||||
+ IMAGES := sysupgrade.tar nand-factory.img
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||
- IMAGE/nand-factory.bin := append-ubi | qsdk-ipq-factory-nand
|
||||
+ IMAGE/nand-factory.img := append-ubi | qsdk-ipq-factory-nand
|
||||
KERNEL_NAME := Image
|
||||
KERNEL = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||
KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
From e0e1d9be02a977a6dfbdc63236051dc99e2fcd61 Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 11:09:43 +0800
|
||||
Subject: [PATCH] wifi-ax: add kmod-hwmon-core dependent for ath11k
|
||||
|
||||
If kmod-hwmon-core was selected, the kmod-ath11k depend kmod-hwmon-core.
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
feeds/wifi-ax/mac80211/ath.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/feeds/wifi-ax/mac80211/ath.mk b/feeds/wifi-ax/mac80211/ath.mk
|
||||
index 9b2b8270..13ce880e 100644
|
||||
--- a/feeds/wifi-ax/mac80211/ath.mk
|
||||
+++ b/feeds/wifi-ax/mac80211/ath.mk
|
||||
@@ -284,7 +284,7 @@ define KernelPackage/ath11k
|
||||
TITLE:=Atheros 802.11ax wireless cards support
|
||||
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath11k
|
||||
DEPENDS+= @TARGET_ipq807x +kmod-ath +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +@DRIVER_11W_SUPPORT \
|
||||
- +@DRIVER_11AX_SUPPORT +kmod-qca-nss-drv
|
||||
+ +@DRIVER_11AX_SUPPORT +kmod-qca-nss-drv +kmod-hwmon-core
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath11k/ath11k.ko
|
||||
endef
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
From 1106a7e2eb083eccc65da1102652cdc733d5379b Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 11:28:29 +0800
|
||||
Subject: [PATCH] ipq807x: fix gl-ax1800 switch button high active level
|
||||
|
||||
The active status of the switch button in the DTS configuration
|
||||
is the opposite of that marked on the product housing.
|
||||
|
||||
The switch button should be activated at high GPIO level.
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
.../files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
|
||||
index f8d44187..3ec66b9b 100644
|
||||
--- a/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
|
||||
+++ b/feeds/ipq807x/ipq807x/files/arch/arm64/boot/dts/qcom/qcom-ipq6018-gl-ax1800.dtsi
|
||||
@@ -276,7 +276,7 @@
|
||||
switch {
|
||||
label = "switch";
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
- gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
|
||||
+ gpios = <&tlmm 9 GPIO_ACTIVE_HIGH>;
|
||||
linux,input-type = <1>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
From dc09e9c1c940b6b9d567072d427894b8ec47639e Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 15:28:13 +0800
|
||||
Subject: [PATCH] ipq807x: use append-metadata-gl for gl-ax1800/gl-axt1800
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
feeds/ipq807x/ipq807x/image/ipq60xx.mk | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/feeds/ipq807x/ipq807x/image/ipq60xx.mk b/feeds/ipq807x/ipq807x/image/ipq60xx.mk
|
||||
index 9b31098b..f9ebf382 100644
|
||||
--- a/feeds/ipq807x/ipq807x/image/ipq60xx.mk
|
||||
+++ b/feeds/ipq807x/ipq807x/image/ipq60xx.mk
|
||||
@@ -60,6 +60,7 @@ define Device/glinet_ax1800
|
||||
SUPPORTED_DEVICES := glinet,ax1800
|
||||
DEVICE_DTS_CONFIG := config@cp03-c1
|
||||
DEVICE_PACKAGES := ath11k-wifi-gl-ax1800 -kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3
|
||||
+ IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata-gl
|
||||
endef
|
||||
TARGET_DEVICES += glinet_ax1800
|
||||
|
||||
@@ -69,6 +70,7 @@ define Device/glinet_axt1800
|
||||
SUPPORTED_DEVICES := glinet,axt1800
|
||||
DEVICE_DTS_CONFIG := config@cp03-c1
|
||||
DEVICE_PACKAGES := ath11k-wifi-gl-ax1800 -kmod-usb-dwc3-of-simple kmod-usb-dwc3-qcom kmod-usb3
|
||||
+ IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata-gl
|
||||
endef
|
||||
TARGET_DEVICES += glinet_axt1800
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,322 @@
|
||||
From 6e942fcf534e44b0d864c411a9086b4b45e04d0a Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 15:51:14 +0800
|
||||
Subject: [PATCH] ipq807x: add modem support for gl.inet
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
.../112-add-modem-support-for-gl.patch | 302 ++++++++++++++++++
|
||||
1 file changed, 302 insertions(+)
|
||||
create mode 100644 feeds/ipq807x/ipq807x/patches/112-add-modem-support-for-gl.patch
|
||||
|
||||
diff --git a/feeds/ipq807x/ipq807x/patches/112-add-modem-support-for-gl.patch b/feeds/ipq807x/ipq807x/patches/112-add-modem-support-for-gl.patch
|
||||
new file mode 100644
|
||||
index 00000000..49c2b852
|
||||
--- /dev/null
|
||||
+++ b/feeds/ipq807x/ipq807x/patches/112-add-modem-support-for-gl.patch
|
||||
@@ -0,0 +1,302 @@
|
||||
+Index: linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/net/usb/qmi_wwan.c
|
||||
+===================================================================
|
||||
+--- linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac.orig/drivers/net/usb/qmi_wwan.c
|
||||
++++ linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/net/usb/qmi_wwan.c
|
||||
+@@ -507,6 +507,24 @@ static const u8 default_modem_addr[ETH_A
|
||||
+
|
||||
+ static const u8 buggy_fw_addr[ETH_ALEN] = {0x00, 0xa0, 0xc6, 0x00, 0x00, 0x00};
|
||||
+
|
||||
++#if 1 //Added by Quectel
|
||||
++#include <linux/etherdevice.h>
|
||||
++struct sk_buff *qmi_wwan_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags)
|
||||
++{
|
||||
++ if (dev->udev->descriptor.idVendor != cpu_to_le16(0x2C7C))
|
||||
++ return skb;
|
||||
++ // Skip Ethernet header from message
|
||||
++ if (skb_pull(skb, ETH_HLEN)) {
|
||||
++ return skb;
|
||||
++ } else {
|
||||
++ dev_err(&dev->intf->dev, "Packet Dropped ");
|
||||
++ }
|
||||
++ // Filter the packet out, release it
|
||||
++ dev_kfree_skb_any(skb);
|
||||
++ return NULL;
|
||||
++}
|
||||
++#endif
|
||||
++
|
||||
+ /* Make up an ethernet header if the packet doesn't have one.
|
||||
+ *
|
||||
+ * A firmware bug common among several devices cause them to send raw
|
||||
+@@ -801,6 +819,20 @@ static int qmi_wwan_bind(struct usbnet *
|
||||
+ }
|
||||
+ dev->net->netdev_ops = &qmi_wwan_netdev_ops;
|
||||
+ dev->net->sysfs_groups[0] = &qmi_wwan_sysfs_attr_group;
|
||||
++#if 1 //Added by Quectel
|
||||
++ if (dev->udev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
|
||||
++ dev_info(&intf->dev, "QuectelEC25&EC21&EG91&EG95&EG06&EP06&EM06&BG96&AG35 work on RawIP mode\n");
|
||||
++ dev->net->flags |= IFF_NOARP;
|
||||
++ usb_control_msg(
|
||||
++ interface_to_usbdev(intf),
|
||||
++ usb_sndctrlpipe(interface_to_usbdev(intf), 0),
|
||||
++ 0x22, //USB_CDC_REQ_SET_CONTROL_LINE_STATE
|
||||
++ 0x21, //USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE
|
||||
++ 1, //active CDC DTR
|
||||
++ intf->cur_altsetting->desc.bInterfaceNumber,
|
||||
++ NULL, 0, 100);
|
||||
++ }
|
||||
++#endif
|
||||
+ err:
|
||||
+ return status;
|
||||
+ }
|
||||
+@@ -891,7 +923,10 @@ static const struct driver_info qmi_wwan
|
||||
+ .bind = qmi_wwan_bind,
|
||||
+ .unbind = qmi_wwan_unbind,
|
||||
+ .manage_power = qmi_wwan_manage_power,
|
||||
+- .rx_fixup = qmi_wwan_rx_fixup,
|
||||
++ #if 1 //Added by Quectel
|
||||
++ .tx_fixup = qmi_wwan_tx_fixup,
|
||||
++ .rx_fixup = qmi_wwan_rx_fixup,
|
||||
++ #endif
|
||||
+ };
|
||||
+
|
||||
+ static const struct driver_info qmi_wwan_info_quirk_dtr = {
|
||||
+@@ -938,6 +973,17 @@ static const struct driver_info qmi_wwan
|
||||
+ .driver_info = (unsigned long)&qmi_wwan_info_quirk_dtr
|
||||
+
|
||||
+ static const struct usb_device_id products[] = {
|
||||
++#if 1 //Added by Quectel
|
||||
++ { QMI_FIXED_INTF(0x05C6, 0x9003, 4) }, /* Quectel UC20 */
|
||||
++ { QMI_FIXED_INTF(0x2C7C, 0x0125, 4) }, /* Quectel EC25 */
|
||||
++ { QMI_FIXED_INTF(0x2C7C, 0x0121, 4) }, /* Quectel EC21 */
|
||||
++ { QMI_FIXED_INTF(0x05C6, 0x9215, 4) }, /* Quectel EC20 */
|
||||
++ { QMI_FIXED_INTF(0x2C7C, 0x0191, 4) }, /* Quectel EG91 */
|
||||
++ { QMI_FIXED_INTF(0x2C7C, 0x0195, 4) }, /* Quectel EG95 */
|
||||
++ { QMI_FIXED_INTF(0x2C7C, 0x0306, 4) }, /* Quectel EG06/EP06/EM06 */
|
||||
++ { QMI_FIXED_INTF(0x2C7C, 0x0296, 4) }, /* Quectel BG96 */
|
||||
++ { QMI_FIXED_INTF(0x2C7C, 0x0435, 4) }, /* Quectel AG35 */
|
||||
++#endif
|
||||
+ /* 1. CDC ECM like devices match on the control interface */
|
||||
+ { /* Huawei E392, E398 and possibly others sharing both device id and more... */
|
||||
+ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 9),
|
||||
+@@ -1396,7 +1442,6 @@ static const struct usb_device_id produc
|
||||
+ {QMI_GOBI_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
|
||||
+ {QMI_GOBI_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */
|
||||
+ {QMI_GOBI_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
|
||||
+- {QMI_GOBI_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
|
||||
+ {QMI_FIXED_INTF(0x05c6, 0x9215, 4)}, /* Quectel EC20 Mini PCIe */
|
||||
+ {QMI_GOBI_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
|
||||
+ {QMI_GOBI_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */
|
||||
+Index: linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/usb/serial/option.c
|
||||
+===================================================================
|
||||
+--- linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac.orig/drivers/usb/serial/option.c
|
||||
++++ linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/usb/serial/option.c
|
||||
+@@ -565,6 +565,23 @@ static void option_instat_callback(struc
|
||||
+ #define WETELECOM_PRODUCT_6802 0x6802
|
||||
+ #define WETELECOM_PRODUCT_WMD300 0x6803
|
||||
+
|
||||
++#define LONGSUNG_PRODUCT_U9300C 0x9b3c
|
||||
++
|
||||
++/* FORGE PRODUCT */
|
||||
++#define FORGE_VENDOR_ID 0x05c6
|
||||
++
|
||||
++#define FORGE_PRODUCT_SLM750 0xf601
|
||||
++
|
||||
++/* NODECOM PRODUCT */
|
||||
++#define NODECOM_VENDOR_ID 0x1508
|
||||
++
|
||||
++#define NODECOM_PRODUCT_NL660 0x1001
|
||||
++
|
||||
++/* NEOWAY PRODUCT */
|
||||
++#define NEOWAY_VENDOR_ID 0x2949
|
||||
++
|
||||
++#define NEOWAY_PRODUCT_N720 0x8243
|
||||
++
|
||||
+
|
||||
+ /* Device flags */
|
||||
+
|
||||
+@@ -585,6 +602,28 @@ static void option_instat_callback(struc
|
||||
+
|
||||
+
|
||||
+ static const struct usb_device_id option_ids[] = {
|
||||
++#if 1 //Added by Quectel
|
||||
++ { USB_DEVICE(0x05C6, 0x9090) }, /* Quectel UC15 */
|
||||
++ { USB_DEVICE(0x05C6, 0x9003) }, /* Quectel UC20 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0125) }, /* Quectel EC25 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0121) }, /* Quectel EC21 */
|
||||
++ { USB_DEVICE(0x05C6, 0x9215) }, /* Quectel EC20 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0191) }, /* Quectel EG91 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0195) }, /* Quectel EG95 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0306) }, /* Quectel EG06/EP06/EM06 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0700) }, /* Quectel BG95 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0296) }, /* Quectel BG96 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x0435) }, /* Quectel AG35 */
|
||||
++ { USB_DEVICE(0x2C7C, 0x6026) }, /* Quectel EC200t */
|
||||
++#endif
|
||||
++ { USB_DEVICE(0x19d2, 0x0536) },/* MZ386 */
|
||||
++ { USB_DEVICE(0x19d2, 0x0117) },
|
||||
++ { USB_DEVICE(0x19d2, 0x0199) },
|
||||
++ { USB_DEVICE(0x19d2, 0x1476) },
|
||||
++ { USB_DEVICE(LONGCHEER_VENDOR_ID, LONGSUNG_PRODUCT_U9300C) },
|
||||
++ { USB_DEVICE(FORGE_VENDOR_ID, FORGE_PRODUCT_SLM750) },
|
||||
++ { USB_DEVICE(NODECOM_VENDOR_ID, NODECOM_PRODUCT_NL660) },
|
||||
++ { USB_DEVICE(NEOWAY_VENDOR_ID, NEOWAY_PRODUCT_N720) },
|
||||
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },
|
||||
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
|
||||
+ { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA_LIGHT) },
|
||||
+@@ -2138,6 +2177,9 @@ static struct usb_serial_driver option_1
|
||||
+ #ifdef CONFIG_PM
|
||||
+ .suspend = usb_wwan_suspend,
|
||||
+ .resume = usb_wwan_resume,
|
||||
++#if 1 //Added by Quectel
|
||||
++ .reset_resume = usb_wwan_resume,
|
||||
++#endif
|
||||
+ #endif
|
||||
+ };
|
||||
+
|
||||
+@@ -2160,6 +2202,7 @@ static int option_probe(struct usb_seria
|
||||
+ {
|
||||
+ struct usb_interface_descriptor *iface_desc =
|
||||
+ &serial->interface->cur_altsetting->desc;
|
||||
++ struct usb_device_descriptor *dev_desc = &serial->dev->descriptor;
|
||||
+ unsigned long device_flags = id->driver_info;
|
||||
+
|
||||
+ /* Never bind to the CD-Rom emulation interface */
|
||||
+@@ -2175,14 +2218,99 @@ static int option_probe(struct usb_seria
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ /*
|
||||
++ * Don't bind network interface on Samsung GT-B3730, it is handled by
|
||||
++ * a separate module.
|
||||
++ */
|
||||
++ if (dev_desc->idVendor == cpu_to_le16(SAMSUNG_VENDOR_ID) &&
|
||||
++ dev_desc->idProduct == cpu_to_le16(SAMSUNG_PRODUCT_GT_B3730) &&
|
||||
++ iface_desc->bInterfaceClass != USB_CLASS_CDC_DATA)
|
||||
++ return -ENODEV;
|
||||
++
|
||||
++ /*
|
||||
+ * Allow matching on bNumEndpoints for devices whose interface numbers
|
||||
+ * can change (e.g. Quectel EP06).
|
||||
+ */
|
||||
+ if (device_flags & NUMEP2 && iface_desc->bNumEndpoints != 2)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+- /* Store the device flags so we can use them during attach. */
|
||||
+- usb_set_serial_data(serial, (void *)device_flags);
|
||||
++#if 1 //Added by Quectel
|
||||
++ //Quectel UC20's interface 4 can be used as USB network device
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && \
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9003) \
|
||||
++ && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
|
||||
++ return -ENODEV;
|
||||
++ //Quectel EC20's interface 4 can be used as USB network device
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) && \
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9215) \
|
||||
++ && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
|
||||
++ return -ENODEV;
|
||||
++ //Quectel EC25&EC21&EG91&EG95&EG06&EP06&EM06&BG96/AG35's interface 4 can be used as USB netwo
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C) && \
|
||||
++ serial->dev->descriptor.idProduct != cpu_to_le16(0x6026) \
|
||||
++ && serial->interface->cur_altsetting->desc.bInterfaceNumber >= 4)
|
||||
++ return -ENODEV;
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C) && \
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x6026) \
|
||||
++ && serial->interface->cur_altsetting->desc.bInterfaceNumber<= 1)
|
||||
++ return -ENODEV;
|
||||
++#endif
|
||||
++#if 1 //Added by Quectel
|
||||
++ //For USB Auto Suspend
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9090)) {
|
||||
++ pm_runtime_set_autosuspend_delay(&serial->dev->dev, 3000);
|
||||
++ usb_enable_autosuspend(serial->dev);
|
||||
++ }
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9003)) {
|
||||
++ pm_runtime_set_autosuspend_delay(&serial->dev->dev, 3000);
|
||||
++ usb_enable_autosuspend(serial->dev);
|
||||
++ }
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9215)) {
|
||||
++ pm_runtime_set_autosuspend_delay(&serial->dev->dev, 3000);
|
||||
++ usb_set_serial_data(serial, (void *)device_flags);
|
||||
++ usb_enable_autosuspend(serial->dev);
|
||||
++ }
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
|
||||
++ pm_runtime_set_autosuspend_delay(&serial->dev->dev, 3000);
|
||||
++ usb_enable_autosuspend(serial->dev);
|
||||
++ }
|
||||
++#endif
|
||||
++#if 1 //Added by Quectel
|
||||
++ //For USB Remote Wakeup
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9090)) {
|
||||
++ device_init_wakeup(&serial->dev->dev, 1); //usb remote wakeup
|
||||
++ }
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9003)) {
|
||||
++ device_init_wakeup(&serial->dev->dev, 1); //usb remote wakeup
|
||||
++ }
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x05C6) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x9215)) {
|
||||
++ device_init_wakeup(&serial->dev->dev, 1); //usb remote wakeup
|
||||
++ }
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
|
||||
++ device_init_wakeup(&serial->dev->dev, 1); //usb remote wakeup
|
||||
++ }
|
||||
++#endif
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x19d2) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x1476) &&
|
||||
++ serial->interface->cur_altsetting->desc. bInterfaceNumber == 3)
|
||||
++ return -ENODEV;
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x19d2) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x1476) &&
|
||||
++ serial->interface->cur_altsetting->desc. bInterfaceNumber == 4)
|
||||
++ return -ENODEV;
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x19d2) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x1509) &&
|
||||
++ serial->interface->cur_altsetting->desc. bInterfaceNumber == 4)
|
||||
++ return -ENODEV;
|
||||
++ if (serial->dev->descriptor.idVendor == cpu_to_le16(0x19d2) &&
|
||||
++ serial->dev->descriptor.idProduct == cpu_to_le16(0x1509) &&
|
||||
++ serial->interface->cur_altsetting->desc. bInterfaceNumber == 5)
|
||||
++ return -ENODEV;
|
||||
+
|
||||
+ return 0;
|
||||
+ }
|
||||
+Index: linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/usb/serial/qcserial.c
|
||||
+===================================================================
|
||||
+--- linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac.orig/drivers/usb/serial/qcserial.c
|
||||
++++ linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/usb/serial/qcserial.c
|
||||
+@@ -88,7 +88,6 @@ static const struct usb_device_id id_tab
|
||||
+ {USB_DEVICE(0x03f0, 0x241d)}, /* HP Gobi 2000 QDL device (VP412) */
|
||||
+ {USB_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
|
||||
+ {USB_DEVICE(0x05c6, 0x9214)}, /* Acer Gobi 2000 QDL device (VP413) */
|
||||
+- {USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
|
||||
+ {USB_DEVICE(0x05c6, 0x9264)}, /* Asus Gobi 2000 QDL device (VR305) */
|
||||
+ {USB_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
|
||||
+ {USB_DEVICE(0x05c6, 0x9234)}, /* Top Global Gobi 2000 QDL device (VR306) */
|
||||
+Index: linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/usb/serial/usb_wwan.c
|
||||
+===================================================================
|
||||
+--- linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac.orig/drivers/usb/serial/usb_wwan.c
|
||||
++++ linux-5.4.164-qsdk-d5fcb18e5420670c8734c6a659873e73adab6dac/drivers/usb/serial/usb_wwan.c
|
||||
+@@ -477,6 +477,20 @@ static struct urb *usb_wwan_setup_urb(st
|
||||
+ usb_sndbulkpipe(serial->dev, endpoint) | dir,
|
||||
+ buf, len, callback, ctx);
|
||||
+
|
||||
++#if 1 //Added by Quectel for zero packet
|
||||
++ if (dir == USB_DIR_OUT) {
|
||||
++ struct usb_device_descriptor *desc = &serial->dev->descriptor;
|
||||
++ if (desc->idVendor == cpu_to_le16(0x05C6) && desc->idProduct == cpu_to_le16(0x9090))
|
||||
++ urb->transfer_flags |= URB_ZERO_PACKET;
|
||||
++ if (desc->idVendor == cpu_to_le16(0x05C6) && desc->idProduct == cpu_to_le16(0x9003))
|
||||
++ urb->transfer_flags |= URB_ZERO_PACKET;
|
||||
++ if (desc->idVendor == cpu_to_le16(0x05C6) && desc->idProduct == cpu_to_le16(0x9215))
|
||||
++ urb->transfer_flags |= URB_ZERO_PACKET;
|
||||
++ if (desc->idVendor == cpu_to_le16(0x2C7C))
|
||||
++ urb->transfer_flags |= URB_ZERO_PACKET;
|
||||
++ }
|
||||
++#endif
|
||||
++
|
||||
+ if (intfdata->use_zlp && dir == USB_DIR_OUT)
|
||||
+ urb->transfer_flags |= URB_ZERO_PACKET;
|
||||
+
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
From 4c1b9378066d5a282a7400700ef78c57b7b97b0d Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 11:35:49 +0800
|
||||
Subject: [PATCH 1/3] Revert "base-files: set default password to "openwifi""
|
||||
|
||||
This reverts commit 8e295968e1d2ec33259f75e74e2d4bf14e0c334a.
|
||||
---
|
||||
package/base-files/files/bin/config_generate | 2 +-
|
||||
package/base-files/files/etc/shadow | 2 +-
|
||||
package/base-files/files/usr/libexec/login.sh | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/package/base-files/files/bin/config_generate b/package/base-files/files/bin/config_generate
|
||||
index 30e7c119f7..596fcf41fa 100755
|
||||
--- a/package/base-files/files/bin/config_generate
|
||||
+++ b/package/base-files/files/bin/config_generate
|
||||
@@ -303,7 +303,7 @@ generate_static_system() {
|
||||
add system system
|
||||
set system.@system[-1].hostname='OpenWrt'
|
||||
set system.@system[-1].timezone='UTC'
|
||||
- set system.@system[-1].ttylogin='1'
|
||||
+ set system.@system[-1].ttylogin='0'
|
||||
set system.@system[-1].log_size='64'
|
||||
set system.@system[-1].urandom_seed='0'
|
||||
|
||||
diff --git a/package/base-files/files/etc/shadow b/package/base-files/files/etc/shadow
|
||||
index 5b3f32ce64..4b4154f21f 100644
|
||||
--- a/package/base-files/files/etc/shadow
|
||||
+++ b/package/base-files/files/etc/shadow
|
||||
@@ -1,4 +1,4 @@
|
||||
-root:$1$Ev771IIe$RHpqhCLW3U6c5tg9MrkQD/:18473:0:99999:7:::
|
||||
+root::0:0:99999:7:::
|
||||
daemon:*:0:0:99999:7:::
|
||||
ftp:*:0:0:99999:7:::
|
||||
network:*:0:0:99999:7:::
|
||||
diff --git a/package/base-files/files/usr/libexec/login.sh b/package/base-files/files/usr/libexec/login.sh
|
||||
index 2e8dbc0d90..1fff39c6a0 100755
|
||||
--- a/package/base-files/files/usr/libexec/login.sh
|
||||
+++ b/package/base-files/files/usr/libexec/login.sh
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
-[ "$(uci -q get system.@system[0].ttylogin)" = 0 ] && exec /bin/ash --login
|
||||
+[ "$(uci -q get system.@system[0].ttylogin)" = 1 ] || exec /bin/ash --login
|
||||
|
||||
exec /bin/login
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From 173140db64fdc371962d0802b359b462d54e37e9 Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 11:36:43 +0800
|
||||
Subject: [PATCH 2/3] Revert "base-files: ignore sysupgrade that was not ours"
|
||||
|
||||
This reverts commit a222d4943e328cd6c8929bee4bb0712c66e2ee42.
|
||||
---
|
||||
package/base-files/files/lib/preinit/80_mount_root | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git a/package/base-files/files/lib/preinit/80_mount_root b/package/base-files/files/lib/preinit/80_mount_root
|
||||
index 7cf16e68e0..3f75411a43 100644
|
||||
--- a/package/base-files/files/lib/preinit/80_mount_root
|
||||
+++ b/package/base-files/files/lib/preinit/80_mount_root
|
||||
@@ -17,8 +17,7 @@ missing_lines() {
|
||||
do_mount_root() {
|
||||
mount_root
|
||||
boot_run_hook preinit_mount_root
|
||||
- (tar tf /sysupgrade.tgz | grep ucentral) 2> /dev/null
|
||||
- [ $? -eq 0 ] && {
|
||||
+ [ -f /sysupgrade.tgz ] && {
|
||||
echo "- config restore -"
|
||||
cp /etc/passwd /etc/group /etc/shadow /tmp
|
||||
cd /
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,62 @@
|
||||
From e5f0506332d157189a0ff42f7fe6b6b64e7d121e Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 11:54:35 +0800
|
||||
Subject: [PATCH 3/3] gen_config: add version info
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
scripts/gen_config.py | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/scripts/gen_config.py b/scripts/gen_config.py
|
||||
index 01c3f4050d..ec273446fe 100755
|
||||
--- a/scripts/gen_config.py
|
||||
+++ b/scripts/gen_config.py
|
||||
@@ -4,6 +4,8 @@ from os import getenv
|
||||
from pathlib import Path
|
||||
from shutil import rmtree, which
|
||||
from subprocess import run
|
||||
+from subprocess import call
|
||||
+import time
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
@@ -61,6 +63,27 @@ def process_host_dependency(dependecy: dict, profile: dict):
|
||||
else:
|
||||
die("Can't continue without dependency and no `fallback_diffconfig` set")
|
||||
|
||||
+def load_metadata():
|
||||
+ try:
|
||||
+ with open("gl_metadata.yaml", "r") as stream:
|
||||
+ metadata=yaml.safe_load(stream)
|
||||
+ version = metadata["version"]
|
||||
+ call("echo %s > %s" % (version, "files/etc/glversion"), shell=True)
|
||||
+ call("echo %s > %s" % (version, "release"), shell=True)
|
||||
+ version_type = metadata["type"]
|
||||
+ call("echo %s > %s" % (version_type, "files/etc/version.type"), shell=True)
|
||||
+ print("firmware version: " +version)
|
||||
+ print("firmware type: " +version_type)
|
||||
+ except:
|
||||
+ pass
|
||||
+
|
||||
+def generate_files(profile):
|
||||
+ if run(["mkdir", "-p", "files/etc"]).returncode:
|
||||
+ die(f"Error create files")
|
||||
+
|
||||
+ compile_time = time.strftime('%Y-%m-%d %k:%M:%S', time.localtime(time.time()))
|
||||
+ call("echo %s > %s" % (compile_time, "files/etc/version.date"), shell=True)
|
||||
+ load_metadata()
|
||||
|
||||
def load_yaml(fname: str, profile: dict, include=True):
|
||||
profile_file = (profile_folder / fname).with_suffix(".yml")
|
||||
@@ -225,6 +248,7 @@ if __name__ == "__main__":
|
||||
clean_tree()
|
||||
setup_feeds(profile)
|
||||
generate_config(profile)
|
||||
+ generate_files(profile)
|
||||
run(["rm", "-rf", "tmp/"])
|
||||
print("Running make defconfig")
|
||||
if run(["make", "defconfig"]).returncode:
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
From 41003199b7a78b54ffb441fb04f2fba00a136232 Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Mon, 23 May 2022 17:57:53 +0800
|
||||
Subject: [PATCH] gpio-button-hotplug: notify with label
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
index 9575c6245b..db50ddf198 100644
|
||||
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
|
||||
@@ -286,7 +286,7 @@ static void gpio_keys_handle_button(struct gpio_keys_button_data *bdata)
|
||||
if (bdata->seen == 0)
|
||||
bdata->seen = seen;
|
||||
|
||||
- button_hotplug_create_event(button_map[bdata->map_entry].name, type,
|
||||
+ button_hotplug_create_event(bdata->b->desc ? bdata->b->desc : button_map[bdata->map_entry].name, type,
|
||||
(seen - bdata->seen) / HZ, state);
|
||||
bdata->seen = seen;
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
From 15429c752e2e68cc633936a2f08dc8881fcae991 Mon Sep 17 00:00:00 2001
|
||||
From: Dongming Han <handongming@gl-inet.com>
|
||||
Date: Wed, 9 Feb 2022 20:50:24 +0800
|
||||
Subject: [PATCH] ipq: factory image uboot web compatibility
|
||||
|
||||
Signed-off-by: Dongming Han <handongming@gl-inet.com>
|
||||
---
|
||||
scripts/mkits-qsdk-ipq-image.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/mkits-qsdk-ipq-image.sh b/scripts/mkits-qsdk-ipq-image.sh
|
||||
index 87890cc43c..959200d0ae 100755
|
||||
--- a/scripts/mkits-qsdk-ipq-image.sh
|
||||
+++ b/scripts/mkits-qsdk-ipq-image.sh
|
||||
@@ -30,7 +30,7 @@ echo "\
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
- description = \"OpenWrt factory image\";
|
||||
+ description = \"Flashing factory image\";
|
||||
#address-cells = <1>;
|
||||
|
||||
images {" > ${OUTPUT}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
33
patches-wlan-ap-5.4/openwrt/0006-fix-bridge-isolate.patch
Normal file
33
patches-wlan-ap-5.4/openwrt/0006-fix-bridge-isolate.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 16e53377e20c9d0c7110d872e7dd30c8b24854d9 Mon Sep 17 00:00:00 2001
|
||||
From: gl-luochongjun <luochongjun@gl-inet.com>
|
||||
Date: Mon, 14 Feb 2022 17:40:17 +0800
|
||||
Subject: [PATCH] fix bridge isolate
|
||||
|
||||
---
|
||||
.../files/etc/uci-defaults/14_fix_bridge_isolate | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
create mode 100644 package/base-files/files/etc/uci-defaults/14_fix_bridge_isolate
|
||||
|
||||
diff --git a/package/base-files/files/etc/uci-defaults/14_fix_bridge_isolate b/package/base-files/files/etc/uci-defaults/14_fix_bridge_isolate
|
||||
new file mode 100644
|
||||
index 0000000000..46c8e678a0
|
||||
--- /dev/null
|
||||
+++ b/package/base-files/files/etc/uci-defaults/14_fix_bridge_isolate
|
||||
@@ -0,0 +1,14 @@
|
||||
+#!/bin/sh
|
||||
+
|
||||
+. /lib/functions.sh
|
||||
+board=$(board_name)
|
||||
+
|
||||
+case "$board" in
|
||||
+ glinet,axt1800|\
|
||||
+ glinet,ax1800)
|
||||
+ uci set network.@device[0].multicast_to_unicast='0'
|
||||
+ uci commit network
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
+
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
From ca34635e983199ede4772771669e3347a8a65187 Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 12:17:49 +0800
|
||||
Subject: [PATCH] kernel: fix build fail for bridge
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
package/kernel/linux/modules/netfilter.mk | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk
|
||||
index e2bb1d0681..afd421e4c9 100644
|
||||
--- a/package/kernel/linux/modules/netfilter.mk
|
||||
+++ b/package/kernel/linux/modules/netfilter.mk
|
||||
@@ -859,7 +859,7 @@ define KernelPackage/br-netfilter
|
||||
TITLE:=Bridge netfilter support modules
|
||||
DEPENDS:=+kmod-ipt-core
|
||||
FILES:=$(LINUX_DIR)/net/bridge/br_netfilter.ko
|
||||
- KCONFIG:=CONFIG_BRIDGE_NETFILTER
|
||||
+ KCONFIG:=CONFIG_BRIDGE_NETFILTER=y
|
||||
AUTOLOAD:=$(call AutoProbe,br_netfilter)
|
||||
endef
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
From ede8f26f870da9813b1d12478644f4ae20324eaa Mon Sep 17 00:00:00 2001
|
||||
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
Date: Tue, 24 May 2022 15:24:54 +0800
|
||||
Subject: [PATCH] image: add append-metadata-gl support
|
||||
|
||||
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
|
||||
---
|
||||
include/image-commands.mk | 32 ++++++++++++++++++++++++++++++++
|
||||
1 file changed, 32 insertions(+)
|
||||
|
||||
diff --git a/include/image-commands.mk b/include/image-commands.mk
|
||||
index d4bce80e68..40e4662d44 100644
|
||||
--- a/include/image-commands.mk
|
||||
+++ b/include/image-commands.mk
|
||||
@@ -64,6 +64,38 @@ define Build/append-metadata
|
||||
}
|
||||
endef
|
||||
|
||||
+metadata_json_gl = \
|
||||
+ '{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
|
||||
+ "metadata_version": "1.1", \
|
||||
+ "compat_version": "$(call json_quote,$(compat_version))", \
|
||||
+ $(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
|
||||
+ $(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
|
||||
+ [$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma) \
|
||||
+ "supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
|
||||
+ $(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_DEVICES))]$(comma)) \
|
||||
+ "version": { \
|
||||
+ "release": "$(shell cat $(TOPDIR)/release)", \
|
||||
+ "date": "$(shell TZ='Asia/Chongqing' date '+%Y%m%d%H%M%S')", \
|
||||
+ "dist": "$(call json_quote,$(VERSION_DIST))", \
|
||||
+ "version": "$(call json_quote,$(VERSION_NUMBER))", \
|
||||
+ "revision": "$(call json_quote,$(REVISION))", \
|
||||
+ "target": "$(call json_quote,$(TARGETID))", \
|
||||
+ "board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
|
||||
+ }, \
|
||||
+ "upgrade_control":"$(shell python3 $(TOPDIR)/make_gl_metadata.py)", \
|
||||
+ "release_note":"$(shell sed ':a;N;s/\n/\\n/g;s/\r/\\r/g;ta' $(TOPDIR)/gl_release_note)" \
|
||||
+ }'
|
||||
+
|
||||
+define Build/append-metadata-gl
|
||||
+ $(if $(SUPPORTED_DEVICES),-echo $(call metadata_json_gl) | fwtool -I - $@)
|
||||
+ [ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
|
||||
+ cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
|
||||
+ usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
|
||||
+ ucert -A -c "$@.ucert" -x "$@.sig" ;\
|
||||
+ fwtool -S "$@.ucert" "$@" ;\
|
||||
+ }
|
||||
+endef
|
||||
+
|
||||
define Build/append-rootfs
|
||||
dd if=$(IMAGE_ROOTFS) >> $@
|
||||
endef
|
||||
--
|
||||
2.25.1
|
||||
|
||||
6
profiles/target_wlan_ap-gl-ax1800-5-4.yml
Normal file
6
profiles/target_wlan_ap-gl-ax1800-5-4.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
profile: glinet_ax1800
|
||||
description: Build image for the GL.iNET AX1800
|
||||
image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-glinet_ax1800-squashfs-sysupgrade.tar
|
||||
include:
|
||||
- target_wlan_ap-gl-ax1800-common-5-4
|
||||
21
profiles/target_wlan_ap-gl-ax1800-common-5-4.yml
Normal file
21
profiles/target_wlan_ap-gl-ax1800-common-5-4.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
target: ipq807x
|
||||
subtarget: ipq60xx
|
||||
feeds:
|
||||
- name: ipq807x
|
||||
path: ../../feeds/ipq807x
|
||||
- name: gl_feeds
|
||||
uri: https://github.com/gl-inet/gl-feeds.git
|
||||
revision: c272de41d69a73a44ed9ddb6105a3b869a7bcf41
|
||||
- name: luci
|
||||
uri: https://github.com/openwrt/luci.git
|
||||
revision: 1c3b32dc1bec15e3076a447762b1c4f94eb75fb7
|
||||
|
||||
include:
|
||||
- wifi-ax
|
||||
|
||||
packages:
|
||||
- wget-ssl
|
||||
|
||||
diffconfig: |
|
||||
CONFIG_KERNEL_IPQ_MEM_PROFILE=0
|
||||
9
profiles/target_wlan_ap-gl-axt1800-5-4.yml
Normal file
9
profiles/target_wlan_ap-gl-axt1800-5-4.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
profile: glinet_axt1800
|
||||
description: Build image for the GL.iNET AXT1800
|
||||
image: bin/targets/ipq807x/ipq60xx/openwrt-ipq807x-glinet_axt1800-squashfs-sysupgrade.tar
|
||||
include:
|
||||
- target_wlan_ap-gl-ax1800-common-5-4
|
||||
|
||||
packages:
|
||||
- kmod-hwmon-pwmfan
|
||||
5
setup.py
5
setup.py
@ -72,8 +72,9 @@ def wlan_ap_reset_tree():
|
||||
run(["rm", "-rf", "openwrt"])
|
||||
run(["git", "checkout", config["branch"]], check=True)
|
||||
run(["git", "reset", "--hard", config.get("revision", config["branch"])], check=True)
|
||||
run(["rm", "backports/0021-build-create-APK-files-parrallel-to-IPK.patch"], check=True)
|
||||
run(["rm", "backports/0025-apk-backport-package.patch"], check=True)
|
||||
if not config["next"]:
|
||||
run(["rm", "backports/0021-build-create-APK-files-parrallel-to-IPK.patch"], check=True)
|
||||
run(["rm", "backports/0025-apk-backport-package.patch"], check=True)
|
||||
run(["./setup.py", "--setup"])
|
||||
|
||||
def reset_tree():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user