diff --git a/src/common/args.c b/src/common/args.c index 22d8ca7..b3d2b10 100644 --- a/src/common/args.c +++ b/src/common/args.c @@ -13,6 +13,7 @@ #define COLOR_STR_IBM "ibm" #define COLOR_STR_ARM "arm" #define COLOR_STR_ROCKCHIP "rockchip" +#define COLOR_STR_SIFIVE "sifive" static const char *SYTLES_STR_LIST[] = { [STYLE_EMPTY] = NULL, @@ -170,6 +171,7 @@ bool parse_color(char* optarg_str, struct color*** cs) { else if(strcmp(optarg_str, COLOR_STR_IBM) == 0) color_to_copy = COLOR_DEFAULT_IBM; else if(strcmp(optarg_str, COLOR_STR_ARM) == 0) color_to_copy = COLOR_DEFAULT_ARM; else if(strcmp(optarg_str, COLOR_STR_ROCKCHIP) == 0) color_to_copy = COLOR_DEFAULT_ROCKCHIP; + else if(strcmp(optarg_str, COLOR_STR_SIFIVE) == 0) color_to_copy = COLOR_DEFAULT_SIFIVE; else { str_to_parse = optarg_str; free_ptr = false; diff --git a/src/common/ascii.h b/src/common/ascii.h index 49fb9cc..2dd9fbc 100644 --- a/src/common/ascii.h +++ b/src/common/ascii.h @@ -267,44 +267,48 @@ $C1 ## ### ## ##########. ########## ### \ $C1 " #define ASCII_SIFIVE \ -"$C1 ######################## \ -$C1 ############################ \ -$C1 #### #### \ -$C1 #### #### \ -$C1 #### #### \ -$C1 #### ######################### \ -$C1 #### ########################### \ -$C1 #### #### \ -$C1 #### #### \ -$C1############################### #### \ -$C1############################# #### \ -$C1 ###### ###### ###### \ -$C1 ##### ## ##### \ -$C1 ###### ###### \ -$C1 ##### ##### \ -$C1 ###### ###### \ -$C1 ###### " +"$C1 ############################################## \ +$C1 ###########@@@@@@@@@@@@@@@@@@@@@@@@########### \ +$C1 #########@@@@@@@@@@@@@@@@@@@@@@@@@@@@######### \ +$C1 ########@@@@######################@@@@######## \ +$C1 #######@@@@########################@@@@####### \ +$C1 ######@@@@##########################@@@@###### \ +$C1 #####@@@@#######@@@@@@@@@@@@@@@@@@@@@@@@@##### \ +$C1 ####@@@@#######@@@@@@@@@@@@@@@@@@@@@@@@@@@#### \ +$C1 ###@@@@################################@@@@### \ +$C1 ##@@@@##################################@@@@## \ +$C1 #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#########@@@@# \ +$C1 #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###########@@@@# \ +$C1 ##@@@@@@############@@@@@@############@@@@@@## \ +$C1 ######@@@@@###########@@###########@@@@@###### \ +$C1 #########@@@@@@################@@@@@@######### \ +$C1 #############@@@@@##########@@@@@############# \ +$C1 ################@@@@@@##@@@@@@################ \ +$C1 ####################@@@@@@#################### \ +$C1 ############################################## " #define ASCII_SIFIVE_L \ -"$C1 ########################### \ -$C1 ############################### \ -$C1 #### #### \ -$C1 ##### ##### \ -$C1 ##### ##### \ -$C1 #### ######################### \ -$C1 #### ########################### \ -$C1 #### #### \ -$C1 ##### ##### \ -$C1 ##### ##### \ -$C1 ################################# #### \ -$C1 ############################## ##### \ -$C1 ###### ####### ####### \ -$C1 ###### # ###### \ -$C1 ###### ###### \ -$C1 ###### ###### \ -$C1 ###### ###### \ -$C1 ########### \ -$C1 ### " +"$C1 ################################################### \ +$C1 ###########@@@@@@@@@@@@@@@@@@@@@@@@@@@@############ \ +$C1 ##########@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@########### \ +$C1 #########@@@@@#######################@@@@########## \ +$C1 ########@@@@@#########################@@@@######### \ +$C1 #######@@@@@###########################@@@@######## \ +$C1 ######@@@@@########@@@@@@@@@@@@@@@@@@@@@@@@@####### \ +$C1 #####@@@@@########@@@@@@@@@@@@@@@@@@@@@@@@@@@###### \ +$C1 ####@@@@@################################@@@@@##### \ +$C1 ###@@@@@##################################@@@@@#### \ +$C1 ##@@@@@####################################@@@@@### \ +$C1 ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#########@@@@### \ +$C1 ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@############@@@@### \ +$C1 ####@@@@@#############@@@@@@@############@@@@@##### \ +$C1 #######@@@@@@############@############@@@@@@####### \ +$C1 ##########@@@@@@###################@@@@@@########## \ +$C1 ##############@@@@@@###########@@@@@@############## \ +$C1 #################@@@@@@#####@@@@@@################# \ +$C1 ####################@@@@@@@@@@@#################### \ +$C1 ########################@@@######################## \ +$C1 ################################################### " #define ASCII_STARFIVE \ "$C1 # \ @@ -453,7 +457,7 @@ asciiL logo_apple = { ASCII_APPLE, 32, 17, false, {C_FG_WHITE}, asciiL logo_allwinner = { ASCII_ALLWINNER, 47, 16, false, {C_FG_CYAN}, {C_FG_B_BLACK, C_FG_B_CYAN } }; asciiL logo_rockchip = { ASCII_ROCKCHIP, 58, 8, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} }; asciiL logo_riscv = { ASCII_RISCV, 63, 18, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} }; -asciiL logo_sifive = { ASCII_SIFIVE, 45, 17, false, {C_FG_WHITE}, {C_FG_WHITE, C_FG_CYAN} }; +asciiL logo_sifive = { ASCII_SIFIVE, 48, 19, true, {C_BG_WHITE, C_BG_BLACK}, {C_FG_WHITE, C_FG_BLUE} }; asciiL logo_starfive = { ASCII_STARFIVE, 33, 17, false, {C_FG_WHITE}, {C_FG_WHITE, C_FG_BLUE} }; // Long variants | ----------------------------------------------------------------------------------------------------| @@ -463,7 +467,7 @@ asciiL logo_intel_l_new = { ASCII_INTEL_L_NEW, 57, 14, true, {C_BG_CYAN, C_BG_W asciiL logo_arm_l = { ASCII_ARM_L, 60, 8, true, {C_BG_CYAN}, {C_FG_WHITE, C_FG_CYAN} }; asciiL logo_ibm_l = { ASCII_IBM_L, 62, 13, true, {C_BG_CYAN, C_FG_WHITE}, {C_FG_CYAN, C_FG_WHITE} }; asciiL logo_starfive_l = { ASCII_STARFIVE_L, 50, 22, false, {C_FG_WHITE}, {C_FG_WHITE, C_FG_BLUE} }; -asciiL logo_sifive_l = { ASCII_SIFIVE_L, 51, 19, false, {C_FG_WHITE}, {C_FG_WHITE, C_FG_CYAN} }; +asciiL logo_sifive_l = { ASCII_SIFIVE_L, 53, 21, true, {C_BG_WHITE, C_BG_BLACK}, {C_FG_WHITE, C_FG_CYAN} }; asciiL logo_unknown = { NULL, 0, 0, false, {COLOR_NONE}, {COLOR_NONE, COLOR_NONE} }; #endif diff --git a/src/common/main.c b/src/common/main.c index 6f2900f..6371e9b 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -44,6 +44,7 @@ void print_help(char *argv[]) { printf(" * \"amd\": Use AMD default color scheme \n"); printf(" * \"ibm\", Use IBM default color scheme \n"); printf(" * \"arm\": Use ARM default color scheme \n"); + printf(" * \"sifive\": Use SiFive default color scheme \n"); printf(" * custom: If the argument of --color does not match any of the previous strings, a custom scheme can be specified.\n"); printf(" 5 colors must be given in RGB with the format: R,G,B:R,G,B:...\n"); printf(" The first 3 colors are the CPU art color and the next 2 colors are the text colors\n"); diff --git a/src/common/printer.h b/src/common/printer.h index 21dd906..26a1fa3 100644 --- a/src/common/printer.h +++ b/src/common/printer.h @@ -24,6 +24,7 @@ typedef int STYLE; #define COLOR_DEFAULT_IBM "092,119,172:092,119,172:000,000,000:240,240,240:092,119,172" #define COLOR_DEFAULT_ARM "000,145,189:000,145,189:000,000,000:240,240,240:000,145,189" #define COLOR_DEFAULT_ROCKCHIP "114,159,207:229,195,000:000,000,000:240,240,240:114,159,207" +#define COLOR_DEFAULT_SIFIVE "255,255,255:000,000,000:000,000,000:255,255,255:000,000,000" #ifdef ARCH_X86 void print_levels(struct cpuInfo* cpu);