Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 13, 2024
2 parents 2cce604 + 49dddd8 commit ceb1aea
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 22 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,11 @@ bash <(curl -sS https://raw.githubusercontent.com/你的用户名/r4s_build_scri
### 一、Fork 本仓库到自己 GitHub 存储库

### 二、构建固件
- 在存储库名称下,单击(<img src="https://camo.githubusercontent.com/392391d290482f9c4881912eec0700ec2acef8e0d5d2e24b3f8b23d9354fa73e/68747470733a2f2f66696c652e636f6f6c75632e636f6d2f323232322e737667" alt="Actions"> Actions)。

- 在存储库名称下,单击(<img src="https://github.com/user-attachments/assets/f1db14da-2dd9-4f10-8e37-d92ef9651912" alt="Actions"> Actions)。

- 在左侧边栏中,单击要运行的工作流的名称:**Build releases**

- 在工作流运行的列表上方,单击“**Run workflow**”按钮,选择要构建的设备固件并运行工作流。

![image](https://github.com/sbwml/r4s_build_script/assets/16485166/136abcd1-ecf3-4e6d-aa1a-5393a75a25cc)
![image](https://github.com/user-attachments/assets/0c2eb064-a130-47b3-a5a3-1e9a9bb6f50d)
1 change: 1 addition & 0 deletions openwrt/23-config-common
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ CONFIG_PACKAGE_kmod-usb-net-rndis=y
CONFIG_PACKAGE_kmod-usb-net-ipheth=y

### Kernel Modules
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-button-hotplug=y
CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=y
CONFIG_PACKAGE_kmod-crypto-sha256=y
Expand Down
1 change: 1 addition & 0 deletions openwrt/23-config-minimal-common
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ CONFIG_PACKAGE_kmod-usb-net-rndis=y
CONFIG_PACKAGE_kmod-usb-net-ipheth=y

### Kernel Modules
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-button-hotplug=y
CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=y
CONFIG_PACKAGE_kmod-crypto-sha256=y
Expand Down
2 changes: 2 additions & 0 deletions openwrt/23-config-musl-r8500
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ CONFIG_PACKAGE_kmod-usb-net-rndis=y
CONFIG_PACKAGE_kmod-usb-net-ipheth=y

### Kernel Modules
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-button-hotplug=y
CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=y
CONFIG_PACKAGE_kmod-crypto-sha256=y
Expand All @@ -180,6 +181,7 @@ CONFIG_PACKAGE_kmod-tls=y
CONFIG_PACKAGE_kmod-tun=y
CONFIG_PACKAGE_kmod-usb-audio=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-usb-storage-uas=y

### Utilities
CONFIG_PACKAGE_bash=y
Expand Down
4 changes: 4 additions & 0 deletions openwrt/23-config-musl-r8500-minimal
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ CONFIG_PACKAGE_kmod-usb-net-rndis=y
CONFIG_PACKAGE_kmod-usb-net-ipheth=y

### Kernel Modules
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-button-hotplug=y
CONFIG_PACKAGE_kmod-crypto-chacha20poly1305=y
CONFIG_PACKAGE_kmod-crypto-sha256=y
Expand All @@ -128,12 +129,15 @@ CONFIG_PACKAGE_kmod-tcp-bbr=y
CONFIG_PACKAGE_kmod-tls=y
CONFIG_PACKAGE_kmod-tun=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-usb-storage-uas=y

### Utilities
CONFIG_PACKAGE_bash=y
CONFIG_PACKAGE_dmesg=y
CONFIG_PACKAGE_ftp=y
CONFIG_PACKAGE_openssh-sftp-server=y
CONFIG_PACKAGE_telnet-bsd=y
CONFIG_PACKAGE_usbutils=y
CONFIG_PACKAGE_wget-ssl=y
CONFIG_PACKAGE_wpad-openssl=y

Expand Down
2 changes: 1 addition & 1 deletion openwrt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export gitea=git.cooluc.com

# github mirror
if [ "$isCN" = "CN" ]; then
export github="github.com"
export github="ghp.ci/github.com"
else
export github="github.com"
fi
Expand Down
16 changes: 11 additions & 5 deletions openwrt/files/etc/hotplug.d/block/20-usbreset
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
#!/bin/sh

device=`basename $DEVPATH`
point=$device

case $device in
mtdblock*|ubiblock*|zram*)
exit 0
;;
esac

case "$ACTION" in
add)
mkdir -p /usb/$point
mount -o rw,noatime,discard /dev/$device /usb/$point
if [ -f "/usb/$point/recovery.txt" ]; then
mkdir -p /usb/$device
mount -o rw,noatime,discard /dev/$device /usb/$device
if [ -f "/usb/$device/recovery.txt" ]; then
echo y | firstboot
sleep 2
reboot
else
umount -l /usb/$point
umount -l /usb/$device
rm -rf /usb
fi
;;
esac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ index ca89051..510c813 100644

config GCC_USE_GRAPHITE
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 200a356..5675b9a 100644
index 7ff5bc0..7d8ee09 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -10,11 +10,16 @@ config GCC_VERSION_14
Expand All @@ -34,7 +34,7 @@ index 200a356..5675b9a 100644

config GCC_USE_DEFAULT_VERSION
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index f5db99f..24c6535 100644
index a1a5108..7ec50ad 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -26,7 +26,11 @@ PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION)))
Expand All @@ -51,7 +51,7 @@ index f5db99f..24c6535 100644
PKG_CPE_ID:=cpe:/a:gnu:gcc

@@ -46,6 +50,10 @@ ifeq ($(PKG_VERSION),14.2.0)
PKG_HASH:=e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840
PKG_HASH:=a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9
endif

+ifeq ($(PKG_VERSION),15.0.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Signed-off-by: Alexandre Frade <kernel@xanmod.org>
/* Clean up fastopen related fields */
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -241,6 +241,7 @@ void tcp_init_congestion_control(struct
@@ -240,6 +240,7 @@ void tcp_init_congestion_control(struct
struct inet_connection_sock *icsk = inet_csk(sk);

tcp_sk(sk)->prior_ssthresh = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From 0c1f0e62e72e4c89b0db25aa6f6baa19c7e91e75 Mon Sep 17 00:00:00 2001
From: sbwml <admin@cooluc.com>
Date: Fri, 13 Sep 2024 19:36:44 +0800
Subject: [PATCH 1/5] luci-mod-system: add modal overlay dialog to reboot

Signed-off-by: sbwml <admin@cooluc.com>
---
.../resources/view/system/reboot.js | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js
index 92e1dd4..c106f78 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js
+++ b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/reboot.js
@@ -30,7 +30,26 @@ return view.extend({
body.appendChild(E('hr'));
body.appendChild(E('button', {
'class': 'cbi-button cbi-button-action important',
- 'click': ui.createHandlerFn(this, 'handleReboot')
+ 'click': function () {
+ ui.showModal(_('Confirm Reboot'), [
+ E('p', {}, _('Are you sure you want to reboot the system?')),
+ E('button', {
+ 'class': 'cbi-button cbi-button-action important',
+ 'style': 'margin-left: 0px; background: red!important; border-color: red!important',
+ 'click': function () {
+ ui.hideModal();
+ this.handleReboot();
+ }.bind(this)
+ }, _('Confirm')),
+ E('button', {
+ 'class': 'btn cbi-button cbi-button-apply',
+ 'style': 'margin-left: 20px',
+ 'click': function () {
+ ui.hideModal();
+ }
+ }, _('Cancel'))
+ ]);
+ }.bind(this)
}, _('Perform reboot')));

return body;
--
2.42.0

Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
From fb9d1a301136922a624e1eb2927ad60260ee11f8 Mon Sep 17 00:00:00 2001
From: sbwml <admin@cooluc.com>
Date: Fri, 13 Sep 2024 19:43:19 +0800
Subject: [PATCH 2/5] luci-mod-status: displays actual process memory usage

Signed-off-by: sbwml <admin@cooluc.com>
---
.../luci-static/resources/view/status/include/20_memory.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
index 0a885c0..d3302ff 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/20_memory.js
Expand All @@ -13,3 +23,6 @@ index 0a885c0..d3302ff 100644
];

if (mem.buffered)
--
2.42.0

Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
From 8a052b2e2ffd2e6a46fe361a946b1acd42998402 Mon Sep 17 00:00:00 2001
From 2543713322fa4f7b404a673429ce36f4319c4749 Mon Sep 17 00:00:00 2001
From: sbwml <admin@cooluc.com>
Date: Sun, 24 Mar 2024 00:12:45 +0800
Subject: [PATCH] luci-mod-status: storage index applicable only to valid
Subject: [PATCH 3/5] luci-mod-status: storage index applicable only to valid
devices

Signed-off-by: sbwml <admin@cooluc.com>
---
.../luci-static/resources/view/status/include/25_storage.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js
index 60661f6..aac6711 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/25_storage.js
@@ -13,12 +13,14 @@ var callMountPoints = rpc.declare({
Expand Down Expand Up @@ -36,4 +38,6 @@ Signed-off-by: sbwml <admin@cooluc.com>
continue;

var name = entry.device + ' (' + entry.mount +')',
--
2.42.0

Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
From 44cb42a004b8334d784814c5f616c8d8ceda6b22 Mon Sep 17 00:00:00 2001
From: sbwml <admin@cooluc.com>
Date: Fri, 13 Sep 2024 19:44:52 +0800
Subject: [PATCH 4/5] luci-mod-status: firewall: disable legacy firewall rule
warning

Signed-off-by: sbwml <admin@cooluc.com>
---
.../resources/view/status/nftables.js | 14 --------------
.../share/luci/menu.d/luci-mod-status.json | 19 ++++++++++++++++---
2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js
index d891526..04fd5af 100644
index be62d91..1718494 100644
--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js
+++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/nftables.js
@@ -672,26 +672,12 @@ return view.extend({
Expand Down Expand Up @@ -70,3 +82,6 @@ index 190eef0..e9cf485 100644
"action": {
"type": "view",
"path": "status/iptables"
--
2.42.0

Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
From 8596f6d48c24c063fd75f007b8e24cd011ac93fb Mon Sep 17 00:00:00 2001
From: sbwml <admin@cooluc.com>
Date: Fri, 13 Sep 2024 19:47:13 +0800
Subject: [PATCH 5/5] luci-mod-system: add refresh interval setting

Signed-off-by: sbwml <admin@cooluc.com>
---
.../htdocs/luci-static/resources/view/system/system.js | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js b/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
index 767bc8c..c8969ac 100644
--- a/modules/luci-mod-system/htdocs/luci-static/resources/view/system/system.js
Expand All @@ -17,3 +27,6 @@ index 767bc8c..c8969ac 100644
/*
* NTP
*/
--
2.42.0

12 changes: 7 additions & 5 deletions openwrt/scripts/00-prepare_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ if [ "$ENABLE_UHTTPD" != "y" ]; then
fi

# Realtek driver - R8168 & R8125 & R8126 & R8152 & R8101
rm -rf package/kernel/r8168 package/kernel/r8101 package/kernel/r8125 package/kernel/r8126
git clone https://$github/sbwml/package_kernel_r8168 package/kernel/r8168
git clone https://$github/sbwml/package_kernel_r8152 package/kernel/r8152
git clone https://$github/sbwml/package_kernel_r8101 package/kernel/r8101
Expand Down Expand Up @@ -390,12 +391,13 @@ sed -i 's/cheaper = 1/cheaper = 2/g' feeds/packages/net/uwsgi/files-luci-support
sed -i 's/option timeout 30/option timeout 60/g' package/system/rpcd/files/rpcd.config
sed -i 's#20) \* 1000#60) \* 1000#g' feeds/luci/modules/luci-base/htdocs/luci-static/resources/rpc.js

# luci - 20_memory & 25_storage & refresh interval
# luci-mod extra
pushd feeds/luci
curl -s https://$mirror/openwrt/patch/luci/20_memory.js.patch | patch -p1
curl -s https://$mirror/openwrt/patch/luci/luci-refresh-interval.patch | patch -p1
# luci-mod-status: storage index applicable only to valid
curl -s https://$mirror/openwrt/patch/luci/luci-mod-status-storage-index-applicable-only-to-val.patch | patch -p1
curl -s https://$mirror/openwrt/patch/luci/0001-luci-mod-system-add-modal-overlay-dialog-to-reboot.patch | patch -p1
curl -s https://$mirror/openwrt/patch/luci/0002-luci-mod-status-displays-actual-process-memory-usage.patch | patch -p1
curl -s https://$mirror/openwrt/patch/luci/0003-luci-mod-status-storage-index-applicable-only-to-val.patch | patch -p1
curl -s https://$mirror/openwrt/patch/luci/0004-luci-mod-status-firewall-disable-legacy-firewall-rul.patch | patch -p1
curl -s https://$mirror/openwrt/patch/luci/0005-luci-mod-system-add-refresh-interval-setting.patch | patch -p1
popd

# Luci diagnostics.js
Expand Down
4 changes: 2 additions & 2 deletions tags/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .50
LINUX_KERNEL_HASH-6.6.50 = c065e36daf28210060c91a37ef3e92ac5814784e634577e04e406297ead2e86e
LINUX_VERSION-6.6 = .51
LINUX_KERNEL_HASH-6.6.51 = 1c0c9a14650879c4913efdbac428ba31a540c3d987155ddf34d33e11eca008b3

0 comments on commit ceb1aea

Please sign in to comment.