mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 20:40:52 +07:00
df8a0dde73
Commit 669f6f96c6
introduced
the script list-arch.sh, which uses the command "arch":
ARCH=${1:-$(arch | sed 's/x86_64/x86/' | sed 's/i386/x86/')}
It turns out that the "arch" command does not exist in my system (arch
distro). Google found man pages which say "arch is deprecated command since
release util-linux 2.13. Use uname -m" (util-linux 2.13 was released in 2007).
I also found a debian bug reporting the lack of arch and being told to use
uname -m https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=446023
But then, why it works in some distros? Apparently coreutils gained an
optional arch command that needs to be explicitly enabled during compilation.
Some distros enable it, others don't. Sigh.
Signed-off-by: Diego Calleja <diegocg@gmail.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
25 lines
696 B
Bash
Executable File
25 lines
696 B
Bash
Executable File
#
|
|
# Small script that visualizes the kernel feature support status
|
|
# of an architecture.
|
|
#
|
|
# (If no arguments are given then it will print the host architecture's status.)
|
|
#
|
|
|
|
ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/')}
|
|
|
|
cd $(dirname $0)
|
|
echo "#"
|
|
echo "# Kernel feature support matrix of the '$ARCH' architecture:"
|
|
echo "#"
|
|
|
|
for F in */*/arch-support.txt; do
|
|
SUBSYS=$(echo $F | cut -d/ -f1)
|
|
N=$(grep -h "^# Feature name:" $F | cut -c25-)
|
|
C=$(grep -h "^# Kconfig:" $F | cut -c25-)
|
|
D=$(grep -h "^# description:" $F | cut -c25-)
|
|
S=$(grep -hw $ARCH $F | cut -d\| -f3)
|
|
|
|
printf "%10s/%-22s:%s| %35s # %s\n" "$SUBSYS" "$N" "$S" "$C" "$D"
|
|
done
|
|
|