mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-29 18:21:27 +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
|
||||
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 \
|
||||
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)
|
||||
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}')
|
||||
KERNELID=$(awk -F" " '{print $3}' </proc/version)
|
||||
|
||||
# Starting with 5.15 read in $BOARD (odroidc2), $ID ("Odroid C2") and $VERSION (5.15)
|
||||
[[ -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
|
||||
rm /boot/.verbose
|
||||
fi
|
||||
collect_information
|
||||
if [ $HARDWARE = "sun8i" ]; then
|
||||
case ${LINUXFAMILY} in
|
||||
sun?i)
|
||||
# redefine green led to blink until shutdown
|
||||
(echo heartbeat >/sys/class/leds/*green*/trigger) 2>/dev/null
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -71,10 +71,8 @@ chmod +x /tmp/create_swap.sh
|
|||
|
||||
collect_information() {
|
||||
# get some info about the board
|
||||
source /etc/armbian-release
|
||||
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
|
||||
wheezy)
|
||||
root_device=$(mountpoint -d /)
|
||||
|
@ -258,17 +256,19 @@ main() {
|
|||
touch /tmp/firstrun_running
|
||||
/tmp/create_swap.sh &
|
||||
|
||||
if [ "X${HARDWARE}" = "Xsun8i" -o "X${HARDWARE}" = "Xsun7i" ]; then
|
||||
adjust_sunxi_settings
|
||||
fi
|
||||
|
||||
# pine64 temp workaround
|
||||
if [ "X${HARDWARE}" = "Xsun50iw1p1" ] && [ -z "$(grep ethaddr /boot/uEnv.txt)" ] && [ -f "/sys/class/net/eth0/address" ]; then
|
||||
echo "ethaddr=$(cat /sys/class/net/eth0/address)" >> /boot/uEnv.txt
|
||||
fi
|
||||
# some hardware workarounds
|
||||
case ${LINUXFAMILY} in
|
||||
sun7i|sun8i)
|
||||
adjust_sunxi_settings
|
||||
;;
|
||||
pine64)
|
||||
if [ -z "$(grep ethaddr /boot/uEnv.txt)" ] && [ -f "/sys/class/net/eth0/address" ]; then
|
||||
echo "ethaddr=$(cat /sys/class/net/eth0/address)" >> /boot/uEnv.txt
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
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
|
||||
} # main
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue