Enable serial in simulcast with local terminal on yeeloong

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-22 23:36:44 +02:00
parent a7208779c3
commit 6e198650e9
4 changed files with 26 additions and 6 deletions

View file

@ -20,3 +20,9 @@ kernel_img_CFLAGS = $(COMMON_CFLAGS)
kernel_img_ASFLAGS = $(COMMON_ASFLAGS) kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(LINK_BASE),-Bstatic kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(LINK_BASE),-Bstatic
kernel_img_FORMAT = binary kernel_img_FORMAT = binary
# For serial.mod.
pkglib_MODULES += serial.mod
serial_mod_SOURCES = term/serial.c
serial_mod_CFLAGS = $(COMMON_CFLAGS)
serial_mod_LDFLAGS = $(COMMON_LDFLAGS)

View file

@ -10,12 +10,6 @@ kernel_img_HEADERS += cpu/cache.h
sbin_SCRIPTS = sbin_SCRIPTS =
bin_SCRIPTS = bin_SCRIPTS =
# For serial.mod.
pkglib_MODULES += serial.mod
serial_mod_SOURCES = term/serial.c
serial_mod_CFLAGS = $(COMMON_CFLAGS)
serial_mod_LDFLAGS = $(COMMON_LDFLAGS)
# For relocator.mod. # For relocator.mod.
pkglib_MODULES += relocator.mod pkglib_MODULES += relocator.mod
relocator_mod_SOURCES = lib/$(target_cpu)/relocator.c lib/$(target_cpu)/relocator_asm.S relocator_mod_SOURCES = lib/$(target_cpu)/relocator.c lib/$(target_cpu)/relocator_asm.S

View file

@ -37,6 +37,8 @@ extern void grub_bitmap_init (void);
extern void grub_font_init (void); extern void grub_font_init (void);
extern void grub_gfxterm_init (void); extern void grub_gfxterm_init (void);
extern void grub_at_keyboard_init (void); extern void grub_at_keyboard_init (void);
extern void grub_serial_init (void);
extern void grub_terminfo_init (void);
/* FIXME: use interrupt to count high. */ /* FIXME: use interrupt to count high. */
grub_uint64_t grub_uint64_t
@ -183,6 +185,9 @@ grub_machine_init (void)
grub_gfxterm_init (); grub_gfxterm_init ();
grub_at_keyboard_init (); grub_at_keyboard_init ();
grub_terminfo_init ();
grub_serial_init ();
} }
void void

View file

@ -636,6 +636,21 @@ GRUB_MOD_INIT(serial)
serial_settings.word_len = UART_8BITS_WORD; serial_settings.word_len = UART_8BITS_WORD;
serial_settings.parity = UART_NO_PARITY; serial_settings.parity = UART_NO_PARITY;
serial_settings.stop_bits = UART_1_STOP_BIT; serial_settings.stop_bits = UART_1_STOP_BIT;
#ifdef GRUB_MACHINE_MIPS_YEELOONG
{
grub_err_t hwiniterr;
hwiniterr = serial_hw_init ();
if (hwiniterr == GRUB_ERR_NONE)
{
grub_term_register_input_active ("serial", &grub_serial_term_input);
grub_term_register_output_active ("serial", &grub_serial_term_output);
registered = 1;
}
}
#endif
} }
GRUB_MOD_FINI(serial) GRUB_MOD_FINI(serial)