Skip to contentSkip to conversation

x86 serial support

PATCH Omniflux 5 participants 15 messages Feb 21, 2005 – Sep 11, 2005

lore
Share & tools
lore

Omniflux

author
#0 lore raw

Here is a patch to add serial support to x86.

It is a porting of grub-legacy's serial support, copies of grub-legacy's tparms.{c,h} and terminfo.{c.h} and modifications based on grub2's term/i386/pc/vga.c, disk/loopback.c (to add a grub command), and util/console.c

It still needs a lot of work (it does not even let you specify serial port settings yet), but I don't want to spend any more time on it if it is not going to be used.

If this is headed in the right direction, and likely to be accepted for merging with a little more work, I'll keep working on it.

Please let me know.

Signature · 1 line
Omniflux
conf/i386-pc.mk +47 -2
diff -uNr grub2/conf/i386-pc.mk grub2.newserial/conf/i386-pc.mk
@@ -253,7 +253,7 @@
 	file.h fs.h kernel.h loader.h misc.h mm.h net.h rescue.h symbol.h \
 	term.h types.h machine/biosdisk.h machine/boot.h \
 	machine/console.h machine/init.h machine/memory.h \
-	machine/loader.h partition.h pc_partition.h machine/time.h machine/vga.h
+	machine/loader.h partition.h pc_partition.h machine/time.h machine/vga.h machine/serial.h
 kernel_img_CFLAGS = $(COMMON_CFLAGS)
 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
 kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200
@@ -902,7 +902,7 @@
 pkgdata_MODULES = _chain.mod _linux.mod linux.mod fat.mod ufs.mod ext2.mod minix.mod \
 	hfs.mod jfs.mod normal.mod hello.mod vga.mod font.mod _multiboot.mod ls.mod \
 	boot.mod cmp.mod cat.mod terminal.mod fshelp.mod chain.mod multiboot.mod \
-	amiga.mod apple.mod pc.mod loopback.mod reboot.mod halt.mod help.mod
+	amiga.mod apple.mod pc.mod loopback.mod reboot.mod halt.mod help.mod serial.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -1817,6 +1817,51 @@
 
 vga_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For serial.mod.
+serial_mod_SOURCES = term/i386/pc/serial.c term/tparm.c term/terminfo.c
+CLEANFILES += serial.mod mod-serial.o mod-serial.c pre-serial.o serial_mod-term_i386_pc_serial.o def-serial.lst und-serial.lst
+MOSTLYCLEANFILES += serial_mod-term_i386_pc_serial.d
+DEFSYMFILES += def-serial.lst
+UNDSYMFILES += und-serial.lst
+
+serial.mod: pre-serial.o mod-serial.o
+	-rm -f $@
+	$(LD) -r -d -o $@ $^
+	$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
+
+pre-serial.o: serial_mod-term_i386_pc_serial.o serial_mod-term_i386_pc_terminfo.o serial_mod-term_i386_pc_tparm.o
+	-rm -f $@
+	$(LD) -r -d -o $@ $^
+
+mod-serial.o: mod-serial.c
+	$(CC) $(CPPFLAGS) $(CFLAGS) $(serial_mod_CFLAGS) -c -o $@ $<
+
+mod-serial.c: moddep.lst genmodsrc.sh
+	sh $(srcdir)/genmodsrc.sh 'serial' $< > $@ || (rm -f $@; exit 1)
+
+def-serial.lst: pre-serial.o
+	$(NM) -g --defined-only -P -p $< | sed 's/^\([^ ]*\).*/\1 serial/' > $@
+
+und-serial.lst: pre-serial.o
+	echo 'serial' > $@
+	$(NM) -u -P -p $< | cut -f1 -d' ' >> $@
+
+serial_mod-term_i386_pc_serial.o: term/i386/pc/serial.c
+	$(CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(CPPFLAGS) $(CFLAGS) $(serial_mod_CFLAGS) -c -o $@ $<
+
+serial_mod-term_i386_pc_serial.d: term/i386/pc/serial.c
+	set -e;	$(CC) -Iterm/i386/pc -I$(srcdir)/term/i386/pc $(CPPFLAGS) $(CFLAGS) $(serial_mod_CFLAGS) -M $<	| sed 's,serial\.o[ :]*,serial_mod-term_i386_pc_serial.o $@ : ,g' > $@;	[ -s $@ ] || rm -f $@
+
+serial_mod-term_i386_pc_terminfo.o: term/terminfo.c
+	$(CC) -Iterm -I$(srcdir)/term $(CPPFLAGS) $(CFLAGS) $(serial_mod_CFLAGS) -c -o $@ $<
+
+serial_mod-term_i386_pc_tparm.o: term/tparm.c
+	$(CC) -Iterm -I$(srcdir)/term $(CPPFLAGS) $(CFLAGS) $(serial_mod_CFLAGS) -c -o $@ $<
+
+-include serial_mod-term_i386_pc_serial.d
+
+serial_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For font.mod.
 font_mod_SOURCES = font/manager.c
 CLEANFILES += font.mod mod-font.o mod-font.c pre-font.o font_mod-font_manager.o def-font.lst und-font.lst
conf/i386-pc.rmk +6 -1
diff -uNr grub2/conf/i386-pc.rmk grub2.newserial/conf/i386-pc.rmk
@@ -33,7 +33,8 @@
 	file.h fs.h kernel.h loader.h misc.h mm.h net.h rescue.h symbol.h \
 	term.h types.h machine/biosdisk.h machine/boot.h \
 	machine/console.h machine/init.h machine/memory.h \
-	machine/loader.h partition.h pc_partition.h machine/time.h machine/vga.h
+	machine/loader.h partition.h pc_partition.h machine/time.h machine/vga.h machine/serial.h
+
 kernel_img_CFLAGS = $(COMMON_CFLAGS)
 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
 kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200
@@ -187,6 +188,10 @@
 vga_mod_SOURCES = term/i386/pc/vga.c
 vga_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For serial.mod.
+serial_mod_SOURCES = term/i386/pc/serial.c term/tparm.c term/terminfo.c
+serial_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For font.mod.
 font_mod_SOURCES = font/manager.c
 font_mod_CFLAGS = $(COMMON_CFLAGS)
include/grub/i386/pc/serial.h +85 -0

85 lines not on this page · raw message

include/grub/terminfo.h +53 -0

53 lines not on this page · raw message

include/grub/tparm.h +28 -0
diff -uNr grub2/include/grub/tparm.h grub2.newserial/include/grub/tparm.h
@@ -0,0 +1,28 @@
+/* tparm.h - parameter formatting of terminfo */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2002  Free Software Foundation, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef GRUB_TPARM_HEADER
+#define GRUB_TPARM_HEADER	1
+
+
+/* Function prototypes.  */
+char *grub_tparm (const char *string, ...);
+
+#endif /* ! GRUB_TERMCAP_HEADER */
term/i386/pc/serial.c +592 -0

592 lines not on this page · raw message

term/terminfo.c +279 -0

279 lines not on this page · raw message

term/tparm.c +725 -0

725 lines not on this page · raw message

#1 lore raw

Sorry, I forgot to send a reply.

Quoted 1 line · Omniflux

Here is a patch to add serial support to x86.

Great.

Quoted 2 lines

If this is headed in the right direction, and likely to be accepted for merging with a little more work, I'll keep working on it.

I think this is a good way. But some problems must be solved:

- Naming issues. Since you copied the code from GRUB Legacy, some names are not appropriate in GRUB 2. For example, the global function declared in terminfo.h do not use the prefix 'grub_' at all.

- Module separation. I think it would be better to have a separate module for terminfo, because we might be able to use it for other terminals as well as serial console, say, parallel console.

- ChangeLog. Please write ChangeLog entries for your changes.

BTW, do you have any suggestion about the so-called "dumb terminal"? Because supporting dumb terminal is horrible, I hesitate to support it in GRUB 2, if there is no clean way to do it.

Okuji

author
#2 lore raw

It's been a few months, but here are some updated patches.

The terminfo patch probably needs to be applied first.

Quoted 3 lines · Yoshinori K. Okuji

- Naming issues. Since you copied the code from GRUB Legacy, some names are not appropriate in GRUB 2. For example, the global function declared in terminfo.h do not use the prefix 'grub_' at all.

I think I have fixed these all correctly...

Quoted 3 lines

- Module separation. I think it would be better to have a separate module for terminfo, because we might be able to use it for other terminals as well as serial console, say, parallel console.

Done.

Quoted 1 line

- ChangeLog. Please write ChangeLog entries for your changes.

Attached.

Quoted 3 lines

BTW, do you have any suggestion about the so-called "dumb terminal"? Because supporting dumb terminal is horrible, I hesitate to support it in GRUB 2, if there is no clean way to do it.

The only thing I can think of is to disable the menu and replace clear screen with a newline, which is what Legacy does IIRC.

I need some input on how to complete the function
grub_terminfo_set_current in term/terminfo.c.

Feedback on anything else would also be appreciated.

Thanks!

Signature · 1 line
Omniflux
conf/i386-pc.rmk +5 -1
diff -uNr grub2/conf/i386-pc.rmk grub2.terminfo/conf/i386-pc.rmk
@@ -110,7 +110,7 @@
 	font.mod _multiboot.mod ls.mod boot.mod cmp.mod cat.mod		\
 	terminal.mod fshelp.mod chain.mod multiboot.mod amiga.mod	\
 	apple.mod pc.mod sun.mod loopback.mod reboot.mod halt.mod	\
-	help.mod default.mod timeout.mod configfile.mod
+	help.mod default.mod timeout.mod configfile.mod terminfo.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -211,6 +211,10 @@
 font_mod_SOURCES = font/manager.c
 font_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For terminfo.mod.
+terminfo_mod_SOURCES = term/terminfo.c term/tparm.c
+terminfo_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For _multiboot.mod.
 _multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
 _multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
include/grub/terminfo.h +49 -0

49 lines not on this page · raw message

include/grub/tparm.h +28 -0
diff -uNr grub2/include/grub/tparm.h grub2.terminfo/include/grub/tparm.h
@@ -0,0 +1,28 @@
+/* tparm.h - parameter formatting of terminfo */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2002,2005  Free Software Foundation, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef GRUB_TPARM_HEADER
+#define GRUB_TPARM_HEADER	1
+
+
+/* Function prototypes.  */
+char *grub_terminfo_tparm (const char *string, ...);
+
+#endif /* ! GRUB_TPARM_HEADER */
term/terminfo.c +157 -0

157 lines not on this page · raw message

term/tparm.c +769 -0

769 lines not on this page · raw message

conf/i386-pc.rmk +6 -1
diff -uNr grub2/conf/i386-pc.rmk grub2.serial/conf/i386-pc.rmk
@@ -110,7 +110,8 @@
 	font.mod _multiboot.mod ls.mod boot.mod cmp.mod cat.mod		\
 	terminal.mod fshelp.mod chain.mod multiboot.mod amiga.mod	\
 	apple.mod pc.mod sun.mod loopback.mod reboot.mod halt.mod	\
-	help.mod default.mod timeout.mod configfile.mod terminfo.mod
+	help.mod default.mod timeout.mod configfile.mod terminfo.mod	\
+	serial.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -215,6 +216,10 @@
 terminfo_mod_SOURCES = term/terminfo.c term/tparm.c
 terminfo_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For serial.mod.
+serial_mod_SOURCES = term/i386/pc/serial.c
+serial_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For _multiboot.mod.
 _multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
 _multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
conf/i386-pc.rmk.orig +5 -1
diff -uNr grub2/conf/i386-pc.rmk.orig grub2.serial/conf/i386-pc.rmk.orig
@@ -110,7 +110,7 @@
 	font.mod _multiboot.mod ls.mod boot.mod cmp.mod cat.mod		\
 	terminal.mod fshelp.mod chain.mod multiboot.mod amiga.mod	\
 	apple.mod pc.mod sun.mod loopback.mod reboot.mod halt.mod	\
-	help.mod default.mod timeout.mod configfile.mod
+	help.mod default.mod timeout.mod configfile.mod terminfo.mod
 
 # For _chain.mod.
 _chain_mod_SOURCES = loader/i386/pc/chainloader.c
@@ -211,6 +211,10 @@
 font_mod_SOURCES = font/manager.c
 font_mod_CFLAGS = $(COMMON_CFLAGS)
 
+# For terminfo.mod.
+terminfo_mod_SOURCES = term/terminfo.c term/tparm.c
+terminfo_mod_CFLAGS = $(COMMON_CFLAGS)
+
 # For _multiboot.mod.
 _multiboot_mod_SOURCES = loader/i386/pc/multiboot.c
 _multiboot_mod_CFLAGS = $(COMMON_CFLAGS)
include/grub/i386/pc/serial.h +97 -0

97 lines not on this page · raw message

term/i386/pc/serial.c +575 -0

575 lines not on this page · raw message

* term/terminfo.c: Copy from GRUB Legacy. include/grub/terminfo.h: Likewise
Update for GRUB 2.
Remove unused functions.
Remove dependency on serial module.
Rename functions to match GRUB 2 coding style. Add preliminary support for multiple terminfo types. Add GRUB 2 command.

* term/tparm.c: Copy from GRUB Legacy. include/grub/tparm.h: Likewise
Resync with ncurses-5.4.
Rename exported function to match GRUB 2 coding style

* conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod. (terminfo_mod_SOURCES): New variable. (terminfo_mod_CFLAGS): Likewise.

* term/i386/pc/serial.c: Copy from GRUB Legacy. include/grub/i386/pc/serial.h: Likewise
Update for GRUB 2.
Rename functions to match GRUB 2 coding style. Restructure code to minimize scopes and simplify functions. Make assembly functions inline.
Add GRUB 2 command.

* conf/i386-pc.rmk (pkgdata_MODULES): Added serial.mod. (serial_mod_SOURCES): New variable. (serial_mod_CFLAGS): Likewise.

#3 lore raw
Quoted 6 lines

The only thing I can think of is to disable the menu and replace clear screen with a newline, which is what Legacy does IIRC.

But GRUB Legacy has also a dumb menu support even if it's horrible. Perhaps we must do it like LILO does? Or should we do it more universally? I propose to make menus like terms: you can have multiple menus registered but only one chosen. Now we can have normal menu + lilo-like. Then we can implement eye-candy menu (in VESA mode, perhaps with mouse support). Another idea: it would be good if from normal menu one could go to lilo-like
just with a key or key combination (what about 'l' key?) in case when there is
no display attached or terminal problem.
What do you think about this?

Vladimir

#4 lore raw
In reply to Omniflux

Omniflux <[email protected]> writes:

Hi Omniflux,

Quoted 3 lines

It's been a few months, but here are some updated patches.

The terminfo patch probably needs to be applied first.

Thanks for your new patch! :)

Quoted 6 lines
Quoted 3 lines

BTW, do you have any suggestion about the so-called "dumb terminal"? Because supporting dumb terminal is horrible, I hesitate to support it in GRUB 2, if there is no clean way to do it.

The only thing I can think of is to disable the menu and replace clear screen with a newline, which is what Legacy does IIRC.

Why can't we use a menu? Is it really that slow to update the menu over a serial console?

I'll review your patch ASAP.

Thanks,
Marco

#5 lore raw
Quoted 2 lines · Marco Gerards

Why can't we use a menu? Is it really that slow to update the menu over a serial console?

In a dumb terminal, the problem is that there is no way to go back to a previous line.

Honestly, I do not want to support dumb terminals. They are rarely used nowadays, even though the maintenance cost of an independent menu interface is quite high. Today, even fancy serial terminals are also disappearing. Since most embedded systems have ethernet interfaces, the future will be net console rather than serial console.

Okuji

author
#7 lore raw
In reply to Marco Gerards
Quoted 7 lines · Marco Gerards
Quoted 4 lines
Quoted 1 line

BTW, do you have any suggestion about the so-called "dumb terminal"?

The only thing I can think of is to disable the menu and replace clear screen with a newline, which is what Legacy does IIRC.

Why can't we use a menu? Is it really that slow to update the menu over a serial console?

This is a communication problem caused by the fact that dumb terminal does not have a universally accepted definition. In this case, we are talking about a terminal without cursor control, such as a glass tty or teletype.

The following paragraph can be ignored if the above clarifies the issue. It contains examples for anyone else.

To implement a menu for this terminal would entail redrawing the screen each time something must be changed. This could be incredibly slow as many of these terminals have speeds of less then 110 bps. This also leaves the problem of marking the current menu selection, as we cannot use either color or reverse video. We would also be unable to reposition the cursor to (0,0) for the redraw, because we cannot be sure of the display size and thus the number of newlines which must be sent to move a line of text to that position. If the terminal is actually a display on paper terminal, we also have the problem of the waste of paper redisplaying the screen would create.

Why anyone would now be using such a terminal I do not know, but if we do not mention the proper way to use such a terminal, or not to use such a terminal at all, I'm sure someone will try it.

Signature · 1 line
Omniflux
#6 lore raw
In reply to Yoshinori K. Okuji

Gee...how long has it been since I threw out the old TTYs and LA120s I used to use as consoles!!! But I know in the realm I work (networking gear and telecom server), serial consoles will continue to be there. Even the latest cPCI blade servers all have a serial port for consoles, if for nothing else than to set parameters for things like dhcp, long before the network is up. Indeed, the equipment one of my employer's OEM partners is getting from Intel by default has a serial console configured (9600 8N1) which allows you to get into the BIOS or do anything else. And a PXE booted GRUB 1 worked great on it, and was able to load the ISL image to prep the disk in these boxes with our network switch software.

My personal opinion is to say that for serial ports, the minimum we should consider should be ANSI or VT100. After all, who out there cannot get their hands on a package such as Kermit. It has been an age, but IIRC, even the program on Windows supports these two types. But if you think about it, it should not be that hard to output 24 or 25 lines each time you need to redraw.

- Doug

Quoted 20 lines · Yoshinori K. Okuji
Quoted 2 lines · Marco Gerards

Why can't we use a menu? Is it really that slow to update the menu over a serial console?

In a dumb terminal, the problem is that there is no way to go back to a previous line.

Honestly, I do not want to support dumb terminals. They are rarely used nowadays, even though the maintenance cost of an independent menu interface is quite high. Today, even fancy serial terminals are also disappearing. Since most embedded systems have ethernet interfaces, the future will be net console rather than serial console.

Okuji

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 4 lines
Douglas Wade Needham - KA8ZRT        UN*X Consultant & UW/BSD kernel programmer
Email:  cinnion @ ka8zrt . com       http://cinnion.ka8zrt.com
Disclaimer: My opinions are my own.  Since I don't want them, why
            should my employer, or anybody else for that matter! 
#8 lore raw
In reply to Omniflux

Omniflux <[email protected]> writes:

Hi,

Quoted 3 lines

Why anyone would now be using such a terminal I do not know, but if we do not mention the proper way to use such a terminal, or not to use such a terminal at all, I'm sure someone will try it.

There are also people using 286 computers, etc. My opinion is that we should focus on the most important things first. That is vt100/ansi support first. If someone really wants dumb terminal support he can explain why and he can implement it if it does not break anything else. What do you think?

--
Marco

#9 lore raw
Quoted 5 lines · Marco Gerards

There are also people using 286 computers, etc. My opinion is that we should focus on the most important things first. That is vt100/ansi support first. If someone really wants dumb terminal support he can explain why and he can implement it if it does not break anything else. What do you think?

"if it does not break anything else" would be quite hard. If someone really wants to support dumb terminals, she must also modify the command-line interface, like I did in GRUB Legacy.

I agree with you, however. Only if anyone absolutely needs dumb terminal support, it should be implemented.

Okuji

#10 lore raw
In reply to Omniflux
Quoted 1 line · Omniflux

It's been a few months, but here are some updated patches.

I've checked in your patch with some modification right now. I changed these below:

- I removed EXPORT_FUNC from terminfo.h. EXPORT_FUNC is required only if you want to export symbols from the kernel.

- I moved the inline functions in serial.h to serial.c, because they are not used outside.

- I fixed bad indentation.

- I removed odd const qualifiers to integers.

- I fixed a memory leak in the serial command.

I might have changed some other minor things as well.

For now, terminfo.c has code of interpreting terminfo, but supports only vt100. Do you intend to fix this?

Okuji

#11 lore raw
Quoted 5 lines · Yoshinori K. Okuji
Quoted 1 line · Omniflux

It's been a few months, but here are some updated patches.

I've checked in your patch with some modification right now. I changed these below:

[...]

Great! :-)

Quoted 1 line

vt100. Do you intend to fix this?

It would be nice if we could use terminfo for the open firmware console, which is an ANSI console basically.

--
Marco

author
#13 lore raw
In reply to Yoshinori K. Okuji
Quoted 2 lines · Yoshinori K. Okuji

For now, terminfo.c has code of interpreting terminfo, but supports only vt100. Do you intend to fix this?

Yes, but I do not know how I should do this. As the comment in the file says...

/* TODO
* Lookup user specified terminfo type (escape code table). If found,
set term variables
* as appropriate. Otherwise return an error.
*
* How should this be done?
* a. A static table included in this module.
* - I do not like this idea.
* b. A table stored in the configuration directory.
* - Users must convert their terminfo settings if we have not
already.
* c. Look for terminfo files in the configuration directory.

   *     - /usr/share/terminfo is 6.3M on my system.
   *     - /usr/share/terminfo is not on most users boot partition.
   *     + Copying the terminfo files you want to use to the grub

* configuration directory is easier then (b).
* d. Your idea here.
*/

Option 'a' is certainly the easiest, but how do I choose which terminals to support? How do I test them?

Option 'b', choosing which terminals and testing them is no longer my problem, but this moves all the burden onto the user.

Option 'c', problems as listed above.

If you would like to choose one of these methods, or come up with option 'd', I'll implement it.

Signature · 1 line
Omniflux
#12 lore raw
In reply to Marco Gerards
Quoted 2 lines · Marco Gerards

It would be nice if we could use terminfo for the open firmware console, which is an ANSI console basically.

Isn't it vt100-compatible? vt100 is also based on ANSI.

Okuji

#14 lore raw
In reply to Omniflux
Quoted 2 lines · Omniflux

Option 'a' is certainly the easiest, but how do I choose which terminals to support? How do I test them?

Having a static table (for all terminals) is clearly nonsense for tparm.c, since the purpose of this file is to interpret a terminfo file. If we embed binary code, there is no reason to have such interpretation code.

Quoted 2 lines

Option 'b', choosing which terminals and testing them is no longer my problem, but this moves all the burden onto the user.

I think you know this, but GRUB Legacy uses this way. For now, I think this is the best way, since most terminals are vt100-compatible, and the user does not have to do anything in this case.

Quoted 1 line

Option 'c', problems as listed above.

For me, this sounds overkill.

Okuji