mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-05 22:01:35 +00:00
Remove useless auto detection stuff, add sysstat package
This commit is contained in:
parent
b8671309e7
commit
fc79191fce
3 changed files with 19 additions and 31 deletions
|
@ -96,7 +96,8 @@ PACKAGE_LIST="automake bash-completion bc bridge-utils build-essential cmake cpu
|
||||||
|
|
||||||
# Non-essential packages
|
# Non-essential packages
|
||||||
PACKAGE_LIST_ADDITIONAL="alsa-utils btrfs-tools hddtemp iotop iozone3 stress sysbench screen ntfs-3g vim pciutils evtest htop pv lsof \
|
PACKAGE_LIST_ADDITIONAL="alsa-utils btrfs-tools hddtemp iotop iozone3 stress sysbench screen ntfs-3g vim pciutils evtest htop pv lsof \
|
||||||
apt-transport-https libfuse2 libdigest-sha-perl libproc-processtable-perl w-scan aptitude dnsutils f3 haveged hdparm rfkill vlan"
|
apt-transport-https libfuse2 libdigest-sha-perl libproc-processtable-perl w-scan aptitude dnsutils f3 haveged hdparm rfkill \
|
||||||
|
vlan sysstat"
|
||||||
|
|
||||||
PACKAGE_LIST_DESKTOP="xserver-xorg xserver-xorg-core xfonts-base xinit nodm x11-xserver-utils xfce4 lxtask xterm mirage radiotray wicd thunar-volman galculator \
|
PACKAGE_LIST_DESKTOP="xserver-xorg xserver-xorg-core xfonts-base xinit nodm x11-xserver-utils xfce4 lxtask xterm mirage radiotray wicd thunar-volman galculator \
|
||||||
gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf libgtk2.0-bin gcj-jre-headless xfce4-screenshooter libgnome2-perl gksu wifi-radar bluetooth"
|
gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf libgtk2.0-bin gcj-jre-headless xfce4-screenshooter libgnome2-perl gksu wifi-radar bluetooth"
|
||||||
|
|
|
@ -15,24 +15,10 @@ collect_information() {
|
||||||
TMPFILE=$(mktemp /tmp/${0##*/}.XXXXXX)
|
TMPFILE=$(mktemp /tmp/${0##*/}.XXXXXX)
|
||||||
trap "rm \"${TMPFILE}\" ; exit 0" 0 1 2 3 15
|
trap "rm \"${TMPFILE}\" ; exit 0" 0 1 2 3 15
|
||||||
dmesg >"${TMPFILE}"
|
dmesg >"${TMPFILE}"
|
||||||
CORES=$(grep -c ^processor /proc/cpuinfo)
|
|
||||||
MEMTOTAL=$(( $(awk -F" " '/^MemTotal/ {print $2}' </proc/meminfo) / 1024 ))
|
|
||||||
ARCH=$(lscpu | awk '/Architecture/ {print $2}')
|
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)
|
HARDWARE=$(awk '/Hardware/ {print $3}' </proc/cpuinfo)
|
||||||
[ "X${HARDWARE}" = "XAllwinner" ] && HARDWARE=$(awk '/Hardware/ {print $4}' </proc/cpuinfo)
|
[ "X${HARDWARE}" = "XAllwinner" ] && HARDWARE=$(awk '/Hardware/ {print $4}' </proc/cpuinfo)
|
||||||
GMAC=$(grep "sun6i_gmac" "${TMPFILE}")$(grep "gmac0-" "${TMPFILE}")
|
KERNELID=$(awk -F" " '{print $3}' </proc/version)
|
||||||
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)
|
# Starting with 5.15 read in $BOARD (odroidc2), $ID ("Odroid C2") and $VERSION (5.15)
|
||||||
[[ -f /etc/armbian-release ]] && source /etc/armbian-release
|
[[ -f /etc/armbian-release ]] && source /etc/armbian-release
|
||||||
|
@ -277,10 +263,11 @@ case $1 in
|
||||||
if [ -f /boot/.verbose -a ! -f /boot/.force-verbose ]; then
|
if [ -f /boot/.verbose -a ! -f /boot/.force-verbose ]; then
|
||||||
rm /boot/.verbose
|
rm /boot/.verbose
|
||||||
fi
|
fi
|
||||||
collect_information
|
case ${LINUXFAMILY} in
|
||||||
if [ $HARDWARE = "sun8i" ]; then
|
sun?i)
|
||||||
# redefine green led to blink until shutdown
|
# redefine green led to blink until shutdown
|
||||||
(echo heartbeat >/sys/class/leds/*green*/trigger) 2>/dev/null
|
(echo heartbeat >/sys/class/leds/*green*/trigger) 2>/dev/null
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -71,10 +71,8 @@ chmod +x /tmp/create_swap.sh
|
||||||
|
|
||||||
collect_information() {
|
collect_information() {
|
||||||
# get some info about the board
|
# get some info about the board
|
||||||
|
source /etc/armbian-release
|
||||||
DISTRIBUTION=$(lsb_release -cs)
|
DISTRIBUTION=$(lsb_release -cs)
|
||||||
HARDWARE=$(awk '/Hardware/ {print $3}' </proc/cpuinfo)
|
|
||||||
# Mainline kernel fix
|
|
||||||
[ "X${HARDWARE}" = "XAllwinner" ] && HARDWARE=$(awk '/Hardware/ {print $4}' </proc/cpuinfo)
|
|
||||||
case ${DISTRIBUTION} in
|
case ${DISTRIBUTION} in
|
||||||
wheezy)
|
wheezy)
|
||||||
root_device=$(mountpoint -d /)
|
root_device=$(mountpoint -d /)
|
||||||
|
@ -258,17 +256,19 @@ main() {
|
||||||
touch /tmp/firstrun_running
|
touch /tmp/firstrun_running
|
||||||
/tmp/create_swap.sh &
|
/tmp/create_swap.sh &
|
||||||
|
|
||||||
if [ "X${HARDWARE}" = "Xsun8i" -o "X${HARDWARE}" = "Xsun7i" ]; then
|
# some hardware workarounds
|
||||||
adjust_sunxi_settings
|
case ${LINUXFAMILY} in
|
||||||
fi
|
sun7i|sun8i)
|
||||||
|
adjust_sunxi_settings
|
||||||
# pine64 temp workaround
|
;;
|
||||||
if [ "X${HARDWARE}" = "Xsun50iw1p1" ] && [ -z "$(grep ethaddr /boot/uEnv.txt)" ] && [ -f "/sys/class/net/eth0/address" ]; then
|
pine64)
|
||||||
echo "ethaddr=$(cat /sys/class/net/eth0/address)" >> /boot/uEnv.txt
|
if [ -z "$(grep ethaddr /boot/uEnv.txt)" ] && [ -f "/sys/class/net/eth0/address" ]; then
|
||||||
fi
|
echo "ethaddr=$(cat /sys/class/net/eth0/address)" >> /boot/uEnv.txt
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
update-rc.d -f firstrun remove >/dev/null 2>&1
|
update-rc.d -f firstrun remove >/dev/null 2>&1
|
||||||
#sed -i 's/allow-hotplug\ eth0/auto eth0/' /etc/network/interfaces.default
|
|
||||||
rm /tmp/firstrun_running
|
rm /tmp/firstrun_running
|
||||||
} # main
|
} # main
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue