Commit Graph

76 Commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko d745dda77e Fix USB devices not being detected when requested
due to delayed attach.
2013-03-19 20:35:21 +01:00
Vladimir 'phcoder' Serbinenko bc1369732f Make color variables global instead of it being per-terminal. 2013-01-21 17:53:41 +01:00
Vladimir 'phcoder' Serbinenko 34f71cb866 Improve bidi handling in entry editor. 2013-01-16 13:41:16 +01:00
Vladimir 'phcoder' Serbinenko 7086ad524f Remove unjustified hard dependency of normal.mod on gfxterm.
* include/grub/term.h (grub_term_output): New member fullscreen.
	* include/grub/gfxterm.h (grub_gfxterm_fullscreen): Removed.
	* grub-core/term/gfxterm.c (grub_gfxterm_fullscreen): Make static.
	(grub_gfxterm): Set .fullscreen.
	* grub-core/normal/menu.c (menu_init): Use fullscreen.
	* grub-core/gfxmenu/gfxmenu.c (GRUB_MOD_INIT): Likewise.
2012-05-21 22:17:11 +02:00
Vladimir 'phcoder' Serbinenko e1bd676b4e Fix tab and wide character handling in editor and menu.
* grub-core/normal/charset.c (grub_unicode_aglomerate_comb): Don't
	agglomerate control characters with combining marks.
	(bidi_line_wrap): Allow break on tab.
	(grub_unicode_get_comb_start): New function.
	* grub-core/normal/menu_entry.c: Restructure to handle wide characters
	and tab correctly.
	* grub-core/normal/menu_text.c (print_entry): Replace \n, \r, \b and \e
	with a space.
	* grub-core/normal/term.c (print_ucs4_terminal): New argument
	fixed_tab_size. All users updated.
	* include/grub/term.h (GRUB_TERM_TAB_WIDTH): New const.
	(grub_term_getcharwidth): Handle \t.
	* include/grub/unicode.h (grub_unicode_glyph_dup): Fix allocation
	and copy.
2012-03-27 17:07:26 +02:00
Vladimir 'phcoder' Serbinenko a8f16eab1a Replace grub_checkkey with grub_getkey_noblock.
* grub-core/kern/term.c (grub_checkkey): Replaced with ...
	(grub_getkey_noblock): ... this. All users updated.
2012-02-18 19:59:01 +01:00
Vladimir 'phcoder' Serbinenko 87edb8940a Replace single-linked with double-linked lists. It results in more
compact and more efficient code.

	* grub-core/kern/list.c (grub_list_push): Moved from here ...
	* include/grub/list.h (grub_list_push): ... to here. Set prev.
	(grub_list_remove): Moved from here ...
	* include/grub/list.h (grub_list_remove): ... here. Use and set prev.
	(grub_prio_list_insert): Set prev.
	* include/grub/list.h (grub_list): Add prev. All users updated.
2012-01-24 13:31:12 +01:00
Vladimir 'phcoder' Serbinenko 5d063cdc10 Fuloong support.
* configure.ac: Rename yeeloong platform to loongson. All users updated.
	* grub-core/Makefile.core.def (fwstart_fuloong): New image.
	* grub-core/boot/mips/loongson/fuloong.S: New file.
	* grub-core/boot/mips/loongson/fwstart.S: Wait for CS5536 to come up.
	Explicitly init CS5536.
	[FULOONG]: Don't use serial until CS5536 is available.
	Set GPIO based on dumps.
	(serial_hw_init) [FULOONG]: Handle CS5536 parts.
	[FULOONG]: Handle GPIO and memory controller differences.
	Parse machine type in $a2.
	* grub-core/boot/mips/startup_raw.S: Determine and save the
	architecture.
	* grub-core/bus/cs5536.c (gpiodump): Move to fwstart.S.
	(grub_cs5536_init_geode): Remove gpio part. Conditionalise DIVIL
	init on architecture type.
	* grub-core/kern/mips/loongson/init.c (grub_machine_init): Init
	SIS315E. Don't init at_keyboard on fuloong.
	(grub_halt): Support Fuloong.
	* grub-core/kern/mips/startup.S [LOONGSON]: Save $s7.
	* grub-core/loader/mips/linux.c (LOONGSON_MACHTYPE): Removed.
	(loongson_machtypes): New array.
	(grub_cmd_linux) [GRUB_MACHINE_MIPS_LOONGSON]: Pass the right machine
	type.
	* grub-core/term/ns8250.c (serial_get_divisor): New parameter port and
	config. All users updated. Handle CS5536 serial.
	* grub-core/term/serial.c (grub_serial_register): Conditionalise
	default port on machine type. Register serial as inactive.
	* grub-core/video/sis315pro.c: New file.
	* include/grub/cs5536.h (GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED): New
	definition.
	(GRUB_CS5536_MSR_MAILBOX_CONFIG): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1): Likewise.
	(GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART1_CONF): Likewise.
	(GRUB_CS5536_MSR_DIVIL_UART2_CONF): Likewise.
	* include/grub/mips/loongson.h (GRUB_CPU_LOONGSON_SHUTDOWN_GPIO): Rename
	to ...
	(GRUB_CPU_YEELOONG_SHUTDOWN_GPIO): ... this.
	* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_YEELOONG): New
	definition.
	(GRUB_ARCH_MACHINE_FULOONG): Likewise.
	(grub_arch_machine): New extern var.
	* include/grub/mips/loongson/serial.h
	(GRUB_MACHINE_SERIAL_DIVISOR_115200): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0_DIVISOR_115200): ... this.
	(GRUB_MACHINE_SERIAL_PORT): Renamed to ...
	(GRUB_MACHINE_SERIAL_PORT0): ... this.
	(GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200): New definition.
	(GRUB_MACHINE_SERIAL_PORT1): Likewise.
	(GRUB_MACHINE_SERIAL_PORT2): Likewise.
	(GRUB_MACHINE_SERIAL_PORTS): Include ports 1 and 2.
	* include/grub/term.h (grub_term_register_input_inactive): New inline
	function.
	(grub_term_register_output_inactive): Likewise.
	* include/grub/video.h (grub_video_driver_id): New value
	GRUB_VIDEO_DRIVER_SIS315PRO.
	* util/grub-mkimage.c (image_target_desc): Rename name to dirname.
	New field "names". All users updated.
	New field value IMAGE_FULOONG_FLASH.
	(generate_image): USe separate fwstart hashes for yeeloong and fuloong.
2011-05-15 01:43:44 +02:00
Vladimir 'phcoder' Serbinenko 8b8a81fa6a Dynamically count the number of lines for the lower banner.
* grub-core/normal/menu_entry.c (per_term_screen): New member
	num_entries.
	(print_down): Use num_entries.
	(update_screen): Likewise.
	(grub_menu_entry_run): Set num_entries.
	* grub-core/normal/menu_text.c (menu_viewer_data): New member
	num_entries.
	(grub_print_message_indented): Move real part to ...
	(grub_print_message_indented_real): ... here. Additional argument
	dry_run.
	(draw_border): Additional argument num_entries.
	(print_message): Additional argument dry_run.
	(print_entries): Receive menu viewer data.
	(grub_menu_init_page): New argment num_entries.
	(menu_text_set_chosen_entry): Use num_entries.
	(grub_menu_try_text): Likewise.
	* grub-core/normal/term.c (print_ucs4_terminal): New argument dry_run.
	All users updated.
	(grub_ucs4_count_lines): New function.
	* include/grub/term.h (grub_term_cursor_x): Moved from here ..
	* grub-core/normal/menu_text.c (grub_term_cursor_x): ... to here.
	* include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): Removed.
	(grub_term_border_height): Likewise.
	(grub_term_num_entries): Likewise.
2011-04-10 13:56:23 +02:00
Vladimir 'phcoder' Serbinenko 74eea126f4 fuloong support 2011-01-18 15:28:44 +01:00
Vladimir 'phcoder' Serbinenko 3ba3c4567e Change GRUB_TERM_NO_KEY to 0 2010-08-23 13:21:53 +02:00
Vladimir 'phcoder' Serbinenko 9518e2a12b Macroify GRUB_TERM_NO_KEY and use grub_checkkey in grub_getkey 2010-08-23 12:53:42 +02:00
Vladimir 'phcoder' Serbinenko df2174dded Remove checkkey on term level 2010-08-23 12:07:49 +02:00
Vladimir 'phcoder' Serbinenko 96157c5378 Increase pre-repeat usb keyboad interval 2010-08-22 01:01:31 +02:00
Vladimir 'phcoder' Serbinenko 7e6975d7ea Support USB key repeat 2010-08-22 00:29:34 +02:00
Vladimir 'phcoder' Serbinenko fea90138d5 merge mainline into keylayouts 2010-08-20 22:13:19 +02:00
Vladimir 'phcoder' Serbinenko 52d8255d20 Support hot unplugging 2010-08-20 19:34:29 +02:00
Vladimir 'phcoder' Serbinenko e55e09628d Hook AT keyboard mapping 2010-08-19 15:00:31 +02:00
Vladimir 'phcoder' Serbinenko ed19677fe3 Revert all parts done for BIOS keymap translation 2010-08-19 13:32:36 +02:00
Vladimir 'phcoder' Serbinenko 7ea82054f5 Solve keypad-related issues 2010-08-19 04:13:32 +02:00
Vladimir 'phcoder' Serbinenko 2111447675 Add new flag SHIFT 2010-08-19 02:21:36 +02:00
Carles Pina i Estany b6f7b4ba03 Reimported heavily modified version of cpina's grub-mklayout 2010-08-19 02:15:29 +02:00
Vladimir 'phcoder' Serbinenko 7a6459e12d support for Fn keys 2010-08-19 01:07:50 +02:00
Vladimir 'phcoder' Serbinenko 2cccf4b0c4 Merge mainline into keylayouts 2010-08-18 22:28:47 +02:00
Vladimir 'phcoder' Serbinenko e8d0a8f85c Merge mainline into bidi 2010-07-02 19:35:07 +02:00
Vladimir 'phcoder' Serbinenko 919e37b0ac Inline setcolorstate and move grub_Cls out of kernel.img 2010-07-02 18:20:48 +02:00
Vladimir 'phcoder' Serbinenko b7e79e8a6a Merge mainline into yeeloongfw 2010-06-30 02:30:05 +02:00
Vladimir 'phcoder' Serbinenko 5667f2656d Add missing part of serial commit 2010-05-23 00:09:39 +02:00
Vladimir 'phcoder' Serbinenko 176194068f cleaner AltGr handling 2010-05-10 21:23:40 +02:00
Vladimir 'phcoder' Serbinenko 1ff38af9b9 Simplify AT keyboards and support 102nd key 2010-05-10 20:57:01 +02:00
Vladimir 'phcoder' Serbinenko 08bfb543c4 Add key_102 2010-05-10 15:04:46 +02:00
Vladimir 'phcoder' Serbinenko 87fae34a1f Skeleton for keyboard layouts 2010-05-10 14:54:51 +02:00
Vladimir 'phcoder' Serbinenko 232dbbe509 Rename 'VGA' character set to CP-437 2010-05-09 13:26:52 +02:00
Vladimir 'phcoder' Serbinenko b764bff263 Move arrow number into unicode characters array 2010-05-09 12:56:32 +02:00
Vladimir 'phcoder' Serbinenko 3c151d94af simplify setcolor/getcolor 2010-05-08 01:06:22 +02:00
Vladimir 'phcoder' Serbinenko d8e9099811 Move serial encoding handling to terminfo.c 2010-05-08 00:17:23 +02:00
Vladimir 'phcoder' Serbinenko 58664b94b7 pass pointer to term to term functions 2010-05-07 02:30:44 +02:00
Vladimir 'phcoder' Serbinenko 787928e31e Remove newline_hook declaration 2010-04-09 23:15:33 +02:00
Vladimir 'phcoder' Serbinenko d56a6ac7f6 Remove handlers 2010-03-27 00:19:42 +01:00
Vladimir 'phcoder' Serbinenko 3f8ae91c09 Use FOR_LIST_ELEMENTS convenience macros 2010-03-26 19:32:21 +01:00
Vladimir 'phcoder' Serbinenko 6c363dfd54 Fix doublewidth character handling 2010-03-16 21:29:15 +01:00
Vladimir 'phcoder' Serbinenko bf17ef45d6 Rename UCS4 to glyph description 2010-03-16 19:23:21 +01:00
Vladimir 'phcoder' Serbinenko 05c15154a2 Visual(sic) UTF-8 support 2010-03-16 10:39:18 +01:00
Vladimir 'phcoder' Serbinenko 0a239a8211 bidi works in terminal in grub-emu 2010-03-15 21:14:11 +01:00
Vladimir 'phcoder' Serbinenko dfed5c6bb4 Removed grub_putchar 2010-03-15 11:49:27 +01:00
Robert Millan 9444b678a1 2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
* include/grub/term.h (grub_term_register_input,
	grub_term_register_output): Check return of terminal init()
	routines, and abort if errors are raised.
	
	* commands/terminal.c: Update copyright year.
2010-01-18 19:43:39 +00:00
Robert Millan 822873a7da Eliminate grub_term_register_{input,output}_active. Default terminals are
automatically activated because they're the only terminal that has been loaded.

This solution is temporary.  In the future, all terminals should auto-enable,
but this is non-trivial due to resource conflict, and it shouldn't prevent
merge in trunk.
2010-01-09 23:42:17 +01:00
Vladimir 'phcoder' Serbinenko 519634516f Merge mainline into multiterm 2010-01-05 16:27:41 +01:00
carles 3393790450 2010-01-01 Carles Pina i Estany <carles@pina.cat>
* commands/help.c: Include `grub/mm.h' and `grub/normal.h'.
	(grub_cmd_help): Print the cmd->name before the cmd->summary. Cut the
	string using string width.
	* normal/menu_text.c (grub_print_message_indented): Use
	grub_print_spaces and not print_spaces.
	(print_timeout): Likewise.
	(print_spaces): Move to...
	* include/grub/term.h: ... here. Change the name to grub_print_spaces.
2010-01-01 18:58:00 +01:00
Vladimir 'phcoder' Serbinenko 33c1ed4c8d terminal modules autoloading 2009-12-25 03:37:20 +01:00