Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
makebl authored Dec 29, 2024
1 parent 36ce6f6 commit a214f82
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions build/Lede/patches/autocore-cpu.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/package/lean/autocore/files/x86/autocore b/package/lean/autocore/files/x86/autocore
index ecae6d7..c45d660 100644
--- a/package/lean/autocore/files/x86/autocore+++ b/package/lean/autocore/files/x86/autocore
@@ -25,36 +25,13 @@ start()
a=$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq)
b=$(echo -n ' : ')
c=$(cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l)
- d=$(echo -n 'C')
+ d=$(echo -n ' Core ')
e=$(cat /proc/cpuinfo | grep 'processor' | wc -l)
- f=$(echo -n 'T ')
- g=$(dmesg | grep 'DMI:' | awk -F ',' '{print $1 }' | awk -F ':' '{print $2 }')
-
- if [ -d /sys/devices/cpu_atom/ ]; then
- pcore=$(cat /sys/devices/cpu_core/cpus | awk -F- '{print $2}')
- pc=$(echo "($pcore+1)/2" | bc)
- ecore1=$(cat /sys/devices/cpu_atom/cpus | awk -F- '{print $1}')
- ecore2=$(cat /sys/devices/cpu_atom/cpus | awk -F- '{print $2}')
- ec=$(echo "$ecore2-$ecore1+1" | bc)
- hydrid='('${pc}'P+'${ec}'E)'
- fi
-
- h=${g}' - '${a}${b}${c}${d}${e}${f}${hydrid}
+ f=$(echo -n ' Thread ')
+ g=${a}${b}${c}${d}${e}${f}

mkdir -p /tmp/sysinfo
- echo $h > /tmp/sysinfo/model
-
- all_pcis=`lspci | grep -i 'eth' | grep -i 'x550' | cut -d ' ' -f 1`
- all_ifs=`cat /proc/net/dev | grep -i 'eth' | cut -d : -f 1 | sed 's/^[ \t]*//g'`
-
- for ifname in ${all_ifs}
- do
- if_pci=`ethtool -i ${ifname} | grep -i 'bus-info' | cut -d : -f 3-`
- if [[ "$all_pcis" =~ "$if_pci" ]]
- then
- ethtool -s ${ifname} advertise 0x1800000001028
- fi
- done
+ echo $g > /tmp/sysinfo/model

a=$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -v "@" | grep -v "\.")
b=$(echo "$a" | wc -l)

0 comments on commit a214f82

Please sign in to comment.