Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 May 2011 10:48:55 -0700
From:      Devin Teske <dteske@vicor.com>
To:        =?utf-8?B?5YWw5riF?= <while1@163.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: [UPDATE] New Boot-Loader Menu -- version 1.4
Message-ID:  <313C949D-643A-422F-98A4-72C9F3AE3181@vicor.com>
In-Reply-To: <57a102e1.9eab.12fcda25c3a.Coremail.while1@163.com>
References:  <65D3163B-427B-41F6-80B9-7BA4AF794939@vicor.com> <57a102e1.9eab.12fcda25c3a.Coremail.while1@163.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On May 7, 2011, at 8:24 PM, =E5=85=B0=E6=B8=85 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=20
> 	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 entire=
ly, or the numbers would have to not overlap.

The code is not currently situated to do any of the following which would b=
e 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 "ge=
tkey" 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 dynami=
cally allocate variables rather than using static identifiers, [b] the "men=
u-create" function would need to change scope to allow multiple menus to be=
 defined each with their own unique properties including captions and posit=
ion, and [c] the "menu-display" function would need to test keycodes for mu=
ltiple menus that were generated by "menu-create" -- all of which are conta=
ined within /boot/menu.4th).

2. Not currently possible (with a single menu) to display a gap. Even defin=
ing 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 ch=
allenge...

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 head=
er 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 m=
otivation to keep the menu recognizable and "in the same order" for long-ti=
me users. Given said motivation in-addition to the only two major short-com=
ings 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.
--=20
Cheers,
Devin


>=20
> At 2011-05-05 16:20:43=EF=BC=8C"Devin Teske" <dteske@vicor.com> wrote:
>=20
> >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 si=
x different displays (three different scenarios -- i386 w/ ACPI, i386 w/o A=
CPI, 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=3DYES): http://twitpic.com/4tlt6l
> >
> >Running on i386-compatible hardware lacking ACPI support:
> >B&W (standard): http://twitpic.com/4tltp0
> >Color (loader_color=3DYES): http://twitpic.com/4tlu5w
> >
> >Running on non-i386 hardware:
> >B&W (standard): http://twitpic.com/4tluio
> >Color (loader_color=3DYES): 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
> >--=20
> >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 confiden=
tial. 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 aw=
are that any message addressed to our domain is subject to archiving and re=
view by persons other than the intended recipient. Thank you.
> >_____________
> >_______________________________________________
> >freebsd-hackers@freebsd.org mailing list
> >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or=
g"
>=20
>=20


_____________

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?313C949D-643A-422F-98A4-72C9F3AE3181>