From 8db06901f83910131643b33942f47be99e4ce8d9 Mon Sep 17 00:00:00 2001 From: nagumii Date: Sat, 18 Jan 2025 01:04:10 +0200 Subject: [PATCH] More sysinfo stuff --- .../rootfs_uclibc_rv1106/usr/local/bin/femto-config | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config index 6ca5aa8..d1b111d 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config @@ -206,8 +206,9 @@ logging() { # at some point this will be moved to a different script, and have many functions instead of one giant dump system_info() { - local cpu_architecture="armv7l (armhf 32bit)" - local cpu_model="Rockchip rv1103 (rev$(awk '/CPU revision/ {print $4}' /proc/cpuinfo))" + local cpu_architecture="$(uname -m) ($(dpkg --print-architecture) $(python3 -c "import platform; print(platform.architecture()[0])"))" + local cpu_model="$(dmesg | grep "soc_id" | sed -n 's/.*soc_id: //p')" + local cpu_temp="$(echo "scale=1; $(cat /sys/class/thermal/thermal_zone0/temp) / 1000" | bc)°C" local cpu_serial="$(awk '/Serial/ {print $3}' /proc/cpuinfo)" local cpu_speed="$(lscpu | grep "CPU min MHz" | awk '{print int($4)}') - $(lscpu | grep "CPU max MHz" | awk '{print int($4)}')mhz" local microsd_size="$(df -h / | awk 'NR==2 {printf "%s (%.0f%% free)", $4, (100 - $5+0)}')" @@ -236,7 +237,7 @@ system_info() { echo -e "\ Femtofox\n\ -Core: Luckfox Pico Mini\n\ +Core: $(cat /sys/firmware/devicetree/base/model)\n\ Operating System: $os_version\n\ Kernel version: $(uname -r)\n\ Uptime: $system_uptime\n\ @@ -249,8 +250,9 @@ K boot modules: $boot_modules\n\ Architecture: $cpu_architecture\n\ Model: $cpu_model\n\ Serial # $cpu_serial\n\ -Cores: 1\n\ +Cores: $(nproc)\n\ Speed: $cpu_speed\n\ +Temperature: $cpu_temp \n\ Storage:\n\ microSD size: $microsd_size\n\