[ipxe-devel] Entering String in menu-context possible?

Leo Baltus Leo.Baltus at omroep.nl
Mon Apr 15 07:48:53 UTC 2013

Op 12/04/2013 om 13:58:33 +0100, schreef Michael Brown:
> On Friday 12 Apr 2013 08:17:02 Andrew Bobulsky wrote:
> > > Not directly, no.  However, you can use ANSI escape sequences to position
> > > the cursor and set the foreground and background colours immediately
> > > before issuing the "read" command.
> > 
> > So... Are we talking like a crude hack, or can we toss a metric ton of
> > ANSI insanity at iPXE to (hopefully) land somewhere between a nice
> > looking multi-entry custom config menu and a warez demo file?
> iPXE uses the abstraction of an ANSI console for all console output.  The BIOS 
> (and EFI) console layers implement support for a subset of ANSI escape 
> sequences including cursor movement and colour control.  The serial console 
> simply sends the raw ANSI output over the serial port and relies on the remote 
> end's terminal software to display something appropriate.
> Since iPXE uses ANSI sequences to generate the existing menu display, you're 
> guaranteed to be able to produce something looking identical by using hand-
> rolled ANSI sequences.  The script might not be pretty, but it will work.
> What you can't (easily) do is recreate the horizontally scrollable edit boxes 
> used by "config" and "login".  It would be viable to expose this functionality 
> as a separate command, e.g. "edit".  It would be difficult to expose the various 
> plausible ways of exiting an edit box (e.g. tab, up/down keys); you would 
> probably be limited to either success (user pressed Enter) or failure (user 
> pressed Ctrl-C or Escape).  Total cost would be (estimated) around 300 bytes, 
> which is quite substantial.  Is it worth doing?

Just a thought: would it make sense to have some sort of framework that 
allows several fields to be editted just like config and login and have 
config and login use that so that 'edit' could benefit from it too.

I think it would be cool to be able to edit a few variables in one 'edit' 
session so you could visually edit for instance both kernel, initrd, and 
command-line options.

Would that be cheaper on the byte-count?

Leo Baltus, internetbeheerder                         /\
NPO ICT Internet Services                            /NPO/\
Sumatralaan 45, 1217 GP Hilversum, Filmcentrum, west \  /\/
servicedesk at omroep.nl, 035-6773555                    \/

More information about the ipxe-devel mailing list