Sun 12 Jan 19:29:58 CET 2025
This commit is contained in:
parent
528fc9432e
commit
126b85a034
|
@ -45,9 +45,12 @@ int kernel_main()
|
|||
page_init();
|
||||
kmalloc_init((char *) KMALLOC_START, KMALLOC_LENGTH);
|
||||
interrupt_init();
|
||||
serial_init();
|
||||
mouse_init();
|
||||
keyboard_init();
|
||||
serial_init();
|
||||
#ifdef KSHELL_SERIAL
|
||||
console_serial=0;
|
||||
#endif
|
||||
rtc_init();
|
||||
clock_init();
|
||||
process_init();
|
||||
|
@ -61,13 +64,13 @@ int kernel_main()
|
|||
current->ktable[KNO_STDWIN] = kobject_create_window(&window_root);
|
||||
current->ktable[KNO_STDDIR] = 0; // No current dir until something is mounted.
|
||||
|
||||
|
||||
printf("kernel initialization is done.\n");
|
||||
// #define KSHELL_SERIAL
|
||||
#ifndef KSHELL_SERIAL
|
||||
kshell_launch();
|
||||
// never reached!
|
||||
#else
|
||||
// serial_device_write(0,"Hello.\n",7,0);
|
||||
|
||||
// main IO loop, from kshell_launch
|
||||
char line[100];
|
||||
int lineIndex=0;
|
||||
|
@ -75,8 +78,8 @@ int kernel_main()
|
|||
while(1) {
|
||||
// console_putchar(console,console_getchar(console));
|
||||
char c;
|
||||
while ((c = serial_read_nonblock(0))<0) clock_wait(10);
|
||||
console_putchar(console,c);
|
||||
c=(char)serial_getchar(0);
|
||||
// console_putchar(console,c);
|
||||
if (c=='\n') { // End of line
|
||||
const char *argv[100];
|
||||
int argc;
|
||||
|
|
Loading…
Reference in New Issue
Block a user