From 85b543e06d8b060b3c269c8a3953fd2cf236ad26 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 14 Jul 2015 05:14:10 +0000 Subject: [PATCH] Populate hw.model with the CPU model information. Now you see something like: # sysctl hw.model hw.model: Atheros AR9330 rev 1 Tested: * Carambola 2, AR9331 SoC --- sys/mips/atheros/ar71xx_machdep.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/mips/atheros/ar71xx_machdep.c b/sys/mips/atheros/ar71xx_machdep.c index 02302fd38297..a974bba86c45 100644 --- a/sys/mips/atheros/ar71xx_machdep.c +++ b/sys/mips/atheros/ar71xx_machdep.c @@ -304,6 +304,8 @@ ar71xx_platform_check_mac_hints(void) return (0); } +extern char cpu_model[]; + void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) @@ -417,6 +419,8 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused, printf(" a2 = %08x\n", a2); printf(" a3 = %08x\n", a3); + strcpy(cpu_model, ar71xx_get_system_type()); + /* * XXX this code is very redboot specific. */