#
c2ba66d4 |
| 02-Nov-2024 |
Warner Losh <imp@FreeBSD.org> |
loader: Fix boot menu on BIOS
Only the gfx-enabled boot loader supports unicode. Otherwise, we have to use the old cons25 / ibmpc upper code page drawing characters. Check to see if we have the gfx.
loader: Fix boot menu on BIOS
Only the gfx-enabled boot loader supports unicode. Otherwise, we have to use the old cons25 / ibmpc upper code page drawing characters. Check to see if we have the gfx.term_drawbox function. If we do, we support the unicode drawing characters. If we don't, then we have an older loader that doesn't support it *OR* we have the reduced function, text-only boot loader. In either of those cases, we need to use the old graphics characters. Abstract all those details into core.hasUnicode function.
PR: 282465 MFC After: 2 day Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47403
show more ...
|
#
f4a69a93 |
| 18-Sep-2024 |
Colin Percival <cperciva@FreeBSD.org> |
loader: Make EFI entropy size configurable
Add a new loader variable entropy_efi_seed_size which defaults to 2048; if not defined (e.g. if the /boot/lua/ is updated but /boot/defaults/ isn't) the sa
loader: Make EFI entropy size configurable
Add a new loader variable entropy_efi_seed_size which defaults to 2048; if not defined (e.g. if the /boot/lua/ is updated but /boot/defaults/ isn't) the same 2048 default will be used.
Reviewed by: Val Packett MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46632
show more ...
|
Revision tags: release/13.4.0 |
|
#
a2fd7ae8 |
| 30-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
stand: Print a warning of the loader is too old
If the loader is < 3.0, print a warning that it's too old and needs to be upgraded.
Sponsored by: Netflix Reviewed by: kevans Differential Revision
stand: Print a warning of the loader is too old
If the loader is < 3.0, print a warning that it's too old and needs to be upgraded.
Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45889
show more ...
|
#
522a65a8 |
| 30-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
Revert "loader/lua: Remove compat shim for loader.lua_path"
This reverts commit ab97d42addae97a389c6f22d6bba62ed954bb8e7.
There's too many people in the field with FreeBSD 12.0 loader.efi that stub
Revert "loader/lua: Remove compat shim for loader.lua_path"
This reverts commit ab97d42addae97a389c6f22d6bba62ed954bb8e7.
There's too many people in the field with FreeBSD 12.0 loader.efi that stubbed their toe on upgrading to 14.1 since they'd not updated loader.efi. While we sort out that mess, add back this workaround. Can revisit after 14.2 maybe.
MFC After: 3 days Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D45882
show more ...
|
Revision tags: release/14.1.0, release/13.3.0 |
|
#
ab97d42a |
| 29-Feb-2024 |
Warner Losh <imp@FreeBSD.org> |
loader/lua: Remove compat shim for loader.lua_path
loader.lua_path was committed before stable/13 was branched, and merged in to for 12.2. Remove workaround for it not being present.
Sponsored by:
loader/lua: Remove compat shim for loader.lua_path
loader.lua_path was committed before stable/13 was branched, and merged in to for 12.2. Remove workaround for it not being present.
Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44143
show more ...
|
#
d04415c5 |
| 13-Dec-2023 |
Kyle Evans <kevans@FreeBSD.org> |
loader: lua: remove the default kernel if it doesn't exist
The `kernel` env var provides the default kernel, usually "kernel". It may be the case that the user doesn't have a "kernel" kernel, just
loader: lua: remove the default kernel if it doesn't exist
The `kernel` env var provides the default kernel, usually "kernel". It may be the case that the user doesn't have a "kernel" kernel, just "kernel.*" kernels, but have left `kernel` to the default because we autodetect entries by default anyways.
If we're doing autodetection, take note of whether the default kernel exists or not and remove it from the list if it doesn't and we had found any other kernels. We avoid it in the #kernels == 1 case because something fishy has likely happened and we should just trust the configuration.
Reviewed by: imp, manu Differential Revision: https://reviews.freebsd.org/D42967
show more ...
|
#
e183039f |
| 08-Dec-2023 |
Kyle Evans <kevans@FreeBSD.org> |
loader: lua: assume late ACPI detection if the feature isn't enabled
While we're here, enable the feature in the places we detect ACPI. This lets us side-step the existing issues and provide a path
loader: lua: assume late ACPI detection if the feature isn't enabled
While we're here, enable the feature in the places we detect ACPI. This lets us side-step the existing issues and provide a path forward for folks upgrading from previous releases that haven't updated their ESP yet.
Let's also fix core.setACPI: the hint already indicates that the user's disabled it more consistently than loader.acpi_disabled_by_user. Even more, the latter is wrong because we set it by default if we did not detect ACPI. The ACPI hint remains even when we're setting defaults because ACPI loaded into the kernel will make some noise if it's not hinted off, even when we didn't detect it.
imp notes that this will result in some relatively harmless noise on platforms that don't support ACPI but aren't using the UEFI loader, as we would enable the ACPI module for loading on them and then loader would not be able to find it. These are non-fatal, but should probably be fixed by just declaring support for EARLY_ACPI in those loaders since we know they won't have ACPI early on -- punting on this for the time being, though, in favor of providing a safer upgrade path sooner.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42727
show more ...
|
#
1631382c |
| 08-Dec-2023 |
Kyle Evans <kevans@FreeBSD.org> |
loader: provide a features table for binary compatibility advertisement
liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings
loader: provide a features table for binary compatibility advertisement
liblua now provides a loader.has_feature() function to probe the loader binary for features advertised. name => desc mappings are provided in loader.features to get a list of all of the features loader *can* support. core.hasFeature is provided as a shim to loader.has_feature so that individual consumers don't need to think about the logic of the loader module not providing has_feature; we know that means the feature isn't enabled.
The first consumer of this will be EARLY_ACPI to advertise that the loader binary probes for ACPI presence before the interpreter has started, so that we know whether we can trust the presence of acpi.rsdp as relatively authoritative. In general, it's intended to be used to avoid breaking new scripts on older loaders within reason.
This will be used in lua as `core.hasFeature("EARLY_ACPI")`, while the C bits of loader will `feature_enable(FEATURE_EARLY_ACPI)`.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42695
show more ...
|
#
67d2bd97 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Retire setting hw.ata.wc: it doesn't exist.
hw.ata.wc was disconnected as part ot the 2013 cam-ification of ata. No need to continue setting it. It's been unused in FreeBSD 10.x and newer.
S
stand: Retire setting hw.ata.wc: it doesn't exist.
hw.ata.wc was disconnected as part ot the 2013 cam-ification of ata. No need to continue setting it. It's been unused in FreeBSD 10.x and newer.
Sponsored by: Netflix
show more ...
|
#
21795c37 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: Retire setting hw.eisa_slots.
When the eisa code was removed in 2017, prior to the stable/12 branch, setting hw.eisa_slots became a nop. The oldest supported branch doesn't have eisa at all.
stand: Retire setting hw.eisa_slots.
When the eisa code was removed in 2017, prior to the stable/12 branch, setting hw.eisa_slots became a nop. The oldest supported branch doesn't have eisa at all. The need to set it manually on boot disappeared largely by 2000...
Sponsored by: Netflix
show more ...
|
#
0abe05ae |
| 21-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
stand: bandaide for acpi
Old binaries do not set acpi.rsdp early enough. So when we boot with an older loader.efi from an ESP that's not been updated, we assume there's no ACPI on this system. This
stand: bandaide for acpi
Old binaries do not set acpi.rsdp early enough. So when we boot with an older loader.efi from an ESP that's not been updated, we assume there's no ACPI on this system. This is unwise. Put a band-aide on this until we can implement a proper 'feature' variable that the binary reports so we can do conditionals for things like this in the future.
This is at best a rapid-response stop-gap.
Glanced at by: kevans Sponsored by: Netflix
show more ...
|
#
e0f3dc82 |
| 20-Nov-2023 |
R. Christian McDonald <rcm@FreeBSD.org> |
loader: improve lua ACPI detection and handling
This is a follow-up patch to https://reviews.freebsd.org/D42459 that modifies the loader lua to use the correct loader variables for determining ACPI
loader: improve lua ACPI detection and handling
This is a follow-up patch to https://reviews.freebsd.org/D42459 that modifies the loader lua to use the correct loader variables for determining ACPI availability.
This also fixes a bug where ACPI can be inadvertently disabled when setting System Defaults at the loader menu.
Reviewed by: imp, kevans Approved by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42483
show more ...
|
Revision tags: release/14.0.0 |
|
#
9636a145 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line lua tag
Remove /^--\n--\s*\$FreeBSD\$.*$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
5c73b3e0 |
| 17-Feb-2022 |
Colin Percival <cperciva@FreeBSD.org> |
Add support for getting early entropy from UEFI
UEFI provides a protocol for accessing randomness. This is a good way to gather early entropy, especially when there's no driver for the RNG on the pl
Add support for getting early entropy from UEFI
UEFI provides a protocol for accessing randomness. This is a good way to gather early entropy, especially when there's no driver for the RNG on the platform (as is the case on the Marvell Armada8k (MACCHIATObin) for now).
If the entropy_efi_seed option is enabled in loader.conf (default: YES) obtain 2048 bytes of entropy from UEFI and pass is to the kernel as a "module" of name "efi_rng_seed" and type "boot_entropy_platform"; if present, ingest it into the kernel RNG.
Submitted by: Greg V Reviewed by: markm, kevans Approved by: csprng (markm) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D20780
show more ...
|
#
c4dc9072 |
| 13-Dec-2021 |
Emmanuel Vadot <manu@FreeBSD.org> |
loader: lua: test that /boot exists first
Otherwise on fs like tftp where no directory listing is possible we fail on the .dir method.
Reviewed by: imp, kevans MFC after: 2 weeks Sponsored by: Beck
loader: lua: test that /boot exists first
Otherwise on fs like tftp where no directory listing is possible we fail on the .dir method.
Reviewed by: imp, kevans MFC after: 2 weeks Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D33414
show more ...
|
Revision tags: release/12.3.0, release/13.0.0 |
|
#
5d8c062f |
| 14-Feb-2021 |
Toomas Soome <tsoome@FreeBSD.org> |
loader_lua: consider userboot console as serial
We use ascii box chars with serial console because we do not know if terminal can draw unixode box chars. Same problem is about userboot console.
MFC
loader_lua: consider userboot console as serial
We use ascii box chars with serial console because we do not know if terminal can draw unixode box chars. Same problem is about userboot console.
MFC after: 5 days
show more ...
|
#
e25ee296 |
| 24-Jan-2021 |
Kyle Evans <kevans@FreeBSD.org> |
stand: lua: enhance lfs.dir() to speed up kernels_autodetect
This eliminates a lot of stat() calls that happen when lualoader renders the menu with the default settings, and greatly speeds up render
stand: lua: enhance lfs.dir() to speed up kernels_autodetect
This eliminates a lot of stat() calls that happen when lualoader renders the menu with the default settings, and greatly speeds up rendering on my laptop.
ftype is nil if loader/loader.efi hasn't been updated yet, falling back to lfs.attributes() to test.
This is technically incompatible with lfs, but not in a particularly terrible way.
Reviewed-by: cem MFC-after: 4 days Differential Revision: https://reviews.freebsd.org/D27542
show more ...
|
#
3630506b |
| 21-Dec-2020 |
Toomas Soome <tsoome@FreeBSD.org> |
loader: implement framebuffer console
Draw console on efi. Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list, vbe set xxx). autoload font (/boot/fonts) based on resolution and font size
loader: implement framebuffer console
Draw console on efi. Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list, vbe set xxx). autoload font (/boot/fonts) based on resolution and font size. Add command loadfont (set font by file) and variable screen.font (set font by size). Pass loaded font to kernel.
Export variables: screen.height screen.width screen.depth
Add gfx primitives to draw the screen and put png image on the screen. Rework menu draw to iterate list of consoles to enamble device specific output.
Probably something else I forgot...
Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27420
show more ...
|
Revision tags: release/12.2.0 |
|
#
94510c29 |
| 01-Oct-2020 |
Kyle Evans <kevans@FreeBSD.org> |
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 <imp@FreeBSD.org> |
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 ...
|
#
e2515283 |
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
277f38ab |
| 18-Aug-2020 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
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 |
|
#
73531a2a |
| 27-Mar-2020 |
Ryan Moeller <freqlabs@FreeBSD.org> |
loader: Fully reset terminal settings, not just colors
Reviewed by: kevans Reviewed by: tsoome Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https:
loader: Fully reset terminal settings, not just colors
Reviewed by: kevans Reviewed by: tsoome Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D21733
show more ...
|
#
366f9979 |
| 03-Dec-2019 |
Kyle Evans <kevans@FreeBSD.org> |
lualoader: correct a typo from r354247
r354247 converted try_include to lfs + dofile with the loader.lua_path added just before. Fortunately, there was a hardcoded /boot/lua fallback in case loader.
lualoader: correct a typo from r354247
r354247 converted try_include to lfs + dofile with the loader.lua_path added just before. Fortunately, there was a hardcoded /boot/lua fallback in case loader.lua_path wasn't being set yet- I typo'd it as loader.lua_paths.
Fix the typo.
X-MFC-With: r354247 MFC after: 3 days
show more ...
|