Revision tags: release/12.0.0 |
|
#
c06e7b66 |
| 07-Nov-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340126 through r340212.
|
#
bdf12807 |
| 05-Nov-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Add chainload menu entry
MFC after: 4 days
|
#
fda9adaf |
| 27-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339670 through r339812.
|
#
041929aa |
| 24-Oct-2018 |
Kyle Evans <kevans@FreeBSD.org> |
menu.lua: Abort autoboot sequence on failed command
Currently, a timeout in the menu autoboot sequence would effectively do nothing. We would return from the autoboot handling, then begin processing
menu.lua: Abort autoboot sequence on failed command
Currently, a timeout in the menu autoboot sequence would effectively do nothing. We would return from the autoboot handling, then begin processing the menu without redrawing it.
This change makes the behavior a little more friendly. Returning the user to the menu can't have any good effects, so abort the autoboot sequence and drop to the loader prompt.
MFC after: 3 days
show more ...
|
#
e414851f |
| 24-Oct-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: unload upon kernel change if a kernel was previously loaded
In the majority of cases, a kernel is not loaded before we hit the menu. However, if a password is set, we'll trigger autoboot
lualoader: unload upon kernel change if a kernel was previously loaded
In the majority of cases, a kernel is not loaded before we hit the menu. However, if a password is set, we'll trigger autoboot and have loadelf'd beforehand. We also need to take into account one dropping to the loader prompt and twiddling with things manually; if they try to toggle through kernels, we'll assume they mean it.
Reported by: trasz MFC after: 3 days
show more ...
|
#
c6879c6c |
| 23-Oct-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r339015 through r339669.
|
#
76c75816 |
| 11-Oct-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Provide a 'menu' command to redraw the menu at the loader prompt
Reported by: allanjude Approved by: re (kib)
|
#
01d4e214 |
| 05-Oct-2018 |
Glen Barber <gjb@FreeBSD.org> |
MFH r338661 through r339200.
Sponsored by: The FreeBSD Foundation
|
#
c84dbc53 |
| 05-Oct-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Don't draw loader menu with autoboot_delay=-1
This was mostly a cosmetic issue. autoboot_delay=-1 is documented to bypass the loader menu and immediately execute the boot command, but lua
lualoader: Don't draw loader menu with autoboot_delay=-1
This was mostly a cosmetic issue. autoboot_delay=-1 is documented to bypass the loader menu and immediately execute the boot command, but lualoader would draw the menu and immediately execute the boot command. No interaction was possible with the menu.
The fix lifts autoboot_delay processing out of menu.autoboot, which now takes a delay and does nothing if no delay is specified. This lines up with my expectations of menu.autoboot's usage from a third party, which may want more control over the process than the default behavior.
PR: 231610 Approved by: re (gjb)
show more ...
|
Revision tags: release/11.2.0 |
|
#
8ce1744f |
| 21-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Clear up some possible naming confusion
In the original lualoader project, 'escapef' and 'escapeb' were chosen for 'escape fg' and 'escape bg'. We've carried on this naming convention, an
lualoader: Clear up some possible naming confusion
In the original lualoader project, 'escapef' and 'escapeb' were chosen for 'escape fg' and 'escape bg'. We've carried on this naming convention, and as our use of attributes grow the likeliness of 'escapeb'/'resetb' being confused upon glance for 'escape bold'/'reset bold' increases.
Fix this by renaming these four functions to {escape,reset}{fg,bg} rather than {escape,reset}{f,b} for clarity.
Reported by: dteske
show more ...
|
#
3224bb3f |
| 20-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Use less atomic options for resetting colors/attributes
Noted by dteske:
CSI 1m ... CSI 22m CSI 2m ... CSI 22m CSI 4m ... CSI 24m CSI 5m ... CSI 25m CSI 7m ... CSI 27m CSI 8m ... CSI 28m
lualoader: Use less atomic options for resetting colors/attributes
Noted by dteske:
CSI 1m ... CSI 22m CSI 2m ... CSI 22m CSI 4m ... CSI 24m CSI 5m ... CSI 25m CSI 7m ... CSI 27m CSI 8m ... CSI 28m CSI (30-37)m ... CSI 39m CSI (40-47)m ... CSI 49m
- Provide resetf/resetb to match escapef/escapeb - Use CSI 22m to undo a bold
This is a more reasonable approach than what was previously taken.
Reported by: dteske
show more ...
|
#
3244729f |
| 09-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Don't redraw the autoboot message every .05s
|
#
e9c3ceb1 |
| 07-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Use cli_execute_unparsed instead of loader.interpret
loader.interpret should not be used for executing loader commands from an untrusted source (e.g. environment vars) as it will allow ex
lualoader: Use cli_execute_unparsed instead of loader.interpret
loader.interpret should not be used for executing loader commands from an untrusted source (e.g. environment vars) as it will allow execution of arbitrary Lua. Replace it with a call to the recently introduced cli_execute_unparsed, which parses it out as a loader command and then dispatches it as a loader command. This effectively filters out arbitrary Lua.
show more ...
|
#
1495c98f |
| 03-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Tweak positioning and fix an off-by-one
- All of our default positions were offset from forth - Our menu frame size was smaller than in forth - Logo/brand drawing had an off-by-one, drawi
lualoader: Tweak positioning and fix an off-by-one
- All of our default positions were offset from forth - Our menu frame size was smaller than in forth - Logo/brand drawing had an off-by-one, drawing one column lower on the screen than they should have been. - While here, switch a print() to printc() as it's expected that logos may contain color and other escpae sequences that we'll need to honor.
show more ...
|
#
a76f8a5b |
| 03-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Execute menu_timeout_command at the end of menu autoboot
Instead of hardcoding "boot", respect menu_timeout_command from Forth. It still defaults to 'boot', so this will not be a function
lualoader: Execute menu_timeout_command at the end of menu autoboot
Instead of hardcoding "boot", respect menu_timeout_command from Forth. It still defaults to 'boot', so this will not be a functional change for most.
show more ...
|
#
decacd91 |
| 02-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Reset the cursor position after the menu is drawn
Rather than before the menu is drawn. The drawer is going to reset the crusor position as soon as it draws anything anyways, so doing it
lualoader: Reset the cursor position after the menu is drawn
Rather than before the menu is drawn. The drawer is going to reset the crusor position as soon as it draws anything anyways, so doing it before serves no purpose. Setting it after is needed so we don't clobber the menu when we start booting.
show more ...
|
#
43f7d9d1 |
| 01-Mar-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Dedup these "Return to main menu" entries
|
#
9937e979 |
| 26-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Re-work menu skipping bits
This is motivated by a want to reduce heap usage if the menu is being skipped. Currently, the menu module must be loaded regardless of whether it's being skippe
lualoader: Re-work menu skipping bits
This is motivated by a want to reduce heap usage if the menu is being skipped. Currently, the menu module must be loaded regardless of whether it's being skipped or not, which adds a cool ~50-100KB worth of memory usage.
Move the menu skip logic out to core (and remove a debug print), then check in loader.lua if we should be skipping the menu and avoid loading the menu module entirely if so. This keeps our memory usage below ~115KB for a boot with the menu stripped.
Also worth noting: with this change, we no longer explicitly invoke autoboot if we're skipping the menu. Instead, we let the standard loader behavior apply: try to autoboot if we need to, then drop to a loader prompt if not or if the autoboot sequence is interrupted. The only thing we still handle before dropping to the loader autoboot sequence is loadelf(), so that we can still apply any of our kernel loading behavior.
show more ...
|
#
04af4229 |
| 26-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: More argument name expansion, part 2
screen also has some instances, but it also has other cleanup to go with it. Because of this, I will be committing the screen changes separately.
|
#
2a11b810 |
| 26-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: A little more general menu cleanup
Instead of a single-letter parameter ('m'), use something a little more descriptive and meaningful: 'menudef' ("menu definition") -- these functions exp
lualoader: A little more general menu cleanup
Instead of a single-letter parameter ('m'), use something a little more descriptive and meaningful: 'menudef' ("menu definition") -- these functions expect to be passed a menudef, so call it what it is.
While here, throw an assertion in that we have a handler for the selected menu item. This is more of a debugging aide so that it's more obvious when one is testing a menudef that they've added an entry item that we don't handle.
This is an improvement over the past behavior of ignoring the unknown menu entry.
show more ...
|
#
beafe961 |
| 25-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Track the menu currently drawn, instead of validity
This cleans up the odd approach to menu drawing. Instead of tracking validity, we track the menu that was drawn on the screen. Whenever
lualoader: Track the menu currently drawn, instead of validity
This cleans up the odd approach to menu drawing. Instead of tracking validity, we track the menu that was drawn on the screen. Whenever we draw a menu, we'll set this to that menu.
Anything that invalidates the screen should go ahead and trigger an explicit redraw, rather than finding a wy to set screen_invalid.
The currently drawn menu is then reset in menu.run as we exit the menu system, so that dropping to the loader prompt or leaving menu.run() will just behave as expected without doing redundant work every time we leave a menu.
show more ...
|
#
fe226a72 |
| 25-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Invalidate the screen from menu perspective upon mnu exit
In the common case, this will effectively do nothing as the menu will get redrawn as we leave submenus regardless of whether the
lualoader: Invalidate the screen from menu perspective upon mnu exit
In the common case, this will effectively do nothing as the menu will get redrawn as we leave submenus regardless of whether the screen has been marked invalid or not
However, upon escape to the loader prompt, one could do either of the following to re-enter the menu system:
-- Method 1 require('menu').run()
-- Method 2 require('menu').process(menu.default)
With method 1, the menu will get redrawn anyways as we do this before autoboot checking upon entry. With method 2, however, the menu will not be redrawn without this invalidation.
Both methods are acceptable for re-entering the menu system, although the latter method in the local module for processing new and interesting menus is more expected.
show more ...
|
#
ca16d83f |
| 25-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Pull autoboot handling out into menu.run()
There's no reason for autoboot handling to be mixed in with menu processing. It is a distinct process that should only be done once when enterin
lualoader: Pull autoboot handling out into menu.run()
There's no reason for autoboot handling to be mixed in with menu processing. It is a distinct process that should only be done once when entering the menu system.
menu.process has been modified to take an initial keypress to process and to only draw the screen initially if it's been invalidated. The keypress is kind of a kludge, although it could be argued to be a potentially useful kludge if there are other processes that may need to feed a keypress into the menu system.
show more ...
|
#
28384160 |
| 25-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Pull menu redrawing specifics out of menu.process
In general, every menu redraw is going to require a screen clear and cursor reset. Each redraw also has the potential to invalidate the a
lualoader: Pull menu redrawing specifics out of menu.process
In general, every menu redraw is going to require a screen clear and cursor reset. Each redraw also has the potential to invalidate the alias table, so we move the alias table being used out into a module variable. This allows third party consumers to also inspect or update the alias table if they need to.
While here, stop searching the alias table once we've found a match.
show more ...
|
#
da9ab827 |
| 25-Feb-2018 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: Clean up menu handling a little bit
This is driven by an urge to separate out the bits that really only need to happen when the menu system starts up. Key points:
- menu.process now does
lualoader: Clean up menu handling a little bit
This is driven by an urge to separate out the bits that really only need to happen when the menu system starts up. Key points:
- menu.process now does the bulk of menu handling. It retains autoboot handling for dubious reasons, and it no longer accepts a 'nil' menu to process as 'the default'. Its return value is insignificant. - The MENU_SUBMENU handler now returns nothing. If menu.process has exited, then we continue processing menu items on the parent menu as expected. - menu.run is now the entry point of the menu system. It checks whether the menu should be skipped, processes the default menu, then returns.
show more ...
|