Skip to content

Commit

Permalink
Try to be compatible with upstream conventions for thermal readouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kaiser committed May 4, 2018
1 parent 17e83dd commit 8621680
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/bsp/common/etc/init.d/armhwinfo
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ prepare_temp_monitoring() {
if [[ -d "/sys/devices/platform/a20-tp-hwmon" ]]; then
# sun7i legacy
ln -fs /sys/devices/platform/a20-tp-hwmon/temp1_input /etc/armbianmonitor/datasources/soctemp
elif [[ -d /sys/class/hwmon/hwmon0/temp1_input ]]; then
# usual convention with modern kernels
ln -fs /sys/class/hwmon/hwmon0/temp1_input /etc/armbianmonitor/datasources/soctemp
else
# all other boards/kernels use the same sysfs node except of Actions Semi S500:
[[ ${BOARDFAMILY} == s500 ]] && THERMAL_ZONE="thermal_zone1" || THERMAL_ZONE="thermal_zone0"
Expand Down Expand Up @@ -371,10 +374,7 @@ add_usb_storage_quirks() {
read USBQUIRKS <${TMPFILE}
sed -i '/^usbstoragequirks/d' /boot/armbianEnv.txt
echo "usbstoragequirks=${USBQUIRKS}" >>/boot/armbianEnv.txt
# Make sure /boot/armbianEnv.txt is completely written to disk given
# we flush to disk infrequently and corruption of this file can have
# nasty side-effects
sync
sync &
if [ -f /sys/module/usb_storage/parameters/quirks ]; then
echo ${USBQUIRKS} >/sys/module/usb_storage/parameters/quirks
fi
Expand Down

0 comments on commit 8621680

Please sign in to comment.