From 14960c4190e41dcb14609a2edbe9977a010e1ca0 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Sun, 7 Feb 2016 20:00:42 +0000 Subject: [PATCH] 96boards: Fix recognizing the HiKey platform on recent kernels Somewhere between kernel v3.18 and v4.4 the output of /proc/cpuinfo stopped showing the board model. This confused MRAA when running on HiKey. Eventually we want to do a better job of getting the kernel to express hardware information to userspace, but in the mean time fix the test so that MRAA will work on HiKey. Signed-off-by: Grant Likely Cc: Jorge Ramirez-Ortiz Cc: Srinivas Kandagatla Cc: Brendan Le Foll Signed-off-by: Brendan Le Foll --- src/arm/arm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arm/arm.c b/src/arm/arm.c index a3363c0..ba41614 100644 --- a/src/arm/arm.c +++ b/src/arm/arm.c @@ -79,6 +79,8 @@ mraa_arm_platform() if (platform_type == MRAA_UNKNOWN_PLATFORM) { if (mraa_file_contains("/sys/firmware/devicetree/base/compatible", "qcom,apq8016-sbc")) platform_type = MRAA_96BOARDS; + if (mraa_file_contains("/sys/firmware/devicetree/base/model", "HiKey Development Board")) + platform_type = MRAA_96BOARDS; } switch (platform_type) {