From 813b353ad855939e2bf9beaf0092f20de566a78e Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Sat, 26 Feb 2022 12:15:38 +0800 Subject: [PATCH] int --- diy/10_system.js | 111 -------------------- diy/4.19Makefile | 36 ------- diy/banner | 16 +-- diy/{R2Sdiffconfig => nanopi-r2sdiffconfig} | 0 diy/{R4Sdiffconfig => nanopi-r4sdiffconfig} | 0 5 files changed, 8 insertions(+), 155 deletions(-) delete mode 100755 diy/10_system.js delete mode 100755 diy/4.19Makefile rename diy/{R2Sdiffconfig => nanopi-r2sdiffconfig} (100%) rename diy/{R4Sdiffconfig => nanopi-r4sdiffconfig} (100%) diff --git a/diy/10_system.js b/diy/10_system.js deleted file mode 100755 index 8535478d3..000000000 --- a/diy/10_system.js +++ /dev/null @@ -1,111 +0,0 @@ -'use strict'; -'require baseclass'; -'require fs'; -'require rpc'; - -var callSystemBoard = rpc.declare({ - object: 'system', - method: 'board' -}); - -var callSystemInfo = rpc.declare({ - object: 'system', - method: 'info' -}); - -var callCPUBench = rpc.declare({ - object: 'luci', - method: 'getCPUBench' -}); - -var callCPUUsage = rpc.declare({ - object: 'luci', - method: 'getCPUUsage' -}); - -return baseclass.extend({ - title: _('System'), - - load: function() { - return Promise.all([ - L.resolveDefault(callSystemBoard(), {}), - L.resolveDefault(callSystemInfo(), {}), - L.resolveDefault(callCPUBench(), {}), - L.resolveDefault(callCPUUsage(), {}), - fs.lines('/usr/lib/lua/luci/version.lua') - ]); - }, - - render: function(data) { - var boardinfo = data[0], - systeminfo = data[1], - cpubench = data[2], - cpuusage = data[3], - luciversion = data[4]; - - luciversion = luciversion.filter(function(l) { - return l.match(/^\s*(luciname|luciversion)\s*=/); - }).map(function(l) { - return l.replace(/^\s*\w+\s*=\s*['"]([^'"]+)['"].*$/, '$1'); - }).join(' '); - - var datestr = null; - - if (systeminfo.localtime) { - var date = new Date(systeminfo.localtime * 1000); - - datestr = '%04d-%02d-%02d %02d:%02d:%02d'.format( - date.getUTCFullYear(), - date.getUTCMonth() + 1, - date.getUTCDate(), - date.getUTCHours(), - date.getUTCMinutes(), - date.getUTCSeconds() - ); - } - - // TODO: This is ugly - var projectlink = document.createElement('a'); - projectlink.append('kenzo'); - projectlink.href = 'https://github.com/kenzok8'; - projectlink.target = '_blank'; - - var corelink = document.createElement('a'); - corelink.append('openwrt_Build'); - corelink.href = 'https://github.com/kenzok8/openwrt_Build'; - corelink.target = '_blank'; - - var sourcelink = document.createElement('placeholder'); - sourcelink.append(projectlink); - sourcelink.append(' / '); - sourcelink.append(corelink); - - var fields = [ - _('Hostname'), boardinfo.hostname, - _('Model'), boardinfo.model + cpubench.cpubench, - _('Architecture'), boardinfo.system, - _('Firmware Version'), (L.isObject(boardinfo.release) ? boardinfo.release.description + ' / ' : '') + (luciversion || ''), - _('Kernel Version'), boardinfo.kernel, - _('Local Time'), datestr, - _('Uptime'), systeminfo.uptime ? '%t'.format(systeminfo.uptime) : null, - _('Load Average'), Array.isArray(systeminfo.load) ? '%.2f, %.2f, %.2f'.format( - systeminfo.load[0] / 65535.0, - systeminfo.load[1] / 65535.0, - systeminfo.load[2] / 65535.0 - ) : null, - _('CPU usage (%)'), cpuusage.cpuusage, - _('Source Code'), sourcelink - ]; - - var table = E('table', { 'class': 'table' }); - - for (var i = 0; i < fields.length; i += 2) { - table.appendChild(E('tr', { 'class': 'tr' }, [ - E('td', { 'class': 'td left', 'width': '33%' }, [ fields[i] ]), - E('td', { 'class': 'td left' }, [ (fields[i + 1] != null) ? fields[i + 1] : '?' ]) - ])); - } - - return table; - } -}); diff --git a/diy/4.19Makefile b/diy/4.19Makefile deleted file mode 100755 index 5afb49182..000000000 --- a/diy/4.19Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# -include $(TOPDIR)/rules.mk - -ARCH:=i386 -BOARD:=x86 -BOARDNAME:=x86 -FEATURES:=squashfs vdi vmdk pcmcia fpu boot-part rootfs-part -SUBTARGETS:=64 generic legacy geode - -KERNEL_PATCHVER:=4.19 -KERNEL_TESTING_PATCHVER:=4.19 - -KERNELNAME:=bzImage - -include $(INCLUDE_DIR)/target.mk - -DEFAULT_PACKAGES += partx-utils mkf2fs fdisk e2fsprogs wpad kmod-usb-hid kmod-mmc-spi kmod-sdhci \ -kmod-ath5k kmod-ath9k kmod-ath9k-htc kmod-ath10k kmod-rt2800-usb kmod-e1000e kmod-igb kmod-igbvf kmod-ixgbe kmod-pcnet32 kmod-tulip kmod-vmxnet3 kmod-i40e kmod-i40evf kmod-r8125 kmod-8139cp kmod-8139too kmod-fs-f2fs \ -htop lm-sensors autocore-x86 automount autosamba luci-app-adbyby-plus luci-app-ipsec-vpnd luci-proto-bonding luci-app-unblockmusic luci-app-zerotier luci-app-xlnetacc ddns-scripts_aliyun ddns-scripts_dnspod ca-certificates \ -ath10k-firmware-qca988x ath10k-firmware-qca9888 ath10k-firmware-qca9984 brcmfmac-firmware-43602a1-pcie \ -kmod-sound-hda-core kmod-sound-hda-codec-realtek kmod-sound-hda-codec-via kmod-sound-via82xx kmod-sound-hda-intel kmod-sound-hda-codec-hdmi kmod-sound-i8x0 kmod-usb-audio \ -kmod-usb-net kmod-usb-net-asix kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8150 kmod-usb-net-rtl8152 kmod-r8168 kmod-mlx4-core kmod-mlx5-core kmod-drm-amdgpu - -$(eval $(call BuildTarget)) - -$(eval $(call $(if $(CONFIG_ISO_IMAGES),SetupHostCommand,Ignore),mkisofs, \ - Please install mkisofs. , \ - mkisofs -v 2>&1 , \ - genisoimage -v 2>&1 | grep genisoimage, \ - xorrisofs -v 2>&1 | grep xorriso \ -)) diff --git a/diy/banner b/diy/banner index 5bc33d593..6da9f9932 100755 --- a/diy/banner +++ b/diy/banner @@ -1,8 +1,8 @@ - __ - ___ ___ ___ ___ _ ______/ /_ -/ _ \/ _ \/ -_) _ \ |/|/ / __/ __/ -\___/ .__/\__/_//_/__,__/_/ \__/ - /_/ - -------------------------------- - %D %V, by kenzo - -------------------------------- + __ + ___ ___ ___ ___ _ ______/ /_ + / _ \/ _ \/ -_) _ \ |/|/ / __/ __/ + \___/ .__/\__/_//_/__,__/_/ \__/ + /_/ + -------------------------------- + %D %C by kenzo' + -------------------------------- diff --git a/diy/R2Sdiffconfig b/diy/nanopi-r2sdiffconfig similarity index 100% rename from diy/R2Sdiffconfig rename to diy/nanopi-r2sdiffconfig diff --git a/diy/R4Sdiffconfig b/diy/nanopi-r4sdiffconfig similarity index 100% rename from diy/R4Sdiffconfig rename to diy/nanopi-r4sdiffconfig