From 673a352ca1b3f00a7f8f16aa86e8b047b714fb57 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 4 Jul 2026 19:06:12 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=B8=20Sync=202026-07-04=2019:06:12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daed-next/Makefile | 137 ------------------ daed-next/files/daed-next.config | 8 - daed-next/files/daed-next.init | 59 -------- luci-app-daed-next/Makefile | 18 --- .../luasrc/controller/daed-next.lua | 36 ----- .../luasrc/model/cbi/daed-next/basic.lua | 76 ---------- .../luasrc/model/cbi/daed-next/log.lua | 5 - .../luasrc/view/daed-next/daed-next_error.htm | 6 - .../luasrc/view/daed-next/daed-next_log.htm | 33 ----- .../view/daed-next/daed-next_status.htm | 46 ------ .../luasrc/view/daed-next/dashboard.htm | 27 ---- luci-app-daed-next/po/zh-cn | 1 - luci-app-daed-next/po/zh_Hans/daed-next.po | 86 ----------- .../root/etc/daed-next/daed-next_sub.sh | 36 ----- .../root/etc/daed-next/dashboard.sh | 37 ----- .../root/etc/init.d/luci_daed-next | 48 ------ .../root/etc/uci-defaults/luci-daed-next | 5 - .../share/rpcd/acl.d/luci-app-daed-next.json | 11 -- quectel_MHI/Makefile | 2 +- vmlinux-btf/Makefile | 125 ++++++++++++++++ 20 files changed, 126 insertions(+), 676 deletions(-) delete mode 100644 daed-next/Makefile delete mode 100644 daed-next/files/daed-next.config delete mode 100755 daed-next/files/daed-next.init delete mode 100644 luci-app-daed-next/Makefile delete mode 100644 luci-app-daed-next/luasrc/controller/daed-next.lua delete mode 100644 luci-app-daed-next/luasrc/model/cbi/daed-next/basic.lua delete mode 100644 luci-app-daed-next/luasrc/model/cbi/daed-next/log.lua delete mode 100644 luci-app-daed-next/luasrc/view/daed-next/daed-next_error.htm delete mode 100644 luci-app-daed-next/luasrc/view/daed-next/daed-next_log.htm delete mode 100644 luci-app-daed-next/luasrc/view/daed-next/daed-next_status.htm delete mode 100644 luci-app-daed-next/luasrc/view/daed-next/dashboard.htm delete mode 120000 luci-app-daed-next/po/zh-cn delete mode 100644 luci-app-daed-next/po/zh_Hans/daed-next.po delete mode 100755 luci-app-daed-next/root/etc/daed-next/daed-next_sub.sh delete mode 100755 luci-app-daed-next/root/etc/daed-next/dashboard.sh delete mode 100755 luci-app-daed-next/root/etc/init.d/luci_daed-next delete mode 100755 luci-app-daed-next/root/etc/uci-defaults/luci-daed-next delete mode 100644 luci-app-daed-next/root/usr/share/rpcd/acl.d/luci-app-daed-next.json mode change 100644 => 100755 quectel_MHI/Makefile create mode 100644 vmlinux-btf/Makefile diff --git a/daed-next/Makefile b/daed-next/Makefile deleted file mode 100644 index f73f43b2..00000000 --- a/daed-next/Makefile +++ /dev/null @@ -1,137 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Copyright (C) 2023 ImmortalWrt.org - -include $(TOPDIR)/rules.mk - -PKG_NAME:=daed-next -PKG_VERSION:=2023-12-02-102cb56 -CORE_VERSION:=core-$(shell date "+%Y-%m-%d") -PKG_RELEASE:=4 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=102cb562b6962b44c47f38092284d2ab2506a702 -PKG_SOURCE_URL:=https://github.com/daeuniverse/daed-revived-next.git -PKG_MIRROR_HASH:=skip - -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/wing -PKG_BUILD_DEPENDS:=golang/host bpf-headers -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 -PKG_BUILD_FLAGS:=no-mips16 - -GO_PKG:=github.com/daeuniverse/dae-wing -GO_PKG_LDFLAGS:= \ - -X '$(GO_PKG)/db.AppDescription=$(PKG_NAME) is a integration solution of dae, API and UI.' -GO_PKG_LDFLAGS_X:= \ - $(GO_PKG)/db.AppName=$(PKG_NAME) \ - $(GO_PKG)/db.AppVersion=$(PKG_VERSION)-$(CORE_VERSION) -GO_PKG_GCFLAGS:=-l=4 - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/bpf.mk -include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk - -define Package/daed-next/Default - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - URL:=https://github.com/daeuniverse/daed-revived-next -endef - -define Package/daed-next - $(call Package/daed-next/Default) - TITLE:=daed-next is a backend of dae - # You need enable KERNEL_DEBUG_INFO_BTF and KERNEL_BPF_EVENTS - DEPENDS:=$(GO_ARCH_DEPENDS) $(BPF_DEPENDS) \ - +ca-bundle +kmod-sched-core +kmod-sched-bpf +kmod-xdp-sockets-diag +kmod-veth \ - +node +v2ray-geoip +v2ray-geosite +zoneinfo-asia -endef - -define Package/daed-next/description - daed-next is a backend of dae, provides a method to bundle arbitrary - frontend, dae and geodata into one binary. -endef - -define Package/daed-next/conffiles -/etc/daed-next/wing.db -/etc/config/daed-next -endef - -define Download/daed-next - URL:=https://github.com/QiuSimons/luci-app-daed-next/releases/download/daed-web-$(PKG_VERSION)/ - URL_FILE:=daed-web-$(PKG_VERSION).squashfs - FILE:=daed-web-$(PKG_VERSION).squashfs - HASH:=skip -endef - -define Build/Prepare - ( \ - $(TAR) --strip-components=1 -C $(PKG_BUILD_DIR)/../ -xzf $(DL_DIR)/$(PKG_NAME)-$(PKG_VERSION).tar.gz ; \ - rm -rf $(PKG_BUILD_DIR) && git clone https://github.com/daeuniverse/dae-wing $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/wing ; \ - rm -rf $(PKG_BUILD_DIR)/dae-core && git clone https://github.com/daeuniverse/dae $(PKG_BUILD_DIR)/dae-core ; \ - rm -rf $(PKG_BUILD_DIR)/dae-core/control/kern/headers && git clone https://github.com/daeuniverse/dae_bpf_headers $(PKG_BUILD_DIR)/dae-core/control/kern/headers ; \ - pushd $(PKG_BUILD_DIR)/dae-core ; \ - sed -i -e 's!default:"30s"!default:"600s"!g' -e 's!default:"HEAD"!default:"CONNECT"!g' -e 's!default:"dns.google.com:53,8.8.8.8,2001:4860:4860::8888"!default:"one.one.one.one:53,1.0.0.1,2606:4700:4700::1111"!g' -e 's!default:"http://cp.cloudflare.com,1.1.1.1,2606:4700:4700::1111"!default:"http://cp.cloudflare.com,1.0.0.1,2606:4700:4700::1111"!g' config/config.go ; \ - go get -u=patch ; \ - go mod tidy ; \ - popd ; \ - pushd $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/wing ; \ - wget -qO - https://github.com/daeuniverse/dae-wing/commit/ca0296173d36746335efed1923ff08c1300f7a61.patch | patch -p1 ; \ - go get -u=patch ; \ - go mod tidy ; \ - popd ; \ - ) -endef - -DAE_CFLAGS:= \ - -O2 -Wall -Werror \ - -DMAX_MATCH_SET_LEN=64 \ - -I$(BPF_HEADERS_DIR)/tools/lib \ - -I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic - -ifneq ($(CONFIG_USE_MUSL),) - TARGET_CFLAGS += -D_LARGEFILE64_SOURCE -endif - -define Build/Compile - ( \ - pushd $(PKG_BUILD_DIR) ; \ - $(MAKE) deps ; \ - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_VARS) \ - go generate ./... ; \ - cd dae-core ; \ - $(GO_GENERAL_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_CONFIG_VARS) \ - $(GO_PKG_BUILD_VARS) \ - BPF_CLANG="$(CLANG)" \ - BPF_STRIP_FLAG="-strip=$(LLVM_STRIP)" \ - BPF_CFLAGS="$(DAE_CFLAGS)" \ - BPF_TARGET="bpfel,bpfeb" \ - go generate control/control.go ; \ - popd ; \ - $(call GoPackage/Build/Compile) ; \ - ) -endef - -define Package/daed-next/install - $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dae-wing $(1)/usr/bin/dae-wing - - $(INSTALL_DIR) $(1)/usr/share/daed-next - $(INSTALL_DATA) $(DL_DIR)/daed-web-$(PKG_VERSION).squashfs $(1)/usr/share/daed-next/daed-web.squashfs - - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_CONF) $(CURDIR)/files/daed-next.config $(1)/etc/config/daed-next - - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) $(CURDIR)/files/daed-next.init $(1)/etc/init.d/daed-next -endef - -$(eval $(call Download,daed-next)) -$(eval $(call GoBinPackage,daed-next)) -$(eval $(call BuildPackage,daed-next)) diff --git a/daed-next/files/daed-next.config b/daed-next/files/daed-next.config deleted file mode 100644 index de287cd1..00000000 --- a/daed-next/files/daed-next.config +++ /dev/null @@ -1,8 +0,0 @@ - -config daed-next 'config' - option enabled '0' - option listen_port '3000' - option log_enabled '0' - option log_maxbackups '1' - option log_maxsize '1' - diff --git a/daed-next/files/daed-next.init b/daed-next/files/daed-next.init deleted file mode 100755 index 2212ec37..00000000 --- a/daed-next/files/daed-next.init +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=99 -USE_PROCD=1 -NODE_BIN=/usr/bin/node -WING_BIN=/usr/bin/dae-wing -WEB_SQUASHFS=/usr/share/daed-next/daed-web.squashfs -GEODATA=/usr/share/v2ray - -get_config() { - config_get_bool enabled $1 enabled "0" - config_get listen_port $1 listen_port "3000" - config_get log_enabled $1 log_enabled "0" - config_get log_maxbackups $1 log_maxbackups "1" - config_get log_maxsize $1 log_maxsize "1" -} - -start_service() { - config_load "daed-next" - config_foreach get_config "daed-next" - - [ "$enabled" -eq "1" ] || return 1 - [ "$log_enabled" -eq "1" ] && log_path="/var/log/daed-next/daed-next.log" || log_path="/dev/null" - mkdir -p /var/log/daed-next - true > /var/log/daed-next/daed-next.log - - # dae-wing - procd_open_instance dae-wing - procd_set_param env DAE_LOCATION_ASSET=$GEODATA - procd_set_param command $WING_BIN run - procd_append_param command --config "/etc/daed-next/" - procd_append_param command --logfile "$log_path" - procd_append_param command --logfile-maxbackups "$log_maxbackups" - procd_append_param command --logfile-maxsize "$log_maxsize" - procd_set_param limits core="unlimited" - procd_set_param limits nofile="1000000 1000000" - procd_set_param stdout 0 - procd_set_param stderr 0 - procd_set_param respawn 300 5 10 - procd_close_instance dae-wing -} - -service_triggers() { - procd_add_reload_trigger "daed-next" -} - -stop_service() { - sleep 2 - mount_points=$(mount | grep '/tmp/daed-next' | awk '{print $3}') - for mp in $mount_points; do - umount -l "$mp" || { echo "Failed to force unmount $mp"; } - done -} - -reload_service() { - stop - sleep 2 - start -} diff --git a/luci-app-daed-next/Makefile b/luci-app-daed-next/Makefile deleted file mode 100644 index 862db412..00000000 --- a/luci-app-daed-next/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (C) 2016 Openwrt.org -# -# This is free software, licensed under the Apache License, Version 2.0 . -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-app-daed-next -PKG_VERSION:=1.0.0 -PKG_RELEASE:=1 - -LUCI_TITLE:=LuCI support for daed-next -LUCI_PKGARCH:=all -LUCI_DEPENDS:=+daed-next +bash +luci-compat - -include $(TOPDIR)/feeds/luci/luci.mk - -# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-daed-next/luasrc/controller/daed-next.lua b/luci-app-daed-next/luasrc/controller/daed-next.lua deleted file mode 100644 index 5b3d3185..00000000 --- a/luci-app-daed-next/luasrc/controller/daed-next.lua +++ /dev/null @@ -1,36 +0,0 @@ -local sys = require "luci.sys" -local http = require "luci.http" - -module("luci.controller.daed-next", package.seeall) - -function index() - if not nixio.fs.access("/etc/config/daed-next") then - return - end - - local page = entry({"admin", "services", "daed-next"}, alias("admin", "services", "daed-next", "basic"), _("DAED Next"), -1) - page.dependent = true - page.acl_depends = { "luci-app-daed-next" } - - entry({"admin", "services", "daed-next", "basic"}, cbi("daed-next/basic"), _("Basic Setting"), 1).leaf = true - entry({"admin", "services", "daed-next", "dashboard"}, template("daed-next/dashboard"), _("Dashboard"), 2).leaf = true - entry({"admin", "services", "daed-next", "log"}, cbi("daed-next/log"), _("Logs"), 3).leaf = true - entry({"admin", "services", "daed-next", "status"}, call("act_status")).leaf = true - entry({"admin", "services", "daed-next", "get_log"}, call("get_log")).leaf = true - entry({"admin", "services", "daed-next", "clear_log"}, call("clear_log")).leaf = true -end - -function act_status() - local e = {} - e.running = sys.call("pgrep -x /usr/bin/dae-wing >/dev/null") == 0 - http.prepare_content("application/json") - http.write_json(e) -end - -function get_log() - http.write(sys.exec("cat /var/log/daed-next/daed-next.log")) -end - -function clear_log() - sys.call("true > /var/log/daed-next/daed-next.log") -end diff --git a/luci-app-daed-next/luasrc/model/cbi/daed-next/basic.lua b/luci-app-daed-next/luasrc/model/cbi/daed-next/basic.lua deleted file mode 100644 index c1395db4..00000000 --- a/luci-app-daed-next/luasrc/model/cbi/daed-next/basic.lua +++ /dev/null @@ -1,76 +0,0 @@ -local m, s - -m = Map("daed-next", translate("DAE Dashboard")) -m.description = translate("A Linux high-performance transparent proxy solution based on eBPF") - -m:section(SimpleSection).template = "daed-next/daed-next_status" - -s = m:section(TypedSection, "daed-next") -s.addremove = false -s.anonymous = true - -if nixio.fs.stat("/sys/fs/bpf","type") ~= "dir" then - s.rawhtml = true - s.template = "daed-next/daed-next_error" -end - -o = s:option(Flag, "enabled", translate("Enabled")) -o.rmempty = false - -o = s:option(Button, "Dashboard Toggle", translate("Dashboard Toggle")) -o.inputtitle = translate("Toggle") -o.inputstyle = "reload" -o.description = translate("Dashboard is a frontend management panel, meant for configuration use only.") -o.write = function() - luci.sys.exec("/etc/daed-next/dashboard.sh &> /dev/null &") -end - -enable = s:option(Flag, "subscribe_auto_update", translate("Enable Auto Subscribe Update")) -enable.rmempty = false - -o = s:option(Value, "daed_username", translate("Username")) -o.default = Username -o.password = true -o:depends('subscribe_auto_update', '1') - -o = s:option(Value, "daed_password", translate("Password")) -o.default = Password -o.password = true -o:depends('subscribe_auto_update', '1') - -o = s:option(ListValue, "subscribe_update_week_time", translate("Update Cycle")) -o:value("*", translate("Every Day")) -o:value("1", translate("Every Monday")) -o:value("2", translate("Every Tuesday")) -o:value("3", translate("Every Wednesday")) -o:value("4", translate("Every Thursday")) -o:value("5", translate("Every Friday")) -o:value("6", translate("Every Saturday")) -o:value("7", translate("Every Sunday")) -o.default = "*" -o:depends('subscribe_auto_update', '1') - -update_time = s:option(ListValue, "subscribe_update_day_time", translate("Update Time (Every Day)")) -for t = 0, 23 do - update_time:value(t, t..":00") -end -update_time.default = 0 -update_time:depends('subscribe_auto_update', '1') - -o = s:option(Value, "listen_port", translate("Web Listen port")) -o.datatype = "and(port,min(1))" -o.default = 3000 - -o = s:option(Flag, "log_enabled", translate("Enable Logs")) -o.default = 0 -o.rmempty = false - -o = s:option(Value, "log_maxbackups", translate("Logfile retention count")) -o.default = 1 -o:depends("log_enabled", "1") - -o = s:option(Value, "log_maxsize", translate("Logfile Max Size (MB)")) -o.default = 1 -o:depends("log_enabled", "1") - -return m diff --git a/luci-app-daed-next/luasrc/model/cbi/daed-next/log.lua b/luci-app-daed-next/luasrc/model/cbi/daed-next/log.lua deleted file mode 100644 index e5977842..00000000 --- a/luci-app-daed-next/luasrc/model/cbi/daed-next/log.lua +++ /dev/null @@ -1,5 +0,0 @@ -m = Map("daed-next") - -m:append(Template("daed-next/daed-next_log")) - -return m diff --git a/luci-app-daed-next/luasrc/view/daed-next/daed-next_error.htm b/luci-app-daed-next/luasrc/view/daed-next/daed-next_error.htm deleted file mode 100644 index 85de6271..00000000 --- a/luci-app-daed-next/luasrc/view/daed-next/daed-next_error.htm +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/luci-app-daed-next/luasrc/view/daed-next/daed-next_log.htm b/luci-app-daed-next/luasrc/view/daed-next/daed-next_log.htm deleted file mode 100644 index e661abe3..00000000 --- a/luci-app-daed-next/luasrc/view/daed-next/daed-next_log.htm +++ /dev/null @@ -1,33 +0,0 @@ - -
- - -
diff --git a/luci-app-daed-next/luasrc/view/daed-next/daed-next_status.htm b/luci-app-daed-next/luasrc/view/daed-next/daed-next_status.htm deleted file mode 100644 index fcfcec57..00000000 --- a/luci-app-daed-next/luasrc/view/daed-next/daed-next_status.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - - -
-

- <%:Collecting data...%> -

-

- <%:Collecting data...%> -

-
diff --git a/luci-app-daed-next/luasrc/view/daed-next/dashboard.htm b/luci-app-daed-next/luasrc/view/daed-next/dashboard.htm deleted file mode 100644 index b0035476..00000000 --- a/luci-app-daed-next/luasrc/view/daed-next/dashboard.htm +++ /dev/null @@ -1,27 +0,0 @@ -<%+header%> -<% - local running = luci.sys.exec("pgrep -x /usr/bin/dae-wing") - local dashrunning = luci.sys.exec("[ -e '/tmp/log/daed-next/dashboard.pid' ] && echo '1' || echo 'x'") -%> -<% if tonumber(running) ~= nil and tonumber(dashrunning) ~= nil then %> -
- -
- -<% else %> - -
- -

<%:dae-wing or dashboard is not running%>

-

<%:Please start the dae-wing service and the dashboard service first and try again%>

-
-<% end -%> - -<%+footer%> \ No newline at end of file diff --git a/luci-app-daed-next/po/zh-cn b/luci-app-daed-next/po/zh-cn deleted file mode 120000 index 8d69574d..00000000 --- a/luci-app-daed-next/po/zh-cn +++ /dev/null @@ -1 +0,0 @@ -zh_Hans \ No newline at end of file diff --git a/luci-app-daed-next/po/zh_Hans/daed-next.po b/luci-app-daed-next/po/zh_Hans/daed-next.po deleted file mode 100644 index cb691998..00000000 --- a/luci-app-daed-next/po/zh_Hans/daed-next.po +++ /dev/null @@ -1,86 +0,0 @@ -msgid "DAED Next" -msgstr "" - -msgid "DAE Dashboard" -msgstr "DAE 仪表板" - -msgid "A Linux high-performance transparent proxy solution based on eBPF" -msgstr "一个基于 eBPF 的 Linux 高性能透明代理解决方案" - -msgid "Enabled" -msgstr "启用" - -msgid "Web Listen port" -msgstr "Web 监听端口" - -msgid "Enable Logs" -msgstr "启用日志" - -msgid "Logfile retention count" -msgstr "日志文件保留数量" - -msgid "Logfile Max Size (MB)" -msgstr "日志文件大小(MB)" - -msgid "Logs" -msgstr "日志" - -msgid "Clear logs" -msgstr "清空日志" - -msgid "Basic Setting" -msgstr "基本设置" - -msgid "RUNNING" -msgstr "运行中" - -msgid "NOT RUNNING" -msgstr "未运行" - -msgid "Collecting data..." -msgstr "收集数据..." - -msgid "Open Web Interface" -msgstr "打开 Web 界面" - -msgid "The kernel does not support eBPF" -msgstr "内核不支持 eBPF" - -msgid "Dashboard" -msgstr "仪表板" - -msgid "DAED Next is not running" -msgstr "DAED Next 未运行" - -msgid "Please start the DAED Next service first and try again" -msgstr "请先启动 DAED Next 服务后重试" - -msgid "dae-wing or dashboard is not running" -msgstr "DAE-WING 或 仪表板 未运行" - -msgid "Please start the dae-wing service and the dashboard service first and try again" -msgstr "请先启动 DAE-WING 和 仪表板 服务后重试" - -msgid "Enable Auto Subscribe Update" -msgstr "启用订阅自动更新" - -msgid "Update Cycle" -msgstr "更新周期" - -msgid "Update Time (Every Day)" -msgstr "更新时间(每天)" - -msgid "Username" -msgstr "用户名" - -msgid "Password" -msgstr "密码" - -msgid "Dashboard Toggle" -msgstr "仪表板开关" - -msgid "Toggle" -msgstr "开/关" - -msgid "Dashboard is a frontend management panel, meant for configuration use only." -msgstr "仪表板是一个前端管理面板,仅应在配置过程中启用。(登录后若浏览器未自动跳转,请手动刷新页面)" diff --git a/luci-app-daed-next/root/etc/daed-next/daed-next_sub.sh b/luci-app-daed-next/root/etc/daed-next/daed-next_sub.sh deleted file mode 100755 index 4b8a03fd..00000000 --- a/luci-app-daed-next/root/etc/daed-next/daed-next_sub.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -USERNAME=$(uci -q get daed-next.config.daed_username) -PASSWORD=$(uci -q get daed-next.config.daed_password) -PORT=2023 -GRAPHQL_URL="http://127.0.0.1:"$PORT"/graphql" -CRON_FILE="/etc/crontabs/root" -RANDOM_SEED=$RANDOM -RANDOM_NUM=$((RANDOM_SEED % 10 + 1)) - -login() { - LOGIN=$(curl -s -X POST -H "Content-Type: application/json" -d '{"query":"query Token($username: String!, $password: String!) {\n token(username: $username, password: $password)\n}","variables":{"username":"'"$USERNAME"'","password":"'"$PASSWORD"'"}}' $GRAPHQL_URL) - JSON=${LOGIN#\"} - JSON=${LOGIN%\"} - TOKEN=$(echo $JSON | sed -n 's/.*"token":"\([^"]*\)".*/\1/p') -} - -update_subscription() { - SUBSCRIPTION_ID_LIST=$(curl -s -X POST -H "Authorization: $TOKEN" -d '{"query": "query Subscriptions {\n subscriptions {\nid\ntag\nstatus\nlink\ninfo\nupdatedAt\nnodes {\nedges {\nid\nname\nprotocol\nlink\n}\n}\n}\n}", "operationName": "Subscriptions"}' $GRAPHQL_URL | grep -o '"id":"[^"]*","tag"' | grep -o 'id":"[^"]*' | grep -o '[^"]*$') - echo "$SUBSCRIPTION_ID_LIST" | while read -r id; do - curl -X POST -H "Authorization: $TOKEN" -d '{"query":"mutation UpdateSubscription($id: ID!) {\n updateSubscription(id: $id) {\n id\n }\n}","variables":{"id":"'"$id"'"},"operationName":"UpdateSubscription"}' $GRAPHQL_URL - done -} - -reload() { - curl -X POST -H "Authorization: $TOKEN" -d '{"query":"mutation Run($dry: Boolean!) {\n run(dry: $dry)\n}","variables":{"dry":false},"operationName":"Run"}' $GRAPHQL_URL -} - -resetcron() { - touch $CRON_FILE - sed -i '/daed-next_sub.sh/d' $CRON_FILE 2>/dev/null - [ "$(uci -q get daed-next.config.subscribe_auto_update)" -eq 1 ] && echo "${RANDOM_NUM} $(uci -q get daed-next.config.subscribe_update_day_time) * * $(uci -q get daed-next.config.subscribe_update_week_time) /etc/daed-next/daed-next_sub.sh >/dev/null 2>&1" >>$CRON_FILE - crontab $CRON_FILE -} - -login && update_subscription && reload && resetcron \ No newline at end of file diff --git a/luci-app-daed-next/root/etc/daed-next/dashboard.sh b/luci-app-daed-next/root/etc/daed-next/dashboard.sh deleted file mode 100755 index 076f7c77..00000000 --- a/luci-app-daed-next/root/etc/daed-next/dashboard.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -NODE_BIN=/usr/bin/node -WEB_SQUASHFS=/usr/share/daed-next/daed-web.squashfs -PID_FILE=/tmp/log/daed-next/dashboard.pid -DAED_NEXT_DIR=/var/daed-next - -start_server() { - listen_port=$(uci -q get daed-next.config.listen_port) - if [ ! -d "$DAED_NEXT_DIR" ]; then - mkdir -p "$DAED_NEXT_DIR" - fi - mount -t squashfs "$WEB_SQUASHFS" "$DAED_NEXT_DIR" || { echo "Mount failed"; } - - ARGS="PORT=$listen_port HOSTNAME=0.0.0.0" - /bin/sh -c "$ARGS $NODE_BIN $DAED_NEXT_DIR/server.js" & - echo $! > "$PID_FILE" -} - -stop_server() { - if [ -f "$PID_FILE" ]; then - PID=$(cat "$PID_FILE") - kill "$PID" || { echo "Failed to kill process $PID"; } - rm -f "$PID_FILE" - - mount_points=$(mount | grep '/tmp/daed-next' | awk '{print $3}') - for mp in $mount_points; do - umount -l "$mp" || { echo "Failed to force unmount $mp"; } - done - fi -} - -if [ -e "$PID_FILE" ]; then - stop_server -else - start_server -fi diff --git a/luci-app-daed-next/root/etc/init.d/luci_daed-next b/luci-app-daed-next/root/etc/init.d/luci_daed-next deleted file mode 100755 index 27f9d13d..00000000 --- a/luci-app-daed-next/root/etc/init.d/luci_daed-next +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh /etc/rc.common -# Copyright (C) 2023 Tianling Shen - -USE_PROCD=0 -START=99 - -CONF="daed-next" -PROG="/usr/bin/dae-wing" -LOG="/var/log/daed-next/daed-next.log" -CRON_FILE="/etc/crontabs/root" -RANDOM_SEED=$RANDOM -RANDOM_NUM=$((RANDOM_SEED % 10 + 1)) - -setcron() { - touch $CRON_FILE - sed -i '/daed-next_sub.sh/d' $CRON_FILE 2>/dev/null - [ "$(uci -q get daed-next.config.subscribe_auto_update)" -eq 1 ] && echo "${RANDOM_NUM} $(uci -q get daed-next.config.subscribe_update_day_time) * * $(uci -q get daed-next.config.subscribe_update_week_time) /etc/daed-next/daed-next_sub.sh >/dev/null 2>&1" >>$CRON_FILE - crontab $CRON_FILE -} - -delcron() { - sed -i '/daed-next_sub.sh/d' $CRON_FILE 2>/dev/null - crontab $CRON_FILE -} - -start_service() { - config_load "$CONF" - - local enabled - config_get_bool enabled "config" "enabled" "0" - if [ "$enabled" -eq 0 ]; then - delcron - return 1 - fi - setcron -} - -stop_service() { - delcron -} - -service_triggers() { - procd_add_reload_trigger "$CONF" -} - -reload_service() { - restart -} diff --git a/luci-app-daed-next/root/etc/uci-defaults/luci-daed-next b/luci-app-daed-next/root/etc/uci-defaults/luci-daed-next deleted file mode 100755 index 97e1f8d3..00000000 --- a/luci-app-daed-next/root/etc/uci-defaults/luci-daed-next +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -rm -rf /tmp/luci-* - -exit 0 diff --git a/luci-app-daed-next/root/usr/share/rpcd/acl.d/luci-app-daed-next.json b/luci-app-daed-next/root/usr/share/rpcd/acl.d/luci-app-daed-next.json deleted file mode 100644 index 848c286e..00000000 --- a/luci-app-daed-next/root/usr/share/rpcd/acl.d/luci-app-daed-next.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "luci-app-daed-next": { - "description": "Grant UCI access for luci-app-daed-next", - "read": { - "uci": [ "daed-next" ] - }, - "write": { - "uci": [ "daed-next" ] - } - } -} diff --git a/quectel_MHI/Makefile b/quectel_MHI/Makefile old mode 100644 new mode 100755 index ec5a218e..6b35a978 --- a/quectel_MHI/Makefile +++ b/quectel_MHI/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pcie_mhi PKG_VERSION:=1.3.8 -PKG_RELEASE:=31 +PKG_RELEASE:=32 include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/package.mk diff --git a/vmlinux-btf/Makefile b/vmlinux-btf/Makefile new file mode 100644 index 00000000..856e1042 --- /dev/null +++ b/vmlinux-btf/Makefile @@ -0,0 +1,125 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Detached kernel BTF for CO-RE eBPF (dae/daed) on firmware whose kernel was +# built without CONFIG_DEBUG_INFO_BTF. Builds a shadow kernel from the same +# OpenWrt source + .config with BTF enabled, then pahole-encodes a detached +# vmlinux.btf. cilium/ebpf finds it at /usr/lib/debug/boot/vmlinux-. + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_NAME:=vmlinux-btf +PKG_VERSION:=$(LINUX_VERSION) +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +PKG_BUILD_PARALLEL:=1 + +define Package/vmlinux-btf + SECTION:=kernel + CATEGORY:=Kernel + TITLE:=Kernel vmlinux.btf for CO-RE compatibility +endef + +define Package/vmlinux-btf/description + Supplies detached kernel BTF so CO-RE eBPF programs (dae/daed) load on + kernels built without CONFIG_DEBUG_INFO_BTF. Builds a shadow kernel from the + OpenWrt kernel source with BTF enabled and encodes a detached vmlinux.btf. +endef + +define Package/vmlinux-btf/postinst +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + ln -sf /usr/lib/debug/boot/vmlinux /usr/lib/debug/boot/vmlinux-$$(uname -r) +fi +endef + +define Package/vmlinux-btf/prerm +#!/bin/sh +if [ -z "$${IPKG_INSTROOT}" ]; then + rm -f /usr/lib/debug/boot/vmlinux-$$(uname -r) +fi +endef + +PAHOLE_JOBS := $(if $(filter -j%,$(PKG_JOBS)),$(patsubst -j%,%,$(filter -j%,$(PKG_JOBS))),1) + +# The SDK ships an extracted kernel but no dl/ tarball, so fetch vanilla source. +KERNEL_MAJOR:=$(firstword $(subst ., ,$(LINUX_VERSION))) +LINUX_TARBALL_URL:=https://cdn.kernel.org/pub/linux/kernel/v$(KERNEL_MAJOR).x/$(LINUX_SOURCE) + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) $(DL_DIR) + [ -f "$(DL_DIR)/$(LINUX_SOURCE)" ] || \ + wget -nv -O "$(DL_DIR)/$(LINUX_SOURCE)" "$(LINUX_TARBALL_URL)" + $(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(LINUX_SOURCE) + mv $(PKG_BUILD_DIR)/linux-$(LINUX_VERSION) $(PKG_BUILD_DIR)/shadow-kernel + cp $(LINUX_DIR)/.config $(PKG_BUILD_DIR)/shadow-kernel/.config +endef + +define Build/Compile + $(PKG_BUILD_DIR)/shadow-kernel/scripts/config \ + --file $(PKG_BUILD_DIR)/shadow-kernel/.config \ + --disable WERROR \ + --enable CGROUPS \ + --enable CGROUP_BPF \ + --enable SOCK_CGROUP_DATA \ + --enable KALLSYMS \ + --enable PERF_EVENTS \ + --enable TRACEPOINTS \ + --enable KPROBES \ + --enable UPROBES \ + --enable BPF \ + --enable BPF_SYSCALL \ + --enable BPF_JIT \ + --enable BPF_JIT_DEFAULT_ON \ + --enable INET \ + --enable NET_INGRESS \ + --enable NET_EGRESS \ + --enable BPF_STREAM_PARSER \ + --enable XDP_SOCKETS \ + --enable NET_SCHED \ + --enable NET_SCH_INGRESS \ + --enable NET_CLS \ + --enable NET_CLS_ACT \ + --enable KPROBE_EVENTS \ + --enable UPROBE_EVENTS \ + --enable BPF_EVENTS \ + --enable DEBUG_KERNEL \ + --enable DEBUG_INFO \ + --disable DEBUG_INFO_NONE \ + --enable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \ + --disable DEBUG_INFO_REDUCED \ + --disable DEBUG_INFO_SPLIT \ + --enable DEBUG_INFO_BTF \ + --set-str EXTRA_FIRMWARE "" \ + --set-str INITRAMFS_SOURCE "" + + $(MAKE) -C $(PKG_BUILD_DIR)/shadow-kernel \ + $(KERNEL_MAKE_FLAGS) \ + KBUILD_HOSTLDFLAGS="$(KBUILD_HOSTLDFLAGS) -lz" \ + olddefconfig + + $(MAKE) -C $(PKG_BUILD_DIR)/shadow-kernel \ + $(KERNEL_MAKE_FLAGS) \ + $(PKG_JOBS) \ + KBUILD_HOSTLDFLAGS="-L$(STAGING_DIR_HOST)/lib -lz" \ + vmlinux + + pahole \ + --jobs=$(PAHOLE_JOBS) \ + --btf_encode_detached=$(PKG_BUILD_DIR)/vmlinux-btf \ + $(PKG_BUILD_DIR)/shadow-kernel/vmlinux +endef + +define Build/Clean + rm -rf $(PKG_BUILD_DIR) +endef + +define Package/vmlinux-btf/install + $(INSTALL_DIR) $(1)/usr/lib/debug/boot + $(INSTALL_DATA) $(PKG_BUILD_DIR)/vmlinux-btf $(1)/usr/lib/debug/boot/vmlinux + $(LN) vmlinux $(1)/usr/lib/debug/boot/vmlinux-$(LINUX_VERSION) +endef + +$(eval $(call BuildPackage,vmlinux-btf))