diff --git a/include/global.h b/include/global.h index 0c1562c..43b2bbe 100644 --- a/include/global.h +++ b/include/global.h @@ -12,7 +12,7 @@ #include "protect.h" #include "proc.h" #include "const.h" -#define USE_FBCON +//#define USE_FBCON extern int kernel_initial; extern int ticks; @@ -55,4 +55,4 @@ struct memfree{ #include "fs_const.h" #include "hd.h" -extern struct hd_info hd_info[1]; //added by mingxuan 2020-10-27 \ No newline at end of file +extern struct hd_info hd_info[1]; //added by mingxuan 2020-10-27 diff --git a/kernel/fbcon.c b/kernel/fbcon.c index 44102b7..dcc669e 100644 --- a/kernel/fbcon.c +++ b/kernel/fbcon.c @@ -1,4 +1,5 @@ #include "global.h" +#include "proto.h" #ifdef USE_FBCON @@ -9,7 +10,6 @@ #include "memman.h" #include "proc.h" #include "protect.h" -#include "proto.h" #include "serialport.h" #include "spinlock.h" #include "stdio.h" diff --git a/kernel/ktest.c b/kernel/ktest.c index 7db6044..9ebf2aa 100644 --- a/kernel/ktest.c +++ b/kernel/ktest.c @@ -130,6 +130,7 @@ void initial() printf("untar:%s\n", full_name); strcat(full_name, INSTALL_FILENAME); untar(full_name); +#ifdef USE_FBCON kprintf("loading font(%dKB) to %p...", HZK16_SIZE / num_1K, hzk16h_buf); printf("Loading Font HZK16H...\n"); @@ -145,12 +146,15 @@ void initial() kprintf("[\x1b[32mOK\x1b[0m]\n"); printf("Font loaded.\n"); printf("Loaing Simple Shell...\n"); +#endif do_vclose(stdin); do_vclose(stdout); do_vclose(stderr); - // while(untared) yield(); +#ifdef USE_FBCON exec("orange/shell_0.bin"); - +#else + exec("orange/shell_1.bin"); +#endif while (1) ; } \ No newline at end of file diff --git a/lib/kprintf.c b/lib/kprintf.c index 0cc6378..9c27eb1 100644 --- a/lib/kprintf.c +++ b/lib/kprintf.c @@ -9,8 +9,8 @@ static void kprintfputch(int ch, int *cnt) { write_serial(ch); - // char _ch = ch; - // tty_write(cur_ntty, &_ch, 1); + char _ch = ch; + tty_write(cur_ntty, &_ch, 1); (*cnt)++; }