Minor fixes/tweaks

This commit is contained in:
ThomasKaiser 2017-09-07 13:02:27 -07:00
parent ef94a1b812
commit 537efa4241
4 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
# RK3328 quad core SoC 1GB-4GB
BOARD_NAME="Rock64"
BOARD_NAME="ROCK64"
LINUXFAMILY="rk3328"
BOOTCONFIG="rock64-rk3328_defconfig"
#

View File

@ -253,6 +253,7 @@ prepare_board() {
echo 7 >/sys/class/net/eth0/queues/rx-0/rps_cpus
echo 32768 >/proc/sys/net/core/rps_sock_flow_entries
echo 32768 >/sys/class/net/eth0/queues/rx-0/rps_flow_cnt
/sbin/ethtool -K eth0 rx off tx off
;;
nanopim3) # dw-mci on cpu1, USB host on cpu2, GbE on cpu3, USB OTG on cpu4, video-codec on cpu5
for i in $(awk -F':' '/dw-mci/{print $1}' </proc/interrupts | sed 's/\ //g'); do

View File

@ -209,15 +209,16 @@ case "$1" in
mkswap $SWAPFILE
swapon $SWAPFILE
grep -q swap /etc/fstab || echo "$SWAPFILE none swap sw 0 0" >> /etc/fstab
grep -q swap /etc/sysctl.conf || echo "vm.swappiness=0" >> /etc/sysctl.conf
echo -e "\n### [firstrun] Created 128MB emergency swap as $SWAPFILE" >>${Log}
fi
# set vm.swappiness to 0 (even with a btrfs rootfs)
grep -q 'vm.swappiness' /etc/sysctl.conf || echo "vm.swappiness=0" >> /etc/sysctl.conf
# some hardware workarounds
case $LINUXFAMILY in
sun7i|sun8i)
# set some mac address for BT
[[ -n $(lsmod | grep dhd) ]] && \
[[ -n $(lsmod | egrep "dhd|brcmfmac" ) ]] && \
(MACADDR=$(printf '43:29:B1:%02X:%02X:%02X\n' $[RANDOM%256] $[RANDOM%256] $[RANDOM%256]) ; \
sed -i "s/^MAC_ADDR=.*/MAC_ADDR=${MACADDR}/" /etc/default/brcm40183 ;\
sed -i "s/^MAC_ADDR=.*/MAC_ADDR=${MACADDR}/" /etc/default/ap6212 \

View File

@ -299,7 +299,7 @@ MonitorMode() {
echo -e "\n$(date "+%H:%M:%S"): $(printf "%4s" ${CpuFreq})MHz $(printf "%5s" ${LoadAvg}) $(ProcessStats)\c"
;;
notavailable)
echo -e "\n$(date "+%H:%M:%S"): --- $(printf "%5s" ${LoadAvg}) $(ProcessStats)\c"
echo -e "\n$(date "+%H:%M:%S"): --- $(printf "%5s" ${LoadAvg}) $(ProcessStats)\c"
;;
esac
if [ "X${SocTemp}" != "Xn/a" ]; then