From owner-freebsd-hackers@FreeBSD.ORG Sun May 8 17:49:12 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0029B1065673 for ; Sun, 8 May 2011 17:49:11 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id BC2F28FC23 for ; Sun, 8 May 2011 17:49:11 +0000 (UTC) Received: from sbhfislrext02.fnfis.com ([192.168.249.140]) by SCSFISLTC02 (8.14.3/8.14.3) with ESMTP id p48HmwuI021670; Sun, 8 May 2011 12:48:58 -0500 Received: from SBHFISLTCGW04.FNFIS.COM (Not Verified[10.132.248.123]) by sbhfislrext02.fnfis.com with MailMarshal (v6, 5, 4, 7535) id ; Sun, 08 May 2011 12:49:06 -0500 Received: from sbhfisltcgw02.FNFIS.COM ([10.132.248.122]) by SBHFISLTCGW04.FNFIS.COM with Microsoft SMTPSVC(6.0.3790.4675); Sun, 8 May 2011 12:48:58 -0500 Received: from [10.0.0.102] ([10.132.254.136]) by sbhfisltcgw02.FNFIS.COM over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 8 May 2011 12:48:57 -0500 Mime-Version: 1.0 (Apple Message framework v1084) From: Devin Teske X-Priority: 3 In-Reply-To: <57a102e1.9eab.12fcda25c3a.Coremail.while1@163.com> Date: Sun, 8 May 2011 10:48:55 -0700 Message-Id: <313C949D-643A-422F-98A4-72C9F3AE3181@vicor.com> References: <65D3163B-427B-41F6-80B9-7BA4AF794939@vicor.com> <57a102e1.9eab.12fcda25c3a.Coremail.while1@163.com> To: =?utf-8?B?5YWw5riF?= X-Mailer: Apple Mail (2.1084) X-OriginalArrivalTime: 08 May 2011 17:48:57.0427 (UTC) FILETIME=[348DB230:01CC0DA8] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers Subject: Re: [UPDATE] New Boot-Loader Menu -- version 1.4 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2011 17:49:12 -0000 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" 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. _____________