mirror of
https://github.com/Heleguo/lede.git
synced 2025-12-16 19:01:32 +00:00
loongarch64: add squashfs image support
This commit is contained in:
parent
96e8d60f7f
commit
ea6ed2801e
@ -68,13 +68,15 @@ endif
|
|||||||
$(CP) ./files/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
$(CP) ./files/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/autocore-autocore-loongarch64/install
|
define Package/autocore-loongarch64/install
|
||||||
$(INSTALL_DIR) $(1)/etc
|
$(INSTALL_DIR) $(1)/etc
|
||||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/loongarch64/autocore $(1)/etc/init.d/autocore
|
||||||
$(INSTALL_BIN) ./files/60-autocore-reload-rpcd $(1)/etc/uci-defaults/
|
$(INSTALL_BIN) ./files/60-autocore-reload-rpcd $(1)/etc/uci-defaults/
|
||||||
$(INSTALL_DIR) $(1)/sbin
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
$(INSTALL_BIN) ./files/arm/sbin/cpuinfo $(1)/sbin/cpuinfo
|
$(INSTALL_BIN) ./files/loongarch64/sbin/cpuinfo $(1)/sbin/cpuinfo
|
||||||
$(INSTALL_BIN) ./files/arm/sbin/tempinfo $(1)/sbin/tempinfo
|
$(INSTALL_BIN) ./files/loongarch64/sbin/tempinfo $(1)/sbin/tempinfo
|
||||||
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
|
||||||
$(CP) ./files/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
$(CP) ./files/luci-mod-status-autocore.json $(1)/usr/share/rpcd/acl.d/
|
||||||
endef
|
endef
|
||||||
|
|||||||
@ -2,6 +2,4 @@
|
|||||||
|
|
||||||
MHz=`grep 'MHz' /proc/cpuinfo | cut -c13- |sed -n '1p'`
|
MHz=`grep 'MHz' /proc/cpuinfo | cut -c13- |sed -n '1p'`
|
||||||
|
|
||||||
TEMP=`awk '{printf("%.1f¡ãC", $0 / 1000)}' "/sys/class/thermal/thermal_zone0/temp" 2>"/dev/null"`
|
echo "$MHz MHz"
|
||||||
|
|
||||||
echo "$MHz MHz $TEMP "
|
|
||||||
|
|||||||
45
package/lean/autocore/files/loongarch64/sbin/ethinfo
Normal file
45
package/lean/autocore/files/loongarch64/sbin/ethinfo
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/lua
|
||||||
|
-- Copyright (C) 2022 ImmortalWrt.org
|
||||||
|
|
||||||
|
local util = require "luci.util"
|
||||||
|
local jsonc = require "luci.jsonc"
|
||||||
|
|
||||||
|
local eth_info = {}
|
||||||
|
local ifname, stat
|
||||||
|
|
||||||
|
for ifname, stat in pairs(util.ubus("network.device", "status")) do
|
||||||
|
while true do
|
||||||
|
if (ifname:match("^(br-.+)$")) == ifname then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
local status, speed, duplex
|
||||||
|
|
||||||
|
if(stat.speed ~= nil) then
|
||||||
|
status = stat.carrier and 1 or 0
|
||||||
|
|
||||||
|
if stat.speed:sub(1, 1) == "-" then
|
||||||
|
speed = " - "
|
||||||
|
else
|
||||||
|
speed = stat.speed:sub(1, -2) .. "Mb/s"
|
||||||
|
end
|
||||||
|
|
||||||
|
if stat.carrier and stat.speed:sub(-1) == "F" then
|
||||||
|
duplex = 1
|
||||||
|
else
|
||||||
|
duplex = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
eth_info[#eth_info+1] = { name = ifname, status = status,
|
||||||
|
speed = speed, duplex = duplex }
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
table.sort(eth_info,
|
||||||
|
function(a, b)
|
||||||
|
return a.name < b.name
|
||||||
|
end)
|
||||||
|
|
||||||
|
print(jsonc.stringify(eth_info))
|
||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
TEMP=`awk '{printf("%.1f¡ãC", $0 / 1000)}' "/sys/class/thermal/thermal_zone0/temp" 2>"/dev/null"`
|
TEMP=`awk '{printf("%.1f°C", $0 / 1000)}' "/sys/class/thermal/thermal_zone0/temp" 2>"/dev/null"`
|
||||||
|
|
||||||
echo "$TEMP "
|
echo "$TEMP "
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=fstools
|
PKG_NAME:=fstools
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
--- a/libfstools/common.h
|
||||||
|
+++ b/libfstools/common.h
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
#include "libfstools.h"
|
||||||
|
#include "volume.h"
|
||||||
|
|
||||||
|
-#define F2FS_MINSIZE (100ULL * 1024ULL * 1024ULL)
|
||||||
|
+#define F2FS_MINSIZE (1024ULL * 1024ULL * 1024ULL)
|
||||||
|
|
||||||
|
int read_uint_from_file(char *dirname, char *filename, unsigned int *i);
|
||||||
|
char *read_string_from_file(const char *dirname, const char *filename, char *buf, size_t bufsz);
|
||||||
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
ARCH:=loongarch64
|
ARCH:=loongarch64
|
||||||
BOARD:=loongarch64
|
BOARD:=loongarch64
|
||||||
BOARDNAME:=Loongson LoongArch
|
BOARDNAME:=Loongson LoongArch
|
||||||
FEATURES:=audio display ext4 pcie boot-part rootfs-part rtc usb targz
|
FEATURES:=squashfs audio display ext4 pcie boot-part rootfs-part rtc usb targz
|
||||||
SUBTARGETS:=generic
|
SUBTARGETS:=generic
|
||||||
|
|
||||||
KERNEL_PATCHVER:=6.12
|
KERNEL_PATCHVER:=6.12
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user