From: acevest Date: Sun, 4 Jun 2023 09:01:01 +0000 (+0800) Subject: 添加控制boot阶段是否引入等待的控制宏:ENABLE_BOOT_WAIT X-Git-Url: http://zhaoyanbai.com/repos/named-checkzone.html?a=commitdiff_plain;h=87b9e5b73dca6ba08b1582bacb6dc9a3248c3555;p=kernel.git 添加控制boot阶段是否引入等待的控制宏:ENABLE_BOOT_WAIT --- diff --git a/Makefile b/Makefile index 5f727f7..1712475 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ endif CFLAGS = -g -c -fno-builtin -m32 -DBUILDER='"$(shell whoami)"' CFLAGS += -DFIX_SYSENTER_ESP_MODE=1 +#CFLAGS += -DENABLE_BOOT_WAIT=1 SYSTEMMAP = System.map KERNELBIN = KERNEL.BIN LINKSCRIPT = scripts/link.ld diff --git a/boot/boot.c b/boot/boot.c index 6652611..be40f97 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -24,6 +24,7 @@ void init_vbe(void *, void *); // ticks < 0 代表永远等待 void boot_delay(int ticks) { +#if ENABLE_BOOT_WAIT char chs[] = {'\\', '-', '/', '-'}; uint32_t cnt = 0; @@ -43,6 +44,7 @@ void boot_delay(int ticks) { } asm("cli;"); printk("\b \b"); +#endif } void init_ttys();