Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled

This commit is contained in:
domenico
2025-06-24 12:51:15 +02:00
commit 27c9d80f51
10493 changed files with 1885777 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#!/bin/sh
. /lib/functions.sh
case $(board_name) in
ctera,c200-v1)
part=$(find_mtd_part "active_bank")
if [ -n "$part" ]; then
active_bank="$(strings $part | grep bank)"
if [ $active_bank = "bank1" ]; then
echo "bank2" > /tmp/change_bank
else
echo "bank1" > /tmp/change_bank
fi
mtd write /tmp/change_bank active_bank
reboot
else
echo "active_bank partition missed!"
return 1
fi
;;
*)
echo "Unsupported hardware."
;;
esac

View File

@@ -0,0 +1,23 @@
#!/bin/sh
CPU_TEMP=$(cut -c1-2 /sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-0048/hwmon/hwmon?/temp1_input)
CPU_LOW=45
CPU_MID=50
CPU_HIGH=55
if [ ! -e /sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-001b/hwmon/hwmon?/pwm1 ]; then
exit 0
else
FAN_CTRL=$(ls /sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-001b/hwmon/hwmon?/pwm1)
fi
if [ "$CPU_TEMP" -ge "$CPU_HIGH" ]; then
echo "255" > $FAN_CTRL
elif [ "$CPU_TEMP" -ge "$CPU_MID" ]; then
echo "100" > $FAN_CTRL
elif [ "$CPU_TEMP" -ge "$CPU_LOW" ]; then
echo "50" > $FAN_CTRL
else
echo "0" > $FAN_CTRL
fi