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