kiddin9 1 өдөр өмнө
parent
commit
c7952aea96

+ 1 - 0
devices/common/.config

@@ -99,6 +99,7 @@ CONFIG_VERSIONOPT=y
 CONFIG_VERSION_MANUFACTURER="Kiddin'"
 CONFIG_VERSION_FILENAMES=n
 CONFIG_VERSION_CODE_FILENAMES=n
+CONFIG_VERSION_HOME_URL="https://openwrt.ai/"
 
 CONFIG_KERNEL_XDP_SOCKETS=y
 

+ 5 - 1
devices/common/diy.sh

@@ -9,6 +9,8 @@ sed -i "s?targets/%S/packages?targets/%S/\$(LINUX_VERSION)?" include/feeds.mk
 
 sed -i '/	refresh_config();/d' scripts/feeds
 
+sed -i "s?git.openwrt.org/\(project\|feed\)?github.com/openwrt?g" feeds.conf.default
+
 ./scripts/feeds update -a
 ./scripts/feeds install -a -p kiddin9 -f
 ./scripts/feeds install -a
@@ -30,8 +32,9 @@ wget -N https://github.com/immortalwrt/immortalwrt/raw/refs/heads/openwrt-24.10/
 wget -N https://github.com/immortalwrt/immortalwrt/raw/refs/heads/openwrt-24.10/package/firmware/wireless-regdb/patches/600-custom-change-txpower-and-dfs.patch -P package/firmware/wireless-regdb/patches/
 wget -N https://github.com/immortalwrt/immortalwrt/raw/refs/heads/master/config/Config-kernel.in -P config/
 
-rm -rf package/libs/openssl package/network/services/ppp
+rm -rf package/libs/openssl package/network/services/ppp feeds/luci/modules/luci-mod-network
 git_clone_path openwrt-24.10 https://github.com/immortalwrt/immortalwrt package/libs/openssl package/network/services/ppp
+git_clone_path separate-dhcp-dns https://github.com/Alphix/luci modules/luci-mod-network && mv modules/luci-mod-network feeds/luci/modules/
 
 echo "$(date +"%s")" >version.date
 sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' package/Makefile
@@ -41,6 +44,7 @@ coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr b
 
 sed -i "s/procd-ujail//" include/target.mk
 
+
 sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk
 
 status=$(curl -H "Authorization: token $REPO_TOKEN" -s "https://api.github.com/repos/kiddin9/kwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status')

+ 20 - 0
devices/common/patches/luci-base.patch

@@ -117,6 +117,26 @@
  };
  
 
+--- a/package/feeds/luci/luci-base/htdocs/luci-static/resources/network.js
++++ b/package/feeds/luci/luci-base/htdocs/luci-static/resources/network.js
+@@ -2560,6 +2560,16 @@ Protocol = baseclass.extend(/** @lends LuCI.network.Protocol.prototype */ {
+ 		return (this._ubus('dynamic') == true);
+ 	},
+ 
++	/**
++	 * Checks whether this logical interface is pending.
++	 *
++	 * @returns {boolean}
++	 * returns `true` when the interface is pending or `false` when it is not.
++	 */
++	isPending: function() {
++		return (this._ubus('pending') == true);
++	},
++
+ 	/**
+ 	 * Checks whether this interface is an alias interface.
+ 	 *
+
 --- a/package/feeds/luci/luci-base/htdocs/luci-static/resources/network.js
 +++ b/package/feeds/luci/luci-base/htdocs/luci-static/resources/network.js
 @@ -4376,4 +4376,10 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */

+ 20 - 35
devices/common/patches/luci-dhcp.patch

@@ -1,39 +1,24 @@
---- a/package/feeds/luci/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
-+++ b/package/feeds/luci/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js
-@@ -337,6 +337,25 @@ return view.extend({
- 		s.tab('mxhosts', _('MX'));
- 		s.tab('cnamehosts', _('CNAME'));
- 		s.tab('pxe_tftp', _('PXE/TFTP'));
-+		s.tab('custom_domain', _('Custom Redirect Domain'));
-+
-+		o = s.taboption('custom_domain', form.SectionValue, 'domain', form.GridSection, 'domain', null,
-+			_('Define a custom domain name and the corresponding PTR record'));
-+
-+		ss = o.subsection;
-+		ss.addremove = true;
-+		ss.anonymous = true;
-+
-+		so = ss.option(form.Value, 'name', _('Domain Name'));
-+		so.datatype = 'hostname';
-+		so.rmempty  = false;
-+
-+		so = ss.option(form.Value, 'ip', _('<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address'));
-+		so.datatype = 'or(ip4addr,"ignore")';
-+		so.rmempty  = false;
+--- a/package/feeds/luci/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js
++++ b/package/feeds/luci/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js
+@@ -253,6 +253,11 @@ return view.extend({
+ 		o.optional = true;
+ 		o.placeholder = '/example.org/ipset,ipset6';
+ 
++		o = s.taboption('general', form.Flag, 'dns_redirect',
++			_('DNS Redirect'),
++			_('Force redirect all local DNS queries to DNSMasq, a.k.a. DNS Hijacking.'));
++		o.optional = true;
 +
+ 		o = s.taboption('general', form.Flag, 'allservers',
+ 			_('All servers'),
+ 			_('Query all available upstream resolvers.') + ' ' + _('First answer wins.'));
+@@ -442,6 +447,9 @@ return view.extend({
+ 		so.rmempty = false;
+ 		so.datatype = 'ipaddr("nomask")';
+ 
 +		so = ss.option(form.Value, 'comments', _('Comments'));
 +		so.rmempty  = true;
- 
- 		s.taboption('filteropts', form.Flag, 'domainneeded',
- 			_('Domain required'),
-@@ -347,6 +366,10 @@ return view.extend({
- 			_('Authoritative'),
- 			_('This is the only DHCP server in the local network.'));
- 
-+		s.taboption('general', form.Flag, 'dns_redirect',
-+			_('DNS redirect'),
-+			_('Force redirect all local DNS queries to DNSMasq, a.k.a. DNS Hijacking.'));
 +
- 		o = s.taboption('general', form.Value, 'local',
- 			_('Resolve these locally'),
- 			_('Never forward these matching domains or subdomains; resolve from DHCP or hosts files only.'));
+ 		var ipaddrs = {};
+ 
+ 		Object.keys(hosts).forEach(function(mac) {

+ 0 - 310
devices/common/patches/selective_restore.patch

@@ -1,310 +0,0 @@
-From 58a69ea37f94b9cfae8f4619627469a6596474cd Mon Sep 17 00:00:00 2001
-From: Paul Donald <[email protected]>
-Date: Fri, 11 Oct 2024 00:48:27 +0200
-Subject: [PATCH] luci-mod-system: Allow selective file restore from backups
-
-This is useful when you're importing backups intended for different
-hardware, for example, where e.g. `/etc/config/[network|wireless]` are
-not suitable for the target platform, but everything else useful.
-
-Caveats: subsequent extraction and compression steps happen on the
-target device, to then feed the selective_backup archive to sysupgrade.
-
-Signed-off-by: Paul Donald <[email protected]>
----
- .../resources/view/system/flash.js            | 171 ++++++++++++++++++
- .../usr/share/rpcd/acl.d/luci-mod-system.json |   5 +
- 2 files changed, 176 insertions(+)
-
-diff --git a/feeds/luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js b/feeds/luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js
-index 2ef096f5f23f..3ffef2aba752 100644
---- a/feeds/luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js
-+++ b/feeds/luci/modules/luci-mod-system/htdocs/luci-static/resources/view/system/flash.js
-@@ -139,6 +139,85 @@ return view.extend({
- 			}, this, ev.target));
- 	},
- 
-+	handleSelectiveRestore: function(ev) {
-+		return ui.uploadFile('/tmp/backup.tar.gz', ev.target)
-+			.then(L.bind(function(btn, res) {
-+				btn.firstChild.data = _('Checking archive…');
-+				return fs.exec('/bin/tar', [ '-tzf', '/tmp/backup.tar.gz' ]);
-+			}, this, ev.target))
-+			.then(L.bind(function(btn, res) {
-+				if (res.code != 0) {
-+					ui.addNotification(null, E('p', _('The uploaded backup archive is not readable')));
-+					return fs.remove('/tmp/backup.tar.gz');
-+				}
-+
-+				// Split the stdout to get individual file names
-+				var files = res.stdout.split('\n').filter(function(f) { return f.trim() !== ''; });
-+
-+				// Generate check-boxes for each file with <br /> after each
-+				var fileCheckboxes = files.map(function(file) {
-+					return E('label', { 'class': 'checkbox' }, [
-+						E('input', { 'type': 'checkbox', 'name': 'file', 'value': file }),
-+						' ', file, E('br')  // Add line break after each checkbox
-+					]);
-+				});
-+
-+				// Helper buttons to check all, none, or inverse
-+				var checkAllButton = E('button', {
-+					'class': 'btn',
-+					'click': function() {
-+						// Select all check-boxes
-+						document.querySelectorAll('input[name="file"]').forEach(function(cb) {
-+							cb.checked = true;
-+						});
-+					}
-+				}, _('Check All'));
-+
-+				var uncheckAllButton = E('button', {
-+					'class': 'btn',
-+					'click': function() {
-+						// Deselect all check-boxes
-+						document.querySelectorAll('input[name="file"]').forEach(function(cb) {
-+							cb.checked = false;
-+						});
-+					}
-+				}, _('Check None'));
-+
-+				var invertButton = E('button', {
-+					'class': 'btn',
-+					'click': function() {
-+						// Deselect all check-boxes
-+						document.querySelectorAll('input[name="file"]').forEach(function(cb) {
-+							cb.checked = !cb.checked;
-+						});
-+					}
-+				}, _('Invert'));
-+
-+				// Display the modal with check-boxes and helper buttons
-+				ui.showModal(_('Apply backup?'), [
-+					E('p', _('The uploaded backup archive appears to be valid and contains the files listed below. Select the files you wish to restore and press "Continue", or "Cancel" to abort.')),
-+					E('div', {}, fileCheckboxes), // Display check-boxes for files
-+					E('div', { 'class': 'right' }, [
-+						checkAllButton, ' ', uncheckAllButton, ' ', invertButton, ' ',
-+						E('button', {
-+							'class': 'btn',
-+							'click': ui.createHandlerFn(this, function(ev) {
-+								return fs.remove('/tmp/backup.tar.gz').finally(ui.hideModal);
-+							})
-+						}, [ _('Cancel') ]), ' ',
-+						E('button', {
-+							'class': 'btn cbi-button-action important',
-+							'click': ui.createHandlerFn(this, 'handleSelectiveRestoreConfirm', btn)
-+						}, [ _('Continue') ])
-+					])
-+				]);
-+			}, this, ev.target))
-+			.catch(function(e) { ui.addNotification(null, E('p', e.message)) })
-+			.finally(L.bind(function(btn, input) {
-+				btn.firstChild.data = _('Upload archive...');
-+			}, this, ev.target));
-+	},
-+
- 	handleRestoreConfirm: function(btn, ev) {
- 		return fs.exec('/sbin/sysupgrade', [ '--restore-backup', '/tmp/backup.tar.gz' ])
- 			.then(L.bind(function(btn, res) {
-@@ -169,6 +248,94 @@ return view.extend({
- 			.finally(function() { btn.firstChild.data = _('Upload archive...') });
- 	},
- 
-+	handleSelectiveRestoreConfirm: function(btn, ev) {
-+		// Get the selected files from the check-boxes
-+		var selectedFiles = Array.prototype.slice.call(document.querySelectorAll('input[name="file"]:checked'))
-+			.map(function(checkbox) { return checkbox.value; });
-+
-+		if (selectedFiles.length === 0) {
-+			ui.addNotification(null, E('p', _('No files selected for restoration')));
-+			return fs.remove('/tmp/backup.tar.gz').finally(ui.hideModal);
-+		}
-+
-+		btn.firstChild.data = _('Creating archive of selected files…');
-+
-+		// Write the selected file names into a temporary file for tar -T option
-+		var fileList = selectedFiles.join('\n');
-+		return fs.write('/tmp/filelist.txt', fileList)
-+			.then(L.bind(function() {
-+				// Make selective restore directory
-+			return fs.exec('/bin/mkdir', ['-p', '/tmp/selective_restore/']);
-+			}, this))
-+			.then(L.bind(function(mkdirRes) {
-+				if (mkdirRes.code != 0) {
-+					ui.addNotification(null, [
-+						E('p', _('Path creation failed with code %d').format(mkdirRes.code)),
-+						mkdirRes.stderr ? E('pre', {}, [ mkdirRes.stderr ]) : ''
-+					]);
-+					L.raise('Error', 'Path creation failed');
-+				}
-+				// Extract the tar.gz with only the selected files
-+				return fs.exec('/bin/tar', ['-xzf', '/tmp/backup.tar.gz', '-T', '/tmp/filelist.txt', '-C', '/tmp/selective_restore/']);
-+			}, this))
-+			.then(L.bind(function(tarRes) {
-+				if (tarRes.code != 0) {
-+					ui.addNotification(null, [
-+						E('p', _('Tar extraction failed with code %d').format(tarRes.code)),
-+						tarRes.stderr ? E('pre', {}, [ tarRes.stderr ]) : ''
-+					]);
-+					L.raise('Error', 'Tar extraction failed');
-+				}
-+				// Create the new tar.gz with only the selected files
-+				return fs.exec('/bin/tar', ['-czf', '/tmp/selective_restore.tar.gz', '-T', '/tmp/filelist.txt', '-C', '/tmp/selective_restore/']);
-+			}, this))
-+			.then(L.bind(function(tarRes) {
-+				if (tarRes.code != 0) {
-+					ui.addNotification(null, [
-+						E('p', _('The tar creation failed with code %d').format(tarRes.code)),
-+						tarRes.stderr ? E('pre', {}, [ tarRes.stderr ]) : ''
-+					]);
-+					L.raise('Error', 'Tar creation failed');
-+				}
-+
-+				// Now use sysupgrade with the newly created tar.gz
-+				return fs.exec('/sbin/sysupgrade', ['--restore-backup', '/tmp/selective_restore.tar.gz']);
-+			}, this))
-+			.then(L.bind(function(sysupgradeRes) {
-+				if (sysupgradeRes.code != 0) {
-+					ui.addNotification(null, [
-+						E('p', _('The sysupgrade command failed with code %d').format(sysupgradeRes.code)),
-+						sysupgradeRes.stderr ? E('pre', {}, [ sysupgradeRes.stderr ]) : ''
-+					]);
-+					L.raise('Error', 'Sysupgrade failed');
-+				}
-+
-+				// Proceed with reboot after successful restore
-+				btn.firstChild.data = _('Rebooting…');
-+				return fs.exec('/sbin/reboot');
-+			}, this))
-+			.then(L.bind(function(res) {
-+				if (res.code != 0) {
-+					ui.addNotification(null, E('p', _('The reboot command failed with code %d').format(res.code)));
-+					L.raise('Error', 'Reboot failed');
-+				}
-+
-+				// Show rebooting modal
-+				ui.showModal(_('Rebooting…'), [
-+					E('p', { 'class': 'spinning' }, _('The system is rebooting now. If the restored configuration changed the current LAN IP address, you might need to reconnect manually.'))
-+				]);
-+
-+				// Await reconnection
-+				ui.awaitReconnect(window.location.host, '192.168.1.1', 'openwrt.lan');
-+			}, this))
-+			.catch(function(e) { 
-+				ui.addNotification(null, E('p', e.message)); 
-+			})
-+			.finally(function() { 
-+				btn.firstChild.data = _('Upload archive...'); 
-+			});
-+	},
-+
- 	handleBlock: function(hostname, ev) {
- 		var mtdblock = dom.parent(ev.target, '.cbi-section').querySelector('[data-name="mtdselect"] select');
- 		var mtdnumber = mtdblock.value;
-@@ -414,6 +581,10 @@ return view.extend({
- 		o.inputtitle = _('Upload archive...');
- 		o.onclick = L.bind(this.handleRestore, this);
- 
-+		o = ss.option(form.Button, 'selective_restore', _('Selectively Restore backup'), _('Custom files (certificates, scripts) may remain on the system. To prevent this, perform a factory-reset first.'));
-+		o.inputstyle = 'action important';
-+		o.inputtitle = _('Upload archive...');
-+		o.onclick = L.bind(this.handleSelectiveRestore, this);
- 
- 		var mtdblocks = [];
- 		procmtd.split(/\n/).forEach(function(ln) {
-diff --git a/feeds/luci/modules/luci-mod-system/root/usr/share/rpcd/acl.d/luci-mod-system.json b/feeds/luci/modules/luci-mod-system/root/usr/share/rpcd/acl.d/luci-mod-system.json
-index b096d870a754..2991613ef1af 100644
---- a/feeds/luci/modules/luci-mod-system/root/usr/share/rpcd/acl.d/luci-mod-system.json
-+++ b/feeds/luci/modules/luci-mod-system/root/usr/share/rpcd/acl.d/luci-mod-system.json
-@@ -149,6 +149,9 @@
- 			"cgi-io": [ "upload" ],
- 			"file": {
- 				"/bin/tar -tzf /tmp/backup.tar.gz": [ "exec" ],
-+				"/bin/mkdir -p /tmp/selective_restore/": [ "exec" ],
-+				"/bin/tar -xzf /tmp/backup.tar.gz -T /tmp/filelist.txt -C /tmp/selective_restore/": [ "exec" ],
-+				"/bin/tar -czf /tmp/selective_restore.tar.gz -T /tmp/filelist.txt -C /tmp/selective_restore/": [ "exec" ],
- 				"/etc/sysupgrade.conf": [ "write" ],
- 				"/sbin/firstboot -r -y": [ "exec" ],
- 				"/sbin/reboot": [ "exec" ],
-@@ -162,8 +165,10 @@
- 				"/sbin/sysupgrade -u /tmp/firmware.bin": [ "exec" ],
- 				"/sbin/sysupgrade -u -k /tmp/firmware.bin": [ "exec" ],
- 				"/sbin/sysupgrade --restore-backup /tmp/backup.tar.gz": [ "exec" ],
-+				"/sbin/sysupgrade --restore-backup /tmp/selective_restore.tar.gz": [ "exec" ],
- 				"/sbin/sysupgrade --test /tmp/firmware.bin": [ "exec" ],
- 				"/sbin/sysupgrade /tmp/firmware.bin": [ "exec" ],
-+				"/tmp/filelist.txt": [ "write" ],
- 				"/tmp/backup.tar.gz": [ "write" ],
- 				"/tmp/firmware.bin": [ "write" ]
- 			},
-diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade
-index 75817d178aea18..4a51304f771e20 100755
---- a/package/base-files/files/sbin/sysupgrade
-+++ b/package/base-files/files/sbin/sysupgrade
-@@ -22,6 +22,8 @@ CONF_BACKUP_LIST=0
- CONF_BACKUP_LIST=0
- CONF_BACKUP=
- CONF_RESTORE=
-+CONF_SELECTIVE_RESTORE=
-+CONF_SELECTIVE_RESTORE_FILELIST=
- NEED_IMAGE=
- HELP=0
- TEST=0
-@@ -51,6 +53,7 @@ while [ -n "$1" ]; do
- 		-u) SKIP_UNCHANGED=1;;
- 		-b|--create-backup) CONF_BACKUP="$2" NEED_IMAGE=1; shift;;
- 		-r|--restore-backup) CONF_RESTORE="$2" NEED_IMAGE=1; shift;;
-+		-S|--selectively-restore-backup) CONF_SELECTIVE_RESTORE_FILELIST="$2" CONF_SELECTIVE_RESTORE="$3" NEED_IMAGE=1; shift;shift;;
- 		-l|--list-backup) CONF_BACKUP_LIST=1;;
- 		-f) CONF_IMAGE="$2"; shift;;
- 		-s) USE_CURR_PART=1;;
-@@ -105,6 +108,11 @@ backup-command:
- 	             restore a .tar.gz created with sysupgrade -b
- 	             then exit. Does not flash an image. If file is '-',
- 	             the archive is read from stdin.
-+	-S | --selectively-restore-backup <file-with-list-of-filenames> <file>
-+	             selectively restore a .tar.gz created with sysupgrade -b
-+	             by passing a file containing the desired list of filenames,
-+	             then exit. Does not flash an image. If file is '-',
-+	             the archive is read from stdin.
- 	-l | --list-backup
- 	             list the files that would be backed up when calling
- 	             sysupgrade -b. Does not create a backup file.
-@@ -351,6 +359,22 @@ if [ -n "$CONF_RESTORE" ]; then
- 	exit $?
- fi
- 
-+if [ -n "$CONF_SELECTIVE_RESTORE" ]; then
-+	if [ "$CONF_SELECTIVE_RESTORE" != "-" ] && [ ! -f "$CONF_SELECTIVE_RESTORE" ]; then
-+		echo "Backup archive '$CONF_SELECTIVE_RESTORE' not found." >&2
-+		exit 1
-+	fi
-+
-+	[ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V=""
-+	v "Selectively restoring config files..."
-+	if [ "$(type -t platform_restore_backup)" = 'platform_restore_backup' ]; then
-+		platform_selectively_restore_backup "$TAR_V"
-+	else
-+		tar -C / -x"${TAR_V}"zf "$CONF_SELECTIVE_RESTORE" -T "$CONF_SELECTIVE_RESTORE_FILELIST"
-+	fi
-+	exit $?
-+fi
-+
- type platform_check_image >/dev/null 2>/dev/null || {
- 	echo "Firmware upgrade is not implemented for this platform." >&2
- 	exit 1
-diff --git a/target/linux/bcm27xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm27xx/base-files/lib/upgrade/platform.sh
-index 69cc60e2bcb095..b7fffd68b4b450 100644
---- a/target/linux/bcm27xx/base-files/lib/upgrade/platform.sh
-+++ b/target/linux/bcm27xx/base-files/lib/upgrade/platform.sh
-@@ -128,3 +128,10 @@ platform_restore_backup() {
- 	tar -C / -x${TAR_V}zf "$CONF_RESTORE"
- 	bcm27xx_set_root_part
- }
-+
-+platform_selectively_restore_backup() {
-+	local TAR_V=$1
-+
-+	tar -C / -x${TAR_V}zf "$CONF_RESTORE" -T "$CONF_SELECTIVE_RESTORE_FILELIST"
-+	bcm27xx_set_root_part
-+}

+ 0 - 282
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts

@@ -1,282 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-
-/dts-v1/;
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-
-#include "mt7981.dtsi"
-
-/ {
-	model = "Nokia EA0326GMP";
-	compatible = "nokia,ea0326gmp", "mediatek,mt7981";
-
-	aliases {
-		serial0 = &uart0;
-
-		led-boot = &led_power;
-		led-failsafe = &led_power;
-		led-running = &led_power;
-		led-upgrade = &led_power;
-		label-mac-device = &gmac1;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	memory {
-		reg = <0 0x40000000 0 0x10000000>;
-	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-
-		reset {
-			label = "reset";
-			linux,code = <KEY_RESTART>;
-			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-		};
-
-		wps {
-			label = "wps";
-			linux,code = <KEY_WPS_BUTTON>;
-			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
-		};
-	};
-
-	leds {
-		compatible = "gpio-leds";
-
-		led_power: power {
-			label = "green:power";
-			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
-		};
-
-		wan_green {
-			label = "green:wan";
-			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
-		};
-
-		wan_red {
-			label = "red:wan";
-			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
-		};
-
-		lan {
-			label = "green:lan";
-			gpios = <&pio 7 GPIO_ACTIVE_LOW>;
-		};
-
-		wifi {
-			label = "green:wifi";
-			gpios = <&pio 8 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-
-		wps {
-			label = "green:wps";
-			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
-		};
-	};
-};
-
-&eth {
-	status = "okay";
-
-	gmac0: mac@0 {
-		compatible = "mediatek,eth-mac";
-		reg = <0>;
-		phy-mode = "2500base-x";
-
-		nvmem-cells = <&macaddr_factory_28 0>;
-		nvmem-cell-names = "mac-address";
-
-		fixed-link {
-			speed = <2500>;
-			full-duplex;
-			pause;
-		};
-	};
-
-	gmac1: mac@1 {
-		compatible = "mediatek,eth-mac";
-		reg = <1>;
-		phy-mode = "gmii";
-		phy-handle = <&int_gbe_phy>;
-
-		nvmem-cells = <&macaddr_factory_28 3>;
-		nvmem-cell-names = "mac-address";
-	};
-};
-
-&mdio_bus {
-	switch: switch@0 {
-		compatible = "mediatek,mt7531";
-		reg = <31>;
-		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-		interrupt-parent = <&pio>;
-		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
-	};
-};
-
-&spi0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi0_flash_pins>;
-	status = "okay";
-
-	spi_nand@0 {
-		compatible = "spi-nand";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		reg = <0>;
-
-		spi-max-frequency = <52000000>;
-		spi-tx-bus-width = <4>;
-		spi-rx-bus-width = <4>;
-
-		mediatek,nmbm;
-		mediatek,bmt-max-ratio = <1>;
-		mediatek,bmt-max-reserved-blocks = <64>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition@0 {
-				label = "BL2";
-				reg = <0x0000000 0x0100000>;
-				read-only;
-			};
-
-			partition@100000 {
-				label = "u-boot-env";
-				reg = <0x0100000 0x0080000>;
-			};
-
-			factory: partition@180000 {
-				label = "Factory";
-				reg = <0x0180000 0x0200000>;
-				read-only;
-			};
-
-			partition@380000 {
-				label = "FIP";
-				reg = <0x0380000 0x0200000>;
-				read-only;
-			};
-
-			partition@580000 {
-				label = "Config";
-				reg = <0x0580000 0x0200000>;
-				read-only;
-			};
-
-			partition@780000 {
-				label = "Config2";
-				reg = <0x0780000 0x0200000>;
-				read-only;
-			};
-
-			partition@980000 {
-				compatible = "linux,ubi";
-				label = "ubi";
-				reg = <0x980000 0x6e00000>;
-
-				volumes {
-					ubi_rootdisk: ubi-volume-fit {
-						volname = "fit";
-					};
-				};
-			};
-		};
-	};
-};
-
-&switch {
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port@1 {
-			reg = <1>;
-			label = "lan1";
-		};
-
-		port@2 {
-			reg = <2>;
-			label = "lan2";
-		};
-
-		port@3 {
-			reg = <3>;
-			label = "lan3";
-		};
-
-		port@6 {
-			reg = <6>;
-			label = "cpu";
-			ethernet = <&gmac0>;
-			phy-mode = "2500base-x";
-
-			fixed-link {
-				speed = <2500>;
-				full-duplex;
-				pause;
-			};
-		};
-	};
-};
-
-&pio {
-	spi0_flash_pins: spi0-pins {
-		mux {
-			function = "spi";
-			groups = "spi0", "spi0_wp_hold";
-		};
-
-		conf-pu {
-			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
-		};
-
-		conf-pd {
-			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
-		};
-	};
-};
-
-&uart0 {
-	status = "okay";
-};
-
-&watchdog {
-	status = "okay";
-};
-
-&wifi {
-	status = "okay";
-
-	mediatek,mtd-eeprom = <&factory 0x0>;
-	nvmem-cells = <&macaddr_factory_28 1>;
-	nvmem-cell-names = "mac-address";
-};
-
-&factory {
-	nvmem-layout {
-		compatible = "fixed-layout";
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		macaddr_factory_28: macaddr@28 {
-			compatible = "mac-base";
-			reg = <0x28 0x6>;
-			#nvmem-cell-cells = <1>;
-		};
-	};
-};

+ 8 - 12
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts

@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -26,6 +27,7 @@
 
 	memory@40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
@@ -243,7 +245,7 @@
 		mediatek,nmbm;
 		mediatek,bmt-max-ratio = <1>;
 		mediatek,bmt-max-reserved-blocks = <64>;
-		
+
 		partitions {
 			compatible = "fixed-partitions";
 			#address-cells = <1>;
@@ -294,12 +296,6 @@
 				label = "ubi";
 				reg = <0x0580000 0x7280000>;
 				compatible = "linux,ubi";
-
-				volumes {
-					ubi_rootdisk: ubi-volume-fit {
-						volname = "fit";
-					};
-				};
 			};
 		};
 	};
@@ -313,13 +309,13 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-disable; /* bias-disable */
 		};
 	};
 
@@ -336,7 +332,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };

+ 37 - 0
devices/mediatek_filogic/patches/20-ea0326gmp.patch

@@ -21,3 +21,40 @@
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
  endef
  TARGET_DEVICES += nokia_ea0326gmp
+
+--- a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
++++ b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
+@@ -20,7 +20,6 @@
+ 	};
+ 
+ 	chosen {
+-		rootdisk = <&ubi_rootdisk>;
+ 		stdout-path = "serial0:115200n8";
+ 	};
+ 
+@@ -164,6 +163,10 @@
+ 		spi-tx-bus-width = <4>;
+ 		spi-rx-bus-width = <4>;
+ 
++		mediatek,nmbm;
++		mediatek,bmt-max-ratio = <1>;
++		mediatek,bmt-max-reserved-blocks = <64>;
++
+ 		partitions {
+ 			compatible = "fixed-partitions";
+ 			#address-cells = <1>;
+@@ -223,13 +226,7 @@
+ 			partition@980000 {
+ 				compatible = "linux,ubi";
+ 				label = "ubi";
+-				reg = <0x980000 0x7680000>;
+-
+-				volumes {
+-					ubi_rootdisk: ubi-volume-fit {
+-						volname = "fit";
+-					};
+-				};
++				reg = <0x980000 0x6e00000>;
+ 			};
+ 		};
+ 	};

+ 1 - 1
devices/qualcommax_ipq60xx/diy.sh

@@ -22,6 +22,6 @@ git clone https://github.com/qosmio/sqm-scripts-nss.git package/sqm-scripts-nss
 
 sed -i "/ECM_INTERFACE_RAWIP_ENABLE/d"  package/nss-packages/qca-nss-ecm/Makefile
 
-rm -rf feeds/kiddin9/{xtables-wgobfs,shortcut-fe} package/devel/perf package/feeds/packages/{ovpn-dco,xr_usb_serial_common,openvswitch,xtables-addons}
+rm -rf feeds/kiddin9/{xtables-wgobfs,shortcut-fe} package/devel/perf package/feeds/packages/{ovpn-dco,xr_usb_serial_common,openvswitch,xtables-addons} package/kernel/r8152
 
 sed -i "s/luci uboot-envtools wpad-openssl/luci uboot-envtools wpad-mbedtls/" target/linux/qualcommax/Makefile

+ 2 - 3
devices/rockchip_armv8/diy.sh

@@ -9,8 +9,7 @@ rm -rf package/boot target/linux/rockchip target/linux/generic
 
 git_clone_path master https://github.com/coolsnowwolf/lede target/linux/rockchip target/linux/generic package/boot
 
-wget -N https://github.com/istoreos/istoreos/raw/istoreos-22.03/target/linux/rockchip/patches-5.10/305-r2s-pwm-fan.patch -P target/linux/rockchip/patches-6.6/
-wget -N https://github.com/openwrt/openwrt/raw/refs/heads/openwrt-24.10/target/linux/rockchip/Makefile -P target/linux/rockchip/
+wget -N https://github.com/istoreos/istoreos/raw/refs/heads/istoreos-23.05/target/linux/rockchip/patches-5.15/305-r2s-pwm-fan.patch -P target/linux/rockchip/patches-6.6/
 
 wget -N https://github.com/coolsnowwolf/lede/raw/master/include/kernel-6.6 -P include/
 
@@ -32,7 +31,7 @@ rm -rf target/linux/rockchip/armv8/base-files/etc/uci-defaults/13_opkg_update pa
 sed -i -e 's,kmod-r8168,kmod-r8169,g' target/linux/rockchip/image/armv8.mk
 sed -i -e 's,wpad-openssl,wpad-basic-mbedtls,g' target/linux/rockchip/image/armv8.mk
 
-sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-drm-rockchip/' target/linux/rockchip/Makefile
+sed -i -e 's/6.12/6.6/' -e 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-drm-rockchip luci-app-diskman/' -e 's/autocore-arm/autocore/' target/linux/rockchip/Makefile
 
 cp -Rf $SHELL_FOLDER/diy/* ./
 

+ 0 - 55
devices/rockchip_armv8/diy/target/linux/rockchip/patches-6.6/304-r4s-pwm-fan.patch

@@ -1,55 +0,0 @@
-From 930d10b5a37004c428ad1c9747a1424e85567e3f Mon Sep 17 00:00:00 2001
-From: jjm2473 <[email protected]>
-Date: Wed, 15 Mar 2023 16:18:26 +0800
-Subject: [PATCH] rockchip: add pwm-fan for R4S(E)
-
----
- .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   | 36 +++++++++++++++++++
- .../boot/dts/rockchip/rk3399-nanopi-r4se.dts  | 36 +++++++++++++++++++
- 2 files changed, 72 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
-@@ -69,6 +69,42 @@
- 		regulator-always-on;
- 		regulator-boot-on;
- 	};
-+
-+        fan: pwm-fan {
-+                compatible = "pwm-fan";
-+                cooling-levels = <0 18 102 170 255>;
-+                #cooling-cells = <2>;
-+                fan-supply = <&vdd_5v>;
-+                pwms = <&pwm1 0 50000 0>;
-+        };
-+};
-+
-+&cpu_thermal {
-+        trips {
-+                cpu_warm: cpu_warm {
-+                        temperature = <55000>;
-+                        hysteresis = <2000>;
-+                        type = "active";
-+                };
-+
-+                cpu_hot: cpu_hot {
-+                        temperature = <65000>;
-+                        hysteresis = <2000>;
-+                        type = "active";
-+                };
-+        };
-+
-+        cooling-maps {
-+                map2 {
-+                        trip = <&cpu_warm>;
-+                        cooling-device = <&fan THERMAL_NO_LIMIT 1>;
-+                };
-+
-+                map3 {
-+                        trip = <&cpu_hot>;
-+                        cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
-+                };
-+        };
- };
- 
- &emmc_phy {

+ 1 - 1
devices/rockchip_armv8/patches/nanopi-zero2.patch

@@ -32,7 +32,7 @@
 +		export TOPDIR=$(TOPDIR); \
 +		export MORE=$(MORE); \
 +		export ROOTFS_PARTSIZE=$(shell echo $$(($(ROOTFS_PARTSIZE)/1024/1024))); \
-+		cd /data/packit/friendlywrt23-rk3528; \
++		cd /data/packit/friendlywrt24-rk3528; \
 +		. ~/packit/packit_nanopi.sh; \
 +	fi
 +endef

+ 61 - 0
devices/rockchip_armv8/patches/r4s-fan.patch

@@ -0,0 +1,61 @@
+diff --git a/target/linux/rockchip/patches-6.6/304-r4s-pwm-fan.patch b/target/linux/rockchip/patches-6.6/304-r4s-pwm-fan.patch
+new file mode 100644
+index 000000000000..546ca54589c2
+--- /dev/null
++++ b/target/linux/rockchip/patches-6.6/304-r4s-pwm-fan.patch
+@@ -0,0 +1,55 @@
++From 930d10b5a37004c428ad1c9747a1424e85567e3f Mon Sep 17 00:00:00 2001
++From: jjm2473 <[email protected]>
++Date: Wed, 15 Mar 2023 16:18:26 +0800
++Subject: [PATCH] rockchip: add pwm-fan for R4S(E)
++
++---
++ .../boot/dts/rockchip/rk3399-nanopi-r4s.dts   | 36 +++++++++++++++++++
++ .../boot/dts/rockchip/rk3399-nanopi-r4se.dts  | 36 +++++++++++++++++++
++ 2 files changed, 72 insertions(+)
++
++--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+++++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
++@@ -69,6 +69,42 @@
++ 		regulator-always-on;
++ 		regulator-boot-on;
++ 	};
+++
+++        fan: pwm-fan {
+++                compatible = "pwm-fan";
+++                cooling-levels = <0 18 102 170 255>;
+++                #cooling-cells = <2>;
+++                fan-supply = <&vdd_5v>;
+++                pwms = <&pwm1 0 50000 0>;
+++        };
+++};
+++
+++&cpu_thermal {
+++        trips {
+++                cpu_warm: cpu_warm {
+++                        temperature = <55000>;
+++                        hysteresis = <2000>;
+++                        type = "active";
+++                };
+++
+++                cpu_hot: cpu_hot {
+++                        temperature = <65000>;
+++                        hysteresis = <2000>;
+++                        type = "active";
+++                };
+++        };
+++
+++        cooling-maps {
+++                map2 {
+++                        trip = <&cpu_warm>;
+++                        cooling-device = <&fan THERMAL_NO_LIMIT 1>;
+++                };
+++
+++                map3 {
+++                        trip = <&cpu_hot>;
+++                        cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
+++                };
+++        };
++ };
++ 
++ &emmc_phy {