[PATCH v2 3/3] cmd: ufetch: Show CPU architecture under "CPU"

Caleb Connolly caleb.connolly at linaro.org
Thu Dec 12 13:41:02 CET 2024



On 11/12/2024 23:25, J. Neuschäfer via B4 Relay wrote:
> From: "J. Neuschäfer" <j.ne at posteo.net>
> 
> When looking at ufetch output it isn't immediately obvious which CPU
> architecture the presented board has. This patch therefore adds the
> CPU architecture string (for example "powerpc") to the "CPU:" line.
> The new format is:
> 
> 	CPU: powerpc (1 cores, 1 in use)
> 
> Signed-off-by: J. Neuschäfer <j.ne at posteo.net>

Reviewed-by: Caleb Connolly <caleb.connolly at linaro.org>

Thanks for re-spinning this!
> ---
> 
> v2:
> - Reformat the CPU message for readability
> ---
>  cmd/ufetch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/ufetch.c b/cmd/ufetch.c
> index 83cec0f6d5c875f150f7b948392a29803bdbc201..ed5a856c7abbe08949b81e0b2f634edd8b390be5 100644
> --- a/cmd/ufetch.c
> +++ b/cmd/ufetch.c
> @@ -188,7 +188,7 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,
>  				if (ofnode_name_eq(np, "cpu"))
>  					n_cpus++;
>  			}
> -			printf("CPU:" RESET " %d (1 in use)\n", n_cpus);
> +			printf("CPU: " RESET CONFIG_SYS_ARCH " (%d cores, 1 in use)\n", n_cpus);
>  			break;
>  		case MEMORY:
>  			for (int j = 0; j < CONFIG_NR_DRAM_BANKS && gd->bd->bi_dram[j].size; j++)
> 

-- 
// Caleb (they/them)



More information about the U-Boot mailing list