aboutsummaryrefslogtreecommitdiff
path: root/stand/i386
Commit message (Collapse)AuthorAgeFilesLines
* stand: Ugly hack due to default changeWarner Losh36 hours2-2/+2
| | | | | | | | | | | So this is a gross hack to fix the 'noclean' build since we changed to text-only loader. We have to fix it in a better way, but for the moment, this will fix non-meta no-clean builds. A better hack is to fix this so we build either vidconsole.c or textvidc.c, but some minor refactoring and variable renaming is needed. Fixes: 23dee252daf2 Sponsored by: Netflix
* loader: Change this BIOS tradeoff: Add back zip and use text onlyWarner Losh5 days1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | After talking with a number of people about the removal of some things to make the loader fit, readjust things a little. Add back GZIP and BZIP2 compression support. Many of the downstream MFC packaging systems depend on this. This adds back 20k to the size of the loader. Make the boot loader text-only by default. This saves 40k in size. Net, we're 20k smaller. The graphics loader for BIOS is less useful than the zip functionality: You can still boot w/a text only one it and you can build a custom one if you really want it. It's also the default we use for dual console. This should be merged back into stable/14 and stable/13 so it's in the next release for each of these. That way we have only one release (13.4) with the other defaults. MFC After: 3 days Sponsored by: Netflix Reviewed by: olce, rgrimes, emaste Differential Revision: https://reviews.freebsd.org/D47203
* btx: Align the PXE prompt with other optionsTatsuki Makino2024-09-301-1/+1
| | | | | | | To fit within in the same space, drop the newline before the PXE prompt to make room for the additional space character. PR: 281494
* pxeboot: Enforce a 500k limit hereWarner Losh2024-08-061-0/+8
| | | | | | | | | | | | | | Have a separate PXEBOOTSIZE variable that acts much like LOADERSIZE variable to limit the size of the loader used for pxeldr. This allows people to override it independently of LOADERSIZE, which they may need to set larger for other reasons. Combined with PXEBOOT_DEFAULT_INTERP, you can build a larger lua loader, while still being able to build pxeldr with the 4th one, for example. MFC After: 3 days Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46214
* pxeboot: Allow a different default loader for pxebootWarner Losh2024-08-062-1/+10
| | | | | | | | | | Sometimes you need / want a different boot loader than loader_lua for pkeldr. Provide an option to get either the 4th one or the simp one. MFC After: 3 days Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46213
* loader: Add WITH/WITHOUT_LOADER_PXEBOOT build optionWarner Losh2024-08-061-1/+1
| | | | | | | | | | | | | Make it possible to disable pxeboot. This loader will fail to build when it's too large. When /boot/loader needs to be larger like that, this options will disable a component whose build will fail. It is an explicit option rather than implicit when things are too large to force the user to make the explicit tradeoffs rather than wonder why they have a stale pxeboot or other odd failure mode. MFC After: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46212
* loader: Minor comentary tweakWarner Losh2024-08-021-2/+2
| | | | | | Reword slightly to cleanup awkward constructs. Sponsored by: Netflix
* stand: Reduce limit to 500k for x86 loaderWarner Losh2024-08-011-1/+6
| | | | | | | | | | | | | | | | | The largest loader that works for PXE boot is about 500k. PXE needs low memory for packets and other driver state, so the largest safe size for the loader is about 500k. Reduce the size from 560k to 500k so we don't accidentally break PXE in the future. Add a comment for people with special needs. If you control the hardware, it can be safe to have boot loaders as large as 580k or 600k in some cases. Since the BIOS loader is becoming more and more of a legacy item, the build variable LOADERSIZE isn't documented. This change doesn't change that: there's been little demand for this documentation and in general, users shouldn't change it lightly. PR: 257018 Sponsored by: Netflix
* loader: Bump all versions to 3.0Warner Losh2024-07-291-0/+1
| | | | | | | | | | | | | Each incompatible change we make, we bump the major version. We've not done the bump in a while, so sync everybody to 3.0. Anything older than 3.0 will be given a warning that their boot loader is too old. We check only the major version, though, so minor versions can still be bumped for individual loaders (though I honestly doubt we'll ever need to do that again). Sponsored by: Netflix Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45888
* stand: Remove obsolete junkWarner Losh2024-07-291-4/+0
| | | | | | | | | | We long ago changed newvers.sh to make these comments bogus. Remove them since every single one of them is broken after the $FreeBSD$ removal. Sponsored by: Netflix Reviewed by: kevans, jhb Differential Revision: https://reviews.freebsd.org/D45879
* stand: Stop building in fat, ext2fs, gzip and bzip to BIOS /boot/loaderWarner Losh2024-07-251-4/+4
| | | | | | | | | | | | | | | | | This saves space to allow pxeboot to work again. Users desiring these features can turn them on for their custom build. While these are useful for some specialized applications, they aren't needed to boot the typical system, and we're low on space. text data bss dec hex filename Before: 465866 20740 31612 518218 0x7e84a loader_lua.bin After: 441535 17484 31092 490111 0x77a7f loader_lua.bin Savings: 28,107 bytes Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42416
* Remove residual blank line at start of MakefileWarner Losh2024-07-1521-21/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* textvidc: ReindentWarner Losh2024-05-201-340/+343
| | | | | | | Since this is now 'new code' go ahead and reindent for modern project preferences. Sponsored by: Netflix
* loader: stlye(9) nit: Space between return and the valueWarner Losh2024-05-202-6/+6
| | | | Sponsored by: Netflix
* loader: c_init returns 0 or 1Warner Losh2024-05-201-2/+2
| | | | | | c_init returns 0 (success) or 1 (failure). Don't return other values. Sponsored by: Netflix
* i386/nullconsole: Use C99 initializersWarner Losh2024-05-201-8/+7
| | | | Sponsored by: Netflix
* i386/spinconsole: Use C99 initializersWarner Losh2024-05-201-8/+7
| | | | Sponsored by: Netflix
* boot/i386: Use C99 initializer for textvidcWarner Losh2024-05-201-8/+7
| | | | Sponsored by: Netflix
* boot0: remove reference to fdiskEd Maste2024-03-251-1/+1
| | | | | | | | fdisk is obsolete and there is no need to mention a specific tool used to update the partition table. Just refer to it as the MBR partition table. Sponsored by: The FreeBSD Foundation
* libsa: Remove redundant sys/cdefs.hWarner Losh2024-02-2227-31/+2
| | | | Sponsored by: Netflix
* loader: Retire CTASSERTWarner Losh2024-02-212-6/+5
| | | | | | | | | The project is moving away from CTASSERT in favor of _Static_assert. Cleanup the few instances in the loader proactively. Sponsored by: Netflix Reviewed by: manu, tsoome Differential Revision: https://reviews.freebsd.org/D44006
* loader: Make MK_LOADER_BIOS_TEXTONLY workWarner Losh2024-02-184-20/+88
| | | | | | | | | | | | | | | | | | | Select between text-only and graphical frame buffer consoles for the BIOS boot loader. Pull one or the other in with #ifdef in conf.c. Add gfx_bios.c for the few routines that are needed for the BIOS support of gfx. These are stubbed out for text-only mode. Move bi_load_vbe_data here since it's only used for the graphical frame buffer. Note: This setup also allows us to build multiple BIOS loaders if we have to, some with text-only and some graphical. We don't do this today. We may be forced to turn this on in the future if ZFS keeps growing. The size savings is 41k, which helps a lot with some of our users that want to enable more options in the BIOS boot loader than are normally safe to do, and they don't need graphics. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43917
* loader: Add textvidc to buildWarner Losh2024-02-181-0/+3
| | | | | | | Add textvidc to the build. And use -DTERM_EMU to build it. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43915
* loader: bring back old text-only video consoleWarner Losh2024-02-181-0/+645
| | | | | | | | | | | | | | Bring back vidconsole.c as textvidc.c from 2a0e2c88db20. This console does no graphics stuff at all, supports no fancy logos, has known bugs in the terminal emulation, etc. However, it is small. It will be a build-time option to select between the two. The BIOS loader is running out of space when too many options are selected, so this allows people to select the smaller one to spend the space elsewhere. This is only the verbatim copy of the old vidconsole.c. It's not yet connected to the build. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43911
* loader: Bump the limit to 560,000 bytes for BIOS loaderWarner Losh2024-02-161-3/+2
| | | | | | | Further experience suggests we do not need as much margin. This was mistakenly bumped to 570,000 in a prior commit, so this undoes that. Sponsored by: Netflix
* loader: line line per src file in libi386Warner Losh2024-02-161-8/+29
| | | | | Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43913
* loader: Simplify build a littleWarner Losh2024-02-162-7/+4
| | | | | | | | | | | Confine -DDISK_DEBUG to biosdisc.c, the only file it affects. Use modern variable arrays instead of alloca and add a sanity size minimum for biospnp nodes. These nodes are tiny enough that we needn't do a malloc/free pair: the stack is fine. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D43914
* kboot: Add our own lua bindingsWarner Losh2024-02-161-1/+1
| | | | | | | | Create a small wrapper around the new flua hash module so we can use it here too. There's no 4th bindings, nor will they be created. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43874
* loader: Make vidc_biosputchar staticWarner Losh2024-02-141-1/+1
| | | | | | | | | | | | | It's currently unused outside of vidconsole.c. Gerald Hicks' fix to the beep code from de37e4a6d2333/1998 introduced the funciton as static. Maxim Sobolev (sobomax) made it non-static since his spinconsole called it in c4c3b35172d67/2009. When sobomax dropped the direct call after making spinconsole console independent in b35172d67/2017, vidc_biosputchar remained a harmless unreferenced global. Make it static once again. Fixes: c7e10205ae0d Sponsored by: Netflix
* stand: Add 1440p to the list of known resolutions.Dag-Erling Smørgrav2024-01-231-0/+5
| | | | | | MFC after: 1 week Reviewed by: manu, kevans, imp Differential Revision: https://reviews.freebsd.org/D43391
* loader: lua: assume late ACPI detection if the feature isn't enabledKyle Evans2023-12-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* pmbr: Only load the first 545k rather than error outWarner Losh2023-11-271-9/+15
| | | | | | | | | | | | It would be nice to have larger boot partitions for ESPs to live in one day. It's trivial to carve out 5M 10M or 200M when provisioning, but logistical issues may make it hard to do it after the fact. So only warn when the partition is > 545k. If we ever grow the boot loader larger than that, then it will be responsible for loading the rest anyway. Sponsored by: Netflix Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D42774
* stand: Automated cleanup of cdefs and other formattingWarner Losh2023-11-278-14/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* loader: add target for dirdeps buildStephen J. Kiernan2023-11-024-2/+23
| | | | | | | | Update dependencies for the loader variations used for each architecture. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D39741
* Use 115200 bps by default for serial communicationEd Maste2023-08-178-8/+8
| | | | | | | | | | | | | 9600 was a standard baud rate decades ago, but 115200 is now more common so choose defaults that are useful to the largest number of users. Note that boot0sio does not support rates above 9600 so it remains unchanged. Reviewed by: bz, imp, manu Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36295
* Remove $FreeBSD$: one-line forth tagWarner Losh2023-08-161-1/+0
| | | | Remove /^\\[\s*]*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line bare tagWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-165-10/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1646-51/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1632-64/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Remove $FreeBSD$: one-line .c comment patternWarner Losh2023-08-161-1/+0
| | | | Remove /^/[*/]\s*\$FreeBSD\$.*\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-163-3/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-1618-36/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* boot0: add a note about BIOS-supported serial ratesEd Maste2023-08-151-1/+1
| | | | | | | | | We plan to increase the default serial rate to 115200 (see review D36295) but early boot components that use BIOS interfaces do not support higher rates. Add a note to that effect. Reported by: imp Sponsored by: The FreeBSD Foundation
* stand: efi create eficom console device.Warner Losh2023-05-111-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the 'renaming kludge' that we absolutely cannot do going forward (it's cost us days of engineering time). console=comconsole talks to the hardware directly. This is available only on amd64. It is not available anywhere else (and so requires changes for people doing comconsole on aarch64) console=eficom talks to the console via EFI protocols. It's available on amd64, aarch64 and riscv64. It's the first port that we find, though it can be overriden by efi_com_port (which should be set to the UID of the serial port, not the I/O port, despite the name). devinfo -v will give the UID to uartX mapping. This is an incompatible change for HYPER-V on amd64. It only works with eficom console, so you'll need to change your configuration in loader.conf. No compatibility hack will ever be provided for this (since it requires renamig, which the loader cannot reliably do). It's also an incompatible change for aarch64. comconsole will need to change to eficom. There might be a comconsole "shim" for this. All the interlock to keep only eficom and comconsole from both attaching have been removed. RelNotes: Yes Sponsored by: Netflix Discussed with: kevans Differential Revision: https://reviews.freebsd.org/D39982
* loader: install help files only onceEd Maste2023-05-102-0/+2
| | | | | | | | | | | | | | Every file should be installed exactly once by `make installworld`. This is especially important for pkgbase. Loader help files were being installed by each loader variant (e.g., the simp, lua, and 4th EFI loaders). Add a (slightly hacky) mechanism to skip installing help files for all but one variant. PR: 271178 Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40021
* pxeboot: bugs in pxe.hToomas Soome2023-04-261-2/+1
| | | | | | | | SEGDESC_t needs to be PACKED there is no status in t_PXENV_UNDI_MCAST_ADDRESS Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39799
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-194-11/+7
|
* boot0: Drop the BOOT_BOOT0_ORG option.John Baldwin2023-04-181-4/+2
| | | | | | | | This shouldn't be an option (and I added it in the first place back in 4ae4202e705cf6a12aa3cbb49efb153879a6bc2f and 83f4b92050cbf8913d5c0aac16726c783d8b2d9c). However, unlike the other knobs I added back then, this really shouldn't be a knob since it is hardcoded in the source.
* boot0: Expand the description of BOOT_BOOT0_ORG.John Baldwin2023-04-181-2/+5
| | | | | | This really shouldn't even be an option given it is hardcoded as a constant named ORIGIN in the assembly. mbr.S also uses 0x600 and hardcodes it in both the assembly and the Makefile.