| 510e473f | 22-Aug-2025 |
Kyle Evans <kevans@FreeBSD.org> |
stand: add a mechanism to avoid env var propagation to kenv
Our only user of this at the moment is teken.{fg,bg}_color. These are special because teken is a library common to both the kernel and th
stand: add a mechanism to avoid env var propagation to kenv
Our only user of this at the moment is teken.{fg,bg}_color. These are special because teken is a library common to both the kernel and the loader, and we want to avoid having special vars to control the loader vs. the kernel. Ideally, if a user wants a different set of console colors, then they set the appropriate teken variable and it Just Works(TM) everywhere. We can't just avoid setting the env vars, because we specifically want to install a hook to adjust how loader is drawn.
This allows us to avoid breaking a kernel config(5) that has some default teken colors set with our defaults. That's a valid configuration, even if it might seem weird that they don't want to set colors in both loader and the kernel -- they may not anticipate spending any time in loader, and thus prefer to just let it do its default behavior.
NOKENV is expected to be unset if the value is overwritten, rather than acting as a persistent marker that we do not want the value to persist under any circumstance. We can always add another flag bit later for persistence if we find a use for that, but most variables are fine to carry over. This is mostly needed for environment variables that we really just want to set a hook for.
Future work could expand this to break it out to the scripted interfaces. We have discussed some options like a new built-in command, or adding a flag to the existing `set` command, but haven't really come up with a concrete plan to avoid confusion.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D50888
show more ...
|
| 95e6fd1f | 22-Aug-2025 |
Kyle Evans <kevans@FreeBSD.org> |
stand: split fg/bg handling up a little further
These can be setup independently, so we should also check them and initialize each independently. This fixes a pre-existing bug where-in we may not p
stand: split fg/bg handling up a little further
These can be setup independently, so we should also check them and initialize each independently. This fixes a pre-existing bug where-in we may not pickup a bg color specified in the environment if a fg color wasn't set.
The new version also ensures that we're hooking the color vars properly if we're using a value that was already there, as the console may need to adjust if something wants to switch them up again. Otherwise, a teken.fg_color set in loader could conceivably occur that only changes the color when you get to the kernel, which could be surprising.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D50887
show more ...
|
| 5bfb3045 | 21-Aug-2025 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Allow secure-netboot
When doing file verification, tftp needs to be able to handle multiple open files concurrently. We also need tftp_stat() to provide useful values for st_dev and st_ino.
Allow a
Allow secure-netboot
When doing file verification, tftp needs to be able to handle multiple open files concurrently. We also need tftp_stat() to provide useful values for st_dev and st_ino.
Allow an architecture to define NETPROTO_DEFAULT. The default is NET_NFS for backwards compatability.
In net_parse_rootpath() fix parsing of <scheme>://<ip>[:<port]/<path> and ensure we return INADDR_NONE unless we successfully parsed an addr, so we don't end up clobbering rootip obtained from bootp().
Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D51187
show more ...
|
| 61d77e6c | 02-Jun-2025 |
Simon J. Gerraty <sjg@FreeBSD.org> |
loader: allow for exceptions to restricted settings.
We restrict what an unverified loader.conf etc can set, and the same restrictions are applied to interactive input. We need to allow for exceptio
loader: allow for exceptions to restricted settings.
We restrict what an unverified loader.conf etc can set, and the same restrictions are applied to interactive input. We need to allow for exceptions (eg boot_verbose). It is best if any allowed settings match up to '='.
If we do not allow it to be set, do not allow it to be unset
Reviewed by: stevek Sponsored by: Juniper Networks, Inc.
show more ...
|
| aeb446be | 30-May-2025 |
Warner Losh <imp@FreeBSD.org> |
style: Use static consistently
C doesn't require that we have static on both the declaration and definition of a function. But stylistically, FreeBSD does. Make that so. Also make a function static
style: Use static consistently
C doesn't require that we have static on both the declaration and definition of a function. But stylistically, FreeBSD does. Make that so. Also make a function static that wasn't because, it seems, that static and struct look a lot alike in a column of text.
Sponsored by: Netflix Reviewed by: tsoome, jhibbits Differential Revision: https://reviews.freebsd.org/D50588
show more ...
|
| 6aea7b22 | 30-May-2025 |
Warner Losh <imp@FreeBSD.org> |
stand: Retire arch_loadaddr using md_align, pending its replacement
arch_loadaddr() is inconsistently used. In fact, I removed it entirely from kboot because its interface wasn't wide enough (though
stand: Retire arch_loadaddr using md_align, pending its replacement
arch_loadaddr() is inconsistently used. In fact, I removed it entirely from kboot because its interface wasn't wide enough (though I broke powerpc kboot several years ago, and this commit might fix that). For now, modify uboot to put it into copyin like all the other loaders do. This might break arm ubldr.
In its place, use the new md_align() and any replacement will be called from there, or via some explicit init() function.
These changes allow me to load a amd64 kernel via UEFI with all the modules aligned to 16k.
Sponsored by: Netflix Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D50587
show more ...
|