list-arch.sh 696 B

12345678910111213141516171819202122232425
  1. #
  2. # Small script that visualizes the kernel feature support status
  3. # of an architecture.
  4. #
  5. # (If no arguments are given then it will print the host architecture's status.)
  6. #
  7. ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/')}
  8. cd $(dirname $0)
  9. echo "#"
  10. echo "# Kernel feature support matrix of the '$ARCH' architecture:"
  11. echo "#"
  12. for F in */*/arch-support.txt; do
  13. SUBSYS=$(echo $F | cut -d/ -f1)
  14. N=$(grep -h "^# Feature name:" $F | cut -c25-)
  15. C=$(grep -h "^# Kconfig:" $F | cut -c25-)
  16. D=$(grep -h "^# description:" $F | cut -c25-)
  17. S=$(grep -hw $ARCH $F | cut -d\| -f3)
  18. printf "%10s/%-22s:%s| %35s # %s\n" "$SUBSYS" "$N" "$S" "$C" "$D"
  19. done