Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Oct 2012 10:40:41 -0700
From:      Devin Teske <devin.teske@fisglobal.com>
To:        Devin Teske <dteske@freebsd.org>
Cc:        Doug Barton <dougb@FreeBSD.org>, freebsd-arch@freebsd.org
Subject:   Re: New Boot Loader Menu
Message-ID:  <5318C0C7-5534-4633-8F4C-40C106CFF0FE@fisglobal.com>
In-Reply-To: <D776ABE7-6C46-4C66-8C6E-159BCD61761F@fisglobal.com>
References:  <0655B56F-AD43-402B-872C-568378E650F9@fisglobal.com> <5071D6B5.1010609@FreeBSD.org> <B4A82131-4B11-4FE8-839B-FCC45C1D4445@fisglobal.com> <50726C73.10506@FreeBSD.org> <D776ABE7-6C46-4C66-8C6E-159BCD61761F@fisglobal.com>

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

This time with the attachments (below).

NOTE: Don't forget to diff each one to see how we go from what's in HEAD to=
day to each other demo
NOTE: vimdiff works better than diff, because it can highlight the differen=
ces *within* each line (showing a more succinct pattern of changes).

On Oct 8, 2012, at 10:21 AM, Devin Teske wrote:

>>>> Bonus points if you can make it easy to add a submenu via
>>>> loader.conf.
>>>>=20
>>>=20
>>> Done. There's zero difference in configuring menus in a "menu.rc"
>>> file than in "loader.conf" file.
>>=20
>> Ok, different file, same idea. Can you post some sample menu.rc code so
>> we can get an idea of what "easy" means to you?
>>=20
>=20
> Gladly! Thank you for asking!
>=20
> I'll post the 4 different "menu.rc" files that I am planning on demonstra=
ting this Thursday at BAFUG.
>=20
> Please find attached the following files (with accompanying descriptions =
below):
>=20
> menu.rc.1.current-head
> This is what is in HEAD, CURRENT, and RELENG_9 **right now**
>=20




> NOTE: Each of the following menu.rc examples *require* the new patchset t=
hat I'm sending through my mentor(s) to import to FreeBSD. We currently can=
't utilize _any_ of these features without the addition of "menusets.4th" (=
for example; among other changes).
>=20
> menu.rc.2.submenu-head
> This is the menu.rc file that replicates the images posted at the beginni=
ng of this thread.
> Though, currently, I'm thinking I ought to craft a new menu.rc to show wh=
at Alexander Leidinger proposes.
>=20




> menu.rc.3.submenu-cycler
> This menu.rc shows things that DruidBSD offers (but FreeBSD cannot). In o=
ther words, don't get too exciting about the *actual* menu items, get more =
excited about "what the menu can do" by this example. This example goes to =
show that (if we need it), we can accommodate "cycling" menu items (where a=
 single menu item on a single stateful menu can exhibit a total of 10 usabl=
e states). These menu items "cycle" -- meaning when you reach the last conf=
igured item, it cycles back to the first. The text for these cyclic menu it=
ems (just like toggle menu items) are completely arbitrary (explaining that=
 the "1of2" and "2of2" etc. text is configurable).
>=20




> NOTE: The next example consists of two files. The menu.rc _and_ a very sm=
all devicemenu.4th file which serves as a stand-in for C callbacks. In othe=
r words, the code that is in the accompanying "devicemenu.4th" is actually =
mimicking what *ought* to instead be a series of C callbacks exposed to the=
 FICL layer from something like base/head/sys/boot/ficl/loader.c
>=20
> menu.rc.4.submenu-dynamic
> devicemenu.4th
>=20






> This menu.rc shows how you can configure a menu that has not only dynamic=
 menu *items* but that whole menus can be dynamic themselves (the menu item=
s themselves are dynamically generated at runtime).
>=20
> To make a dynamic menu, you have to back it by some runtime code. In this=
 example, I've backed the callbacks with Forth code, but ***you don't have =
to*** and in-fact, my plans are to have these callbacks instead be provided=
 by the POSIX C layer, namely base/head/sys/boot/ficl/loader.c (as one plac=
e where the C code exposes FICL constructs -- which ultimately are to be pa=
ssed into the menu as a callback, configured via appropriately-named enviro=
nment variables).
>=20
> What's imperative to see in the demo of these 4 menu.rc files is that no =
Forth needs to be changed. Just drop in the appropriate menu.rc and reboot =
(SEE BELOW WARNING!)
>=20
> WARNING!!! as previously explained,=85 you _MUST_ have the patches that I=
 sent to avg and mav to be able to "just drop in these menu.rc files and re=
boot" -- if you drop anything but the HEAD menu.rc into a HEAD copy of /boo=
t =85 you=85 will=85 not=85 boot=85 !!!
>=20
> For a copy of what I sent to avg and mav, check out my twitter account or=
 drop me a line.

--=20
Devin

_____________
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?5318C0C7-5534-4633-8F4C-40C106CFF0FE>