diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:02:38 +0000 |
commit | 08b74a000942a380fe028845f92cd3a0dee827d5 (patch) | |
tree | aa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/templates/image.bug/include-model | |
parent | Adding upstream version 4.19.249. (diff) | |
download | linux-debian/4.19.249-2.tar.xz linux-debian/4.19.249-2.zip |
Adding debian version 4.19.249-2.debian/4.19.249-2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/templates/image.bug/include-model')
-rw-r--r-- | debian/templates/image.bug/include-model | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/debian/templates/image.bug/include-model b/debian/templates/image.bug/include-model new file mode 100644 index 000000000..ba77fb266 --- /dev/null +++ b/debian/templates/image.bug/include-model @@ -0,0 +1,60 @@ +grep_model() { + case "$(uname -m)" in + alpha) + egrep '^(system (type|variation|revision)|platform string)\b' /proc/cpuinfo + ;; + arm*) + egrep '^(Processor|Hardware|Revision)\b' /proc/cpuinfo + ;; + i386|ia64|x86_64) + local found= + for name in {sys,product,chassis,bios,board}_{vendor,name,version}; do + if [ -f /sys/class/dmi/id/$name ]; then + echo -n "$name: " + cat /sys/class/dmi/id/$name + found=y + fi + done + test -n "$found" + ;; + mips|mips64) + egrep '^(system type|cpu model)\b' /proc/cpuinfo + ;; + parisc|parisc64) + egrep '^(model|[hs]version)\b' /proc/cpuinfo + ;; + ppc|ppc64|ppc64le) + egrep -i '^(board|machine|model|motherboard|platform|revision|vendor)\b' /proc/cpuinfo + ;; + s390|s390x) + egrep '^processor\b' /proc/cpuinfo + ;; + sparc|sparc64) + egrep '^(cpu|fpu|pmu|prom|type)\b' /proc/cpuinfo + ;; + sh4|sh4a) + egrep '^(machine|cpu)\b' /proc/cpuinfo + ;; + *) + false + ;; + esac + + # Device Tree model + if [ -r /proc/device-tree/model ]; then + echo "Device Tree model:" $(cat /proc/device-tree/model) + fi +} + +add_model() { + local found= + echo '** Model information' >&3 + grep_model >&3 2>/dev/null || echo "not available" >&3 + echo >&3 +} + +ask_model() { + # This is still valid as long as the bug is being reported on the same + # system. + test $same_system = nop || add_model +} |