Changed i.MX6 settings to not rely on any variables, slightly improving IRQ distribution on multi core CPUs and to fail silently if board has less CPU cores.
422 lines
16 KiB
Bash
422 lines
16 KiB
Bash
#!/bin/bash
|
|
### BEGIN INIT INFO
|
|
# Provides: armhwinfo
|
|
# Required-Start:
|
|
# Required-Stop: glibc
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: Armbian gathering hardware information
|
|
### END INIT INFO
|
|
|
|
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
collect_information() {
|
|
ifconfig | grep -q eth0 || (ifconfig eth0 up ; sleep 2)
|
|
TMPFILE=$(mktemp /tmp/${0##*/}.XXXXXX)
|
|
trap "rm \"${TMPFILE}\" ; exit 0" 0 1 2 3 15
|
|
dmesg >"${TMPFILE}"
|
|
CORES=$(grep -c ^processor /proc/cpuinfo)
|
|
MEMTOTAL=$(( $(awk -F" " '/^MemTotal/ {print $2}' </proc/meminfo) / 1024 ))
|
|
ARCH=$(lscpu | awk '/Architecture/ {print $2}')
|
|
RTC=$(awk '/rtc0/ {print $(NF)}' <"${TMPFILE}")
|
|
HB_PCI=$(grep '16c3:abcd' "${TMPFILE}")
|
|
HARDWARE=$(awk '/Hardware/ {print $3}' </proc/cpuinfo)
|
|
[ "X${HARDWARE}" = "XAllwinner" ] && HARDWARE=$(awk '/Hardware/ {print $4}' </proc/cpuinfo)
|
|
GMAC=$(grep "sun6i_gmac" "${TMPFILE}")$(grep "gmac0-" "${TMPFILE}")
|
|
SUN8IPHY="$(awk -F"PHY ID " '/PHY ID / {print $2}' <"${TMPFILE}")"
|
|
LEDS=$(grep "green:ph02:led1" "${TMPFILE}")
|
|
TERMINUS=$(lsusb | grep -i "1a40:0101")
|
|
SWITCH=$(grep "BCM53125" "${TMPFILE}")
|
|
WIFI8189ES=$(lsmod | grep 8189es)
|
|
WIFI8189FS=$(lsmod | grep 8189fs)
|
|
WIFIAP6211=$(lsmod | grep ap6211)
|
|
SPDIF=$(lsmod | grep spdif)
|
|
read VERSION </proc/version
|
|
KERNELID=$(echo $VERSION | awk -F" " '{print $3}')
|
|
|
|
# Starting with 5.15 read in $BOARD (odroidc2), $ID ("Odroid C2") and $VERSION (5.15)
|
|
[[ -f /etc/armbian-release ]] && source /etc/armbian-release
|
|
} # collect_information
|
|
|
|
set_io_scheduler() {
|
|
for i in $( lsblk -idn -o NAME ); do
|
|
read ROTATE </sys/block/$i/queue/rotational
|
|
|
|
# mechanical drives
|
|
if [ "$ROTATE" = 1 ]; then echo cfq >/sys/block/$i/queue/scheduler;
|
|
echo -e "[\e[0;32m ok \x1B[0m] Setting cfg I/O scheduler for $i"
|
|
|
|
# solid state drives
|
|
elif [ "$ROTATE" = 0 ]; then echo noop >/sys/block/$i/queue/scheduler;
|
|
echo -e "[\e[0;32m ok \x1B[0m] Setting noop I/O scheduler for $i"
|
|
fi
|
|
done
|
|
} # set_io_scheduler
|
|
|
|
prepare_board() {
|
|
#### Start soon obsolete auto detection stuff
|
|
if [ "$ARCH" = "armv7l" ]; then
|
|
if [ $HARDWARE = "ODROID-XU3" ]; then
|
|
ID="Odroid XU4"
|
|
fi
|
|
if [ $HARDWARE = "Marvell" ]; then
|
|
ID="Clearfog"
|
|
fi
|
|
if [ $HARDWARE = "gs705a" ]; then
|
|
if [ $MEMTOTAL -gt 1800 ]; then
|
|
ID="Roseapple Pi"
|
|
else
|
|
ID="Guitar"
|
|
fi
|
|
fi
|
|
if [ $HARDWARE = "sun4i" ]; then
|
|
ID="Cubieboard"
|
|
fi
|
|
if [ $HARDWARE = "sun7i" ]; then
|
|
if [ $MEMTOTAL -gt 1500 ]; then
|
|
ID="Cubietruck"
|
|
elif [ -n "$GMAC" ]; then
|
|
if [ "$TERMINUS" != "" ]; then
|
|
ID="Orange"
|
|
elif [ "$SWITCH" != "" ]; then
|
|
ID="Lamobo R1"
|
|
elif [ "$LEDS" != "" ]; then
|
|
ID="Lime 2"
|
|
elif [ "$WIFIAP6211" != "" ]; then
|
|
ID="Banana Pi Pro"
|
|
else
|
|
ID="Banana Pi"
|
|
fi
|
|
elif [ "$LEDS" != "" ]; then
|
|
ID="Lime"
|
|
elif [ $MEMTOTAL -lt 1500 ]; then
|
|
ID="Micro"
|
|
else
|
|
ID="Cubieboard"
|
|
fi
|
|
|
|
elif [ "$HARDWARE" = "Freescale" ]; then
|
|
if [ $MEMTOTAL -gt 1500 ]; then
|
|
ID="Cubox i4"
|
|
elif [ "$HB_PCI" != "" ]; then
|
|
ID="HB i2eX"
|
|
elif [ "$RTC" = "rtc0" ]; then
|
|
ID="Cubox i2eX"
|
|
elif [ "$CORES" = 1 ]; then
|
|
ID="HB i1"
|
|
else
|
|
ID="HB i2"
|
|
fi
|
|
[ -f /proc/asound/imxvt1613audio/id ] && ID="Udoo"
|
|
fi
|
|
|
|
if [ "$HARDWARE" = "sun8i" ]; then
|
|
ID="Orange H3"
|
|
if [ -f /sys/class/leds/*blue*/trigger ] ; then
|
|
ID="NanoPi M1"
|
|
elif [ "$TERMINUS" != "" ]; then
|
|
ID="Orange Pi+"
|
|
if [ $MEMTOTAL -gt 1500 ]; then
|
|
if [ ${CORES} -eq 4 ]; then
|
|
ID="Orange Pi+ 2"
|
|
else
|
|
ID="Unsupported Hardware" # Banana Pi M3
|
|
fi
|
|
fi
|
|
case ${SUN8IPHY} in
|
|
00441400*)
|
|
if [ "$WIFI8189ES" != "" ]; then
|
|
ID="Orange Pi 2"
|
|
else
|
|
ID="Orange Pi 2 mini"
|
|
fi
|
|
;;
|
|
esac
|
|
elif [ "$SPDIF" != "" ]; then
|
|
ID="Beelink X2"
|
|
elif [ "$WIFI8189FS" != "" ]; then
|
|
if [ $MEMTOTAL -gt 1200 ]; then
|
|
ID="Orange Pi+ 2E"
|
|
elif [ $MEMTOTAL -gt 600 ]; then
|
|
ID="Orange Pi PC Plus"
|
|
else
|
|
ID="Orange Pi Lite"
|
|
fi
|
|
elif [ $MEMTOTAL -gt 600 ]; then
|
|
case ${SUN8IPHY} in
|
|
00441400*)
|
|
ID="Orange Pi PC"
|
|
;;
|
|
*)
|
|
ID="Banana Pi M2+"
|
|
;;
|
|
esac
|
|
else
|
|
ID="Orange Pi One"
|
|
fi
|
|
fi
|
|
elif [ "$ARCH" = "aarch64" ]; then
|
|
if [ $HARDWARE = "ODROID-C2" ]; then
|
|
ID="Odroid C2"
|
|
fi
|
|
if [ $HARDWARE = "sun50iw1p1" ]; then
|
|
if [ $MEMTOTAL -gt 600 ]; then
|
|
ID="Pine64+"
|
|
else
|
|
ID="Pine64"
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
[ -f /proc/device-tree/model ] && read MACHINE </proc/device-tree/model
|
|
|
|
if [[ $MACHINE == *LIME2 ]]; then ID="Lime 2"; fi
|
|
if [[ $MACHINE == *LIME ]]; then ID="Lime"; fi
|
|
if [[ $MACHINE == *Micro ]]; then ID="Micro"; fi
|
|
if [[ $MACHINE == *Banana* ]]; then ID="Banana Pi"; fi
|
|
if [[ $MACHINE == *Udoo* ]]; then ID="udoo"; fi
|
|
if [[ $MACHINE == *Lamobo* ]]; then ID="Lamobo R1"; fi
|
|
if [[ $MACHINE == *Neo* ]]; then ID="Udoo Neo"; fi
|
|
if [[ $MACHINE == *Cubietruck* ]]; then ID="Cubietruck"; fi
|
|
if [[ $MACHINE == *Cubieboard* ]]; then ID="Cubieboard"; fi
|
|
if [[ $MACHINE == *Pro* ]]; then ID="Banana Pi Pro"; fi
|
|
if [[ $MACHINE == *M2* ]]; then ID="Banana Pi M2"; fi
|
|
if [[ $MACHINE == *AMLOGIC* ]]; then ID="Odroid C1"; fi
|
|
if [[ $MACHINE == *HummingBoard2* ]]; then ID="HB 2"; fi
|
|
#### Finish soon obsolete auto detection stuff
|
|
|
|
# The next line can be eliminated with the above stuff once 5.15 is out since it's
|
|
# part of collect_information function already so this task can be sent to background
|
|
[[ -f /etc/armbian-release ]] && source /etc/armbian-release
|
|
|
|
# IRQ distribution based on $HARDWARE and/or $ID, probably some sort of user feedback (leds)
|
|
case ${HARDWARE} in
|
|
Freescale) # i.MX6 boards, send Ethernet to cpu1, MMC to cpu2/cpu3 (when available)
|
|
echo 2 >/proc/irq/$(awk -F":" "/ethernet/ {print \$1}" </proc/interrupts | sed 's/\ //g' | head -1)/smp_affinity 2>/dev/null
|
|
echo 4 >/proc/irq/$(awk -F":" "/mmc1/ {print \$1}" </proc/interrupts | sed 's/\ //g' | head -1)/smp_affinity 2>/dev/null
|
|
echo 8 >/proc/irq/$(awk -F":" "/mmc0/ {print \$1}" </proc/interrupts | sed 's/\ //g' | head -1)/smp_affinity 2>/dev/null
|
|
;;
|
|
gs705a) # Roseapple Pi/LeMaker Guitar: send USB IRQs to cpu1/cpu2, DMA0 to cpu2 and Ethernet + SD card to cpu3
|
|
echo 2 >/proc/irq/$(awk -F":" "/usb1/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 4 >/proc/irq/$(awk -F":" "/usb2/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity 2>/dev/null
|
|
echo 4 >/proc/irq/$(awk -F":" "/usb3/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity 2>/dev/null
|
|
echo 4 >/proc/irq/$(awk -F":" "/owl_dma0/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 8 >/proc/irq/$(awk -F":" "/ethernet_mac/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 8 >/proc/irq/$(awk -F":" "/sdcard/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
;;
|
|
Marvell) # Clearfog: Send network IRQs to cpu1 on both kernels
|
|
for i in $(awk -F':' '/mwlwifi|mvneta|eth0/{print $1}' /proc/interrupts); do
|
|
echo 2 >/proc/irq/$i/smp_affinity
|
|
done
|
|
;;
|
|
ODROID-C2) # send eth0 to cpu1, mmc/usb2 to cpu2 and usb1 to cpu3
|
|
# Basics: http://forum.odroid.com/viewtopic.php?f=115&t=8121#p65777
|
|
echo 1 >/proc/irq/$(awk -F":" "/eth0/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity_list
|
|
for i in $(awk -F':' '/sd_emmc|usb2/{print $1}' /proc/interrupts); do
|
|
echo 2 >/proc/irq/$i/smp_affinity_list
|
|
done
|
|
echo 3 >/proc/irq/$(awk -F":" "/usb1/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity_list
|
|
;;
|
|
ODROID-XU3) # ODROID XU4
|
|
echo 2 >/proc/irq/$(awk -F":" "/usb2/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 4 >/proc/irq/$(awk -F":" "/usb3/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 8 >/proc/irq/$(awk -F":" "/usb5/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 16 >/proc/irq/$(awk -F":" "/dw-mci/ {print \$1}" </proc/interrupts | sed 's/\ //g' | tail -1)/smp_affinity
|
|
echo 32 >/proc/irq/$(awk -F":" "/dw-mci/ {print \$1}" </proc/interrupts | sed 's/\ //g' | head -1)/smp_affinity
|
|
for i in $(awk -F':' '/11800000.mali/{print $1}' /proc/interrupts); do
|
|
echo 64 >/proc/irq/$i/smp_affinity
|
|
done
|
|
;;
|
|
sun4i|sun5i) # only one core, nothing to improve
|
|
:
|
|
;;
|
|
sun6i) # Banana Pi M2: process eth0 on cpu1, SDIO on cpu2, USB on cpu3
|
|
echo 2 >/proc/irq/$(awk -F":" '/eth0/ {print $1}' </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
for i in $(awk -F':' '/sunxi-mmc/{print $1}' /proc/interrupts); do
|
|
echo 4 >/proc/irq/$i/smp_affinity
|
|
done
|
|
for i in $(awk -F':' '/hcd:usb/{print $1}' /proc/interrupts); do
|
|
echo 8 >/proc/irq/$i/smp_affinity
|
|
done
|
|
;;
|
|
sun7i) # try to redistribute eth0 irq to dedicated core
|
|
echo 2 >/proc/irq/$(awk -F":" '/eth0/ {print $1}' </proc/interrupts | sed 's/\ //g')/smp_affinity 2>/dev/null
|
|
;;
|
|
sun8i) # H3 boards, try to do the best based on specific board since interfaces vary a lot
|
|
# 10 or 120 sec user feedback that the board is ready after 1st login with 3.4 kernel
|
|
SwapState="$(grep swap /etc/fstab)"
|
|
if [ "X${SwapState}" != "X" ]; then
|
|
(echo heartbeat >/sys/class/leds/*green*/trigger) 2>/dev/null
|
|
[ -f "/root/.not_logged_in_yet" ] && BlinkTime=120 || BlinkTime=10
|
|
(sleep ${BlinkTime} && (echo default-on >/sys/class/leds/*green*/trigger) 2>/dev/null) &
|
|
fi
|
|
|
|
# check kernel version for IRQ/module names
|
|
case ${KERNELID} in
|
|
3*)
|
|
# BSP kernel
|
|
GbE="gmac0"; WiFi="wlan0"; USB1="usb2"; USB2="usb3"; USB3="usb4"
|
|
;;
|
|
*)
|
|
# Mainline kernel
|
|
GbE="1c30000.ethernet"; WiFi="wlan0"; USB1="usb1"; USB2="usb2"; USB3="usb3"
|
|
;;
|
|
esac
|
|
# Assign 1st and 2nd USB port to cpu1 and cpu2 on every sun8i board
|
|
echo 2 >/proc/irq/$(awk -F":" "/${USB1}/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 4 >/proc/irq/$(awk -F":" "/${USB2}/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
case ${ID} in
|
|
"Orange Pi+"|"Orange Pi+ 2"|"Orange Pi+ 2E"|"Banana Pi M2+")
|
|
# Send GBit Ethernet IRQs to cpu3
|
|
echo 8 >/proc/irq/$(awk -F":" "/${GbE}/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
;;
|
|
"NanoPi M1"|"Orange Pi PC Plus"|"Orange Pi PC +"|"Orange Pi PC")
|
|
# Send 3rd USB port's IRQs to cpu3
|
|
echo 8 >/proc/irq/$(awk -F":" "/${USB3}/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
;;
|
|
"Orange Pi Lite")
|
|
# Send WiFi IRQs to cpu3
|
|
echo 8 >/proc/irq/$(awk -F":" "/${WiFi}/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
;;
|
|
esac
|
|
;;
|
|
sun50iw1p1) # A64/H64 based boards like Pine64
|
|
# Send IRQs for the lower real USB port (usb2) to cpu2 and for the upper (OTG/usb1) to cpu1
|
|
echo 2 >/proc/irq/$(awk -F":" "/usb1/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
echo 4 >/proc/irq/$(awk -F":" "/usb2/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
# Send IRQs for GBit Ethernet on Pine64+ or SD card on Pine64 to cpu3
|
|
case $ID in
|
|
"Pine64+")
|
|
echo 8 >/proc/irq/$(awk -F":" "/1c30000.eth/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
|
;;
|
|
*)
|
|
echo 8 >/proc/irq/$(awk -F":" "/sunxi-mmc/ {print \$1}" </proc/interrupts | sed 's/\ //g' | head -n1)/smp_affinity
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
} # prepare_board
|
|
|
|
log_hardware_info() {
|
|
Log=/var/log/armhwinfo.log
|
|
[ -f "/etc/logrotate.d/${0##*/}" ] || \
|
|
echo -e "${Log} {\n rotate 12\n weekly\n compress\n missingok\n notifempty\n}" \
|
|
> "/etc/logrotate.d/${0##*/}" ; chmod 644 "/etc/logrotate.d/${0##*/}"
|
|
if [ -f ${Log} ]; then
|
|
echo -e "\n\n\n$(date) $HARDWARE $ARCH $KERNELID $MACHINE $ID $VERSION" >>${Log}
|
|
else
|
|
echo "$(date) $HARDWARE $ARCH $KERNELID $MACHINE $ID $VERSION" >>${Log}
|
|
chmod 755 ${Log}
|
|
fi
|
|
echo -e "\n### dmesg:\n" >>${Log}
|
|
cat "${TMPFILE}" >>${Log}
|
|
echo -e "\n### lsusb:" >>${Log}
|
|
[ -f /boot/.verbose ] && USBVERBOSE="-v" || echo "" >>${Log}
|
|
lsusb ${USBVERBOSE} 2>/dev/null >>${Log}
|
|
echo -e "\n### lscpu:\n" >>${Log}
|
|
lscpu >>${Log}
|
|
echo -e "\n### cpuinfo:\n" >>${Log}
|
|
cat /proc/cpuinfo >>${Log}
|
|
echo -e "\n### meminfo:\n" >>${Log}
|
|
cat /proc/meminfo >>${Log}
|
|
echo -e "\n### ifconfig:\n" >>${Log}
|
|
ifconfig >>${Log}
|
|
echo -e "### df:\n" >>${Log}
|
|
df -h >>${Log}
|
|
[[ -e /boot/script.bin ]] && echo -e "\n### /boot/script.bin --> $(readlink /boot/script.bin)" >>${Log}
|
|
get_flash_information >>${Log} &
|
|
(sleep 20 && echo -e "\n### interrupts:\n$(cat /proc/interrupts)" >>${Log}) &
|
|
} # log_hardware_info
|
|
|
|
get_flash_information() {
|
|
# http://www.bunniestudios.com/blog/?page_id=1022
|
|
find /sys -name oemid | while read Device ; do
|
|
DeviceNode="${Device%/*}"
|
|
DeviceName="${DeviceNode##*/}"
|
|
echo -e "\n### ${DeviceName} info:\n"
|
|
find "${DeviceNode}" -maxdepth 1 -type f | while read ; do
|
|
NodeName="${REPLY##*/}"
|
|
echo -e "$(printf "%20s" ${NodeName}): $(cat "${DeviceNode}/${NodeName}" | tr '\n' " ")"
|
|
done
|
|
done
|
|
} # get_flash_information
|
|
|
|
show_motd_warning() {
|
|
cat > /etc/update-motd.d/90-warning <<EOT
|
|
#!/bin/bash
|
|
echo -e "\e[0;91mAttention:\x1B[0m $1\n"
|
|
rm "\$0"
|
|
EOT
|
|
chmod +x /etc/update-motd.d/90-warning
|
|
} # show_motd_warning
|
|
|
|
check_sd_card_speed() {
|
|
# function that checks on 3rd boot whether firstrun script made a quick benchmark
|
|
# and displays a motd warning when _random_ I/O is below some tresholds.
|
|
if [ -f /var/log/armhwinfo.log ]; then
|
|
RebootCount=$(grep -c '^### df:' /var/log/armhwinfo.log)
|
|
if [ ${RebootCount} -eq 2 ]; then
|
|
# check whether iozone data has been collected
|
|
IozoneResults="$(awk -F" " '/^### quick iozone test/ {print $10"\t"$11}' </var/log/armhwinfo.log)"
|
|
if [ "X${IozoneResults}" != "X" ]; then
|
|
set ${IozoneResults}
|
|
Readspeed=$1
|
|
Writespeed=$2
|
|
if [ ${Readspeed} -lt 800 -o ${Writespeed} -lt 400 ]; then
|
|
show_motd_warning "Your SD card seems to be very slow. Please check performance using armbianmonitor -c"
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
} # check_sd_card_speed
|
|
|
|
case $1 in
|
|
*start*)
|
|
# set optimal disk scheduler settings
|
|
set_io_scheduler &
|
|
|
|
# check sd card speed once on 3rd boot too warn for too slow media
|
|
check_sd_card_speed &
|
|
|
|
# get hardware information and rely on contents of /etc/armbian-release
|
|
collect_information
|
|
|
|
# hardware preparation
|
|
prepare_board &
|
|
|
|
# display message, log hardware id to file, write log
|
|
echo -e "[\e[0;32m ok \x1B[0m] Starting ARM hardware info: $ID (${VERSION})"
|
|
echo $ID >/var/run/machine.id
|
|
if [ $? -ne 0 ]; then
|
|
# most probably readonly fs. We'll try to warn the user.
|
|
show_motd_warning "It seems the rootfs is readonly at the moment. Please check your SD card for errors"
|
|
fi
|
|
|
|
# check whether auto detection override exists and if true use this for machine.id
|
|
[ -f /root/.machine.id ] && cat /root/.machine.id >/var/run/machine.id
|
|
log_hardware_info
|
|
|
|
# crash detection, enable verbose logging and disable it at clean shutdown
|
|
echo "$(date "+%s") $HARDWARE $ARCH $KERNELID $MACHINE $ID $VERSION" >/boot/.verbose
|
|
sync
|
|
;;
|
|
query)
|
|
# armbianmonitor mode -- only interested in hardware info
|
|
collect_information >/dev/null
|
|
prepare_board >/dev/null
|
|
export HARDWARE ARCH KERNELID MACHINE ID VERSION
|
|
;;
|
|
*stop*)
|
|
# remove /boot/.verbose only if /boot/.force-verbose doesn't exist.
|
|
# If our users demand verbose messages they get them
|
|
if [ -f /boot/.verbose -a ! -f /boot/.force-verbose ]; then
|
|
rm /boot/.verbose
|
|
fi
|
|
collect_information
|
|
if [ $HARDWARE = "sun8i" ]; then
|
|
# redefine green led to blink until shutdown
|
|
(echo heartbeat >/sys/class/leds/*green*/trigger) 2>/dev/null
|
|
fi
|
|
;;
|
|
esac
|