[UPDATE] New Boot-Loader Menu -- version 1.4

Devin Teske dteske at vicor.com
Sun May 8 17:49:12 UTC 2011


On May 7, 2011, at 8:24 PM, 兰清 wrote:

> Hi Devin,

Hi Lan,


>    This loader menu is awesome!

Thank you.


> But as I opinion, items (1,6,7) and (2,3,4,5) are two different thing.

Hmmm. You're right.


> 	1.Boot[Enter]
> 	6.Escape to loader prompt 
> 	7.Reboot
>   These options are booting action.

Interesting idea to group them that way.


> 	2.ACPI Support
> 	3.Boot Safe Mode
> 	4.Boot Single User
> 	5.Boot Verbose
>   These options are booting configures.

I follow you so far.


>  Separate them will be better, like this
> -----------------------------------------------------------------
> |	1.Boot                                                              |
> |	2.Prompt                                                          |
> |	3.Reboot                                                          |
> |            									|
> |Configuration: 							|
> |	1.ACPI Support						|
> |	2.Safe Mode							|
> |	3.Single User Mode						|
> |	4.Verbose Boot Mode					|
> |---------------------------------------------------------------|
>   Do you think so?

That's an interesting idea, and I gave it some good thought... until...

I realized that if you pressed "1" on the keyboard, would it boot or would it toggle "ACPI Support".

To implement a dual-menu system, either the numbers would have to go entirely, or the numbers would have to not overlap.

The code is not currently situated to do any of the following which would be required to implement what you're recommending above (either as a single-menu or as a dual-menu with non-overlapping menuitem keycodes):

1. Not currently possible to display two menus simultaneously (only one "getkey" function can be waiting for keyboard input at once, so [a] either the "menu-init" or "menu-create" function would need to be rewritten to dynamically allocate variables rather than using static identifiers, [b] the "menu-create" function would need to change scope to allow multiple menus to be defined each with their own unique properties including captions and position, and [c] the "menu-display" function would need to test keycodes for multiple menus that were generated by "menu-create" -- all of which are contained within /boot/menu.4th).

2. Not currently possible (with a single menu) to display a gap. Even defining a NULL caption will still cause the number to be printed to the left of the menuitem. Though I'm sure with a trivial tweak to "printmenuitem" (in /boot/menu.4th), checking the length identifier of the C-Addr couplet to be non-zero on the stack prior to dropping the dup'd menuidx to screen should suffice. However, even if you do that, you would then come to your next challenge...

3. The menu does not support tiered captions. In your example above, you've got "Configuration:" as a header for the remaining four options. That header would have to be printed manually in fourth (e.g., ``: cap ( X Y -- ) at-xy ." Configuration:" ; 4 17 cap'')

Numbers 2 and 3 are easy enough to overcome, but there's currently strong motivation to keep the menu recognizable and "in the same order" for long-time users. Given said motivation in-addition to the only two major short-comings of your proposal:

- The two menus have overlapping numbers
- The menu system does not support multiple (separate/simultaneous) menus

I would like to see general consensus from the community for separating the items before moving ahead with such a non-trivial change.

I thank you for your suggestion and appreciate the effort you put into it.
-- 
Cheers,
Devin


> 
> At 2011-05-05 16:20:43,"Devin Teske" <dteske at vicor.com> wrote:
> 
> >Hello fellow -hackers,
> >
> >I'm so very proud to offer the latest update to my new boot loader menu -- version 1.4 -- addressing ACPI detection, bringing it in-line with HEAD.
> >
> >It took some work and a few days, but I got it! Have a look below for six different displays (three different scenarios -- i386 w/ ACPI, i386 w/o ACPI, and non-i386 -- each in both B&W and Color).
> >
> >Running on i386-compatible hardware supporting ACPI:
> >B&W (standard): http://twitpic.com/4tlsin
> >Color (loader_color=YES): http://twitpic.com/4tlt6l
> >
> >Running on i386-compatible hardware lacking ACPI support:
> >B&W (standard): http://twitpic.com/4tltp0
> >Color (loader_color=YES): http://twitpic.com/4tlu5w
> >
> >Running on non-i386 hardware:
> >B&W (standard): http://twitpic.com/4tluio
> >Color (loader_color=YES): http://twitpic.com/4tluuy
> >
> >This version is feature complete with HEAD and backward compatible to 7.0-RELEASE.
> >
> >I do hope you like this latest version. You can get your update at:
> >
> >http://druidbsd.sourceforge.net/
> >	or
> >http://druidbsd.sourceforge.net/download/loader_menu-1.4.tgz
> >-- 
> >Cheers,
> >Devin Teske
> >
> >-> FUN STUFF <-
> >-----BEGIN GEEK CODE BLOCK-----
> >Version 3.12
> >GAT/CS/B/CC/E/IT/MC/M/MU/P/S/TW d+(++) s: a- C+++@$ UB++++$ P++++@$ L++++$ E-
> >W+++ N? o? K? w@ O M++$ V- PS+>++ PE@ Y+ PGP-> t(+) 5? X(+) R(-) tv+ b+>++ DI+
> >D+(++) G++ e>++++ h r+++ z+++
> >------END GEEK CODE BLOCK------
> >http://www.geekcode.com/
> >
> >-> LEGAL DISCLAIMER <-
> >This message  contains confidential  and proprietary  information
> >of the sender,  and is intended only for the person(s) to whom it
> >is addressed. Any use, distribution, copying or disclosure by any
> >other person  is strictly prohibited.  If you have  received this
> >message in error,  please notify  the e-mail sender  immediately,
> >and delete the original message without making a copy.
> >
> >-> END TRANSMISSION <-
> >
> >_____________
> >
> >The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
> >_____________
> >_______________________________________________
> >freebsd-hackers at freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> 
> 


_____________

The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
_____________


More information about the freebsd-hackers mailing list