History log of /freebsd-13.1/stand/lua/menu.lua (Results 1 – 25 of 89)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0
# 9cb5ea3d 26-Oct-2021 Katsuyuki Miyoshi <[email protected]>

lualoader: fix the autoboot_delay countdown message

When the timer drops from double to single digits, a spare 'e' is left
on the end of the line as we don't overwrite it. Include an extra space
at

lualoader: fix the autoboot_delay countdown message

When the timer drops from double to single digits, a spare 'e' is left
on the end of the line as we don't overwrite it. Include an extra space
at the end to account for this and overwrite the leftover character.

PR: 259429

(cherry picked from commit bb4c691299c5d699cea29e18fef96bda1cef13da)

show more ...


# 8df27f0a 08-Sep-2021 Kyle Evans <[email protected]>

lualoader: use more concise verbiage for autoboot

The behavior remains the same, but lualoader now uses the more concise
verbiage that forthloader used. This is particularly important because
the p

lualoader: use more concise verbiage for autoboot

The behavior remains the same, but lualoader now uses the more concise
verbiage that forthloader used. This is particularly important because
the previous line would exceed the right boundary of the menu and run
straight into space that would typically be allowed for the logo.

This makes it slightly easier to port logos from forthloader to
lualoader.

(cherry picked from commit ed107537b43cabf7a18e73a17856a9d9e170c6e9)

show more ...


Revision tags: release/13.0.0, release/12.2.0
# 94510c29 01-Oct-2020 Kyle Evans <[email protected]>

lualoader: clear up some luacheck warnings

- One (1) unused argument
- One (1) trailing whitespace
- Two (2) "non-standard global" (curenv, rewind)

tools/boot/lua-lint.sh is once again happy.


# 8f3b3610 28-Sep-2020 Warner Losh <[email protected]>

Report the kernel console on the boot screen

Report what console the boot loader is telling the kernel to use:
o Dual (Serial Primary)
o Dual (Video Primary)
o Serial
o Video

This allows the us

Report the kernel console on the boot screen

Report what console the boot loader is telling the kernel to use:
o Dual (Serial Primary)
o Dual (Video Primary)
o Serial
o Video

This allows the user to interrupt the boot and tweak the cosnole, if
needed, in a trivial way. Useful for installs where the default
selected may not be quite what you want, or when you are running a
dual setup and need to toggle over to the other console being primary.
The 'c'/'C' keys will do the cycling through the consoles. Note:
you'll still have to drop into the loader to set details about serial
consoles. And this doesn't change the console the loader is using.

Reviewed by: kevans@
MFC After: 3 days
Differential Revision: https://reviews.freebsd.org/D26573

show more ...


# 277f38ab 18-Aug-2020 Mariusz Zaborski <[email protected]>

zfs: add an option to the bootloader to rewind the ZFS checkpoint

The checkpoints are another way of keeping the state of ZFS.
During the rewind, the pool has to be exported.
This makes checkpoints

zfs: add an option to the bootloader to rewind the ZFS checkpoint

The checkpoints are another way of keeping the state of ZFS.
During the rewind, the pool has to be exported.
This makes checkpoints unusable when using ZFS as root.
Add the option to rewind the ZFS checkpoint at the boot time.
If checkpoint exists, a new option for rewinding a checkpoint will appear in
the bootloader menu.
We fully support boot environments.
If the rewind option is selected, the boot loader will show a list of
boot environments that existed before the checkpoint.

Reviewed by: tsoome, allanjude, kevans (ok with high-level overview)
Differential Revision: https://reviews.freebsd.org/D24920

show more ...


Revision tags: release/11.4.0
# d2187b39 22-Apr-2020 Ryan Moeller <[email protected]>

menu.lua: Give names to menu entries

Make menu customizations easier by naming the entries and using the
names to build the table entries.

Reviewed by: kevans
Approved by: mav (mentor)
MFC after: 1

menu.lua: Give names to menu entries

Make menu customizations easier by naming the entries and using the
names to build the table entries.

Reviewed by: kevans
Approved by: mav (mentor)
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D24527

show more ...


Revision tags: release/12.1.0
# e12ff891 26-Sep-2019 Kyle Evans <[email protected]>

Further normalize copyright notices

- s/C/c/ where I've been inconsistent about it
- +SPDX tags
- Remove "All rights reserved" where possible

Requested by: rgrimes (all rights reserved)


# 6dd078df 22-Sep-2019 Toomas Soome <[email protected]>

loader_lua: lua color changes should end with reset

The color change should have reset sequence, not switch to white.


Revision tags: release/11.3.0
# 8f7f3d08 26-Mar-2019 Kyle Evans <[email protected]>

lualoader: Fix up some luacheck concerns

- Garbage collect an unused (removed because it was useless) constant
- Don't bother with vararg notation if args will not be used

MFC after: 1 week


Revision tags: release/12.0.0
# bdf12807 05-Nov-2018 Kyle Evans <[email protected]>

lualoader: Add chainload menu entry

MFC after: 4 days


# 041929aa 24-Oct-2018 Kyle Evans <[email protected]>

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 <[email protected]>

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 ...


# 76c75816 11-Oct-2018 Kyle Evans <[email protected]>

lualoader: Provide a 'menu' command to redraw the menu at the loader prompt

Reported by: allanjude
Approved by: re (kib)


# c84dbc53 05-Oct-2018 Kyle Evans <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

lualoader: Don't redraw the autoboot message every .05s


# e9c3ceb1 07-Mar-2018 Kyle Evans <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

lualoader: Dedup these "Return to main menu" entries


# 9937e979 26-Feb-2018 Kyle Evans <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 ...


1234