We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7ce2386 + 2055e12 commit fabebe5Copy full SHA for fabebe5
1 file changed
platforms/cpuinfo.go
@@ -96,6 +96,15 @@ func getCPUVariant() string {
96
return ""
97
}
98
99
+ // handle edge case for Raspberry Pi ARMv6 devices (which due to a kernel quirk, report "CPU architecture: 7")
100
+ // https://www.raspberrypi.org/forums/viewtopic.php?t=12614
101
+ if runtime.GOARCH == "arm" && variant == "7" {
102
+ model, err := getCPUInfo("model name")
103
+ if err == nil && strings.HasPrefix(strings.ToLower(model), "armv6-compatible") {
104
+ variant = "6"
105
+ }
106
107
+
108
switch strings.ToLower(variant) {
109
case "8", "aarch64":
110
// special case: if running a 32-bit userspace on aarch64, the variant should be "v7"
0 commit comments