#
360599 |
|
03-May-2020 |
kevans |
MFC r359371: loader: Fully reset terminal settings, not just colors
|
#
329183 |
|
12-Feb-2018 |
kevans |
MFC Loader Fixes Final: r327612,r327703,r327704,r327878,r327879,r327881, r328007,r328029,r328030,r328031,r328061,r328156,r328169,r328288,r328289, r328290,r328291,r328292,r328411,r328536,r328603,r328614,r328642,r328769, r328779,r328780,r328781,r328782,r328783,r328806,r328808,r328826,r328835, r328911,r328986,r328987,r328990,r328999,r329000,r329019,r329050,r329054, r329060
r327612: Invent new #defines for the biospci_{read,write}_config function
r327703: Define __dmadat after #include'ing ufsread.c.
r327704: Fix printf missing format variables warnings.
r327878: Add GUID for UEFI boot manager variables.
r327879: Report the boot order and where we are in that boot order.
r327881: Allow this file to be included
r328007: Fix booting on some arm64 systems after r327879 by fixing the call to utf8_to_ucs2
r328029: When returning an error and freeing allocated memory from ucs2_to_utf8, NULL the return pointer.
r328030: Check the return value from utf8_to_ucs2 instead of whether or not uv is NULL.
r328031: Need to free uv after we're done using it.
r328061: utf8_to_ucs2() should check for malloc failure
r328156: stand: Move sections around to fix stand/ build with ld.lld on armv7
r328169: Remove extra copy of bootinfo.c. It's a bit rotted copy of the one in efi/loader.
r328288: Fix some resource leaks.
r328289: Don't leak memory when displaying help.
r328290: On malloc failure, be sure to close the include file that triggered it.
r328291: getenv does not return tainted data in the boot loader. Attempt to clue Coverity into that fact.
r328292: There's no tainted data here, tag it as such to avoid false positives.
r328411: loader.efi: add missing EFI GUIDs
r328536: loader: support for mixed-endianness ELF/loader and POWER8
r328603: Add missing non-POWERPC case to give the scr value something non-zero.
r328614: Move libstand.3 to libsa.3. Update libsa.3 to include functions
r328642: Break out the interpreters (simple and forth) w/o ifdefs.
r328769: Centralize several variables.
r328779: Retire pnp.4th and the code needed only for 4th words used here.
r328780: These 4th words were an attempt to allow integration into the boot loader scripts. However, that path won't be taken after all it seems.
r328781: Remove pcibios forth support.
r328782: Now that we no longer conditionally compile some files outside of ficl
r328783: Invent new LDR_INTERP for the loader interpreter to use.
r328806: We need more heap space to properly load newer powerpc kernels.
r328808: Implement strcoll as strcmp.
r328826: Make cross-endian loader changes apply only to powerpc
r328835: Fix regression introduced in r328806, preventing boot on many platforms.
r328911: Ignore relocation tables for non-memory-resident sections.
r328986: Fix relative location of USB sources after recent move.
r328987: A more definitions to kernel emulation shim in order to build stand/usb.
r328990: Move the stand/usb test loader into its own directory.
r328999: Fix indentation to FreeBSD standard for interp files
r329000: Move simple interpreter 'perform' into interp.c and call it
r329019: Move to tabs for indentation and to 8-space notches, per style(9).
r329050: Fix build of userboot.so
r329054: Set script.lang in the environment to either 'forth' or 'simple' to reflect what scripting language was compiled into the loader.
r329060: loader: fix endianness conversion
PR: 225323
|
#
329145 |
|
12-Feb-2018 |
kevans |
MFC r325834,r325997,326502: Move sys/boot to stand/
This is effectively a direct commit to stable/11, due to differences between stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often accompanied by kernel changes. Many of these were also risc-v updates that likely had many more dependencies to MFC.
Because of this, sys/boot/fdt/dts remains as-is while everything else in sys/boot relocates to stand/.
r325834: Move sys/boot to stand. Fix all references to new location
r325997: Remove empty directories.
r326502: Document the sys/boot -> stand move in hier.7 and the top-level README. |
#
329099 |
|
10-Feb-2018 |
kevans |
MFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042, r313047,r313166,r313328,r313332,r313333,r313337,r313348,r313349,r313389, r313442,r313451,r313575,r313645,r313710,r314114,r314213,r314275,r314945, r314948,r315008,r315408,r315427,r315645,r315646,r315648,r315653,r315850, r316064,r316078,r316079,r316100,r316104,r316111,r316112,r316171,r316279, r316280,r316287,r316311,r316343,r316424,r316436
r311458: Use compiler driver to link BERI boot loaders
r312237: loader.efi: find_currdev() can leak memory
r312314: loader: move device path definitions to include/efidevp.h
r312374: loader: efi devpath api usage should be more aware of NULL pointers
r312947: Remove "-Xassembler -G0" from CFLAGS.
r313042: loader.efi environment related cleanups
r313047: loader: disk/part api needs to use uint64_t offsets
r313166: loader: libefi/env.c warnings in arm build
r313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE.
r313332: loader: bcache read ahead block count should take account the large sectors
r313333: loader: Replace EFI part devices.
r313337: loader: 313329 missed ZFS guard in loader/main.c
r313348: loader: biosdisk fix for 2+TB disks
r313349: loader: disk io should not use alloca()
r313389: efipart is also using the '%S' printf format, add -Wno-format for it.
r313442: loader: possible NULL pointer dereference in efipart.c
r313451: loader: possible NULL pointer dereference in bcache.c
r313575: makefs: make the buffer functions look exactly like the kernel ones
r313645: loader: implement MEDIA_FILEPATH_DP support in efipart
r313710: loader: cstyle fixes and DIOCGMEDIASIZE should use uint64_t
r314114: Use LDFLAGS with CC instead of _LDFLAGS.
r314213: Remove control+r handling from geliboot's pwgets()
r314275: Remove unused macro from common/drv.c.
r314945: Some style(9) fixes. No functional changes.
r314948: Try to extract the RFC1048 data from PXE.
r315008: r314948 seems to be missing a variable or two that will break
r315408: loader: remove open_disk cache
r315427: loader: biosdisk should report IO error from INT13
r315645: loader: disk_cleanup was left in userboot_disk.c
r315646: loader: pxe.h constants have wrong values
r315648: libstand: verify value provided by nfs.read_size
r315653: loader: verify the value from dhcp.interface-mtu and use snprintf o set mtu
r315850: The original author abused Nd (one-line description, used by makewhatis)
r316064: Fix build with path names with 'align' or 'nop' in them.
r316078: gpt*boot: Save a bit more memory when LOADER_NO_GELI_SUPPORT is specified
r316079: Simply retire the sedification of the boot2.s file.
r316100: Remove -fno-guess-branch-probability and -fno-unit-at-a-time.
r316104: Use `NO_WCAST_ALIGN` instead of spelling it out as -Wno-cast-align in CFLAGS
r316111: loader: move bios getsecs into time.c
r316112: loader: ls command should display file types properly
r316171: xfsread inlined uses more space, so remove the inline tag.
r316279: loader: efipart should check disk size from partition table
r316280: loader: simplify efi_zfs_probe and avoid double probing for zfs.
r316287: Remove OLD_NFSV2 from loader and libstand
r316311: Add explicit_bzero() to libstand, and switch GELIBoot to using it
r316343: Implement boot-time encryption key passing (keybuf)
r316424: Fix sparc64 build broken by r316343 and r316076
r316436: Restore EFI boot environment functionality broken in r313333
PR: 216940 217298 217935 |
#
329011 |
|
08-Feb-2018 |
kevans |
MFC r307322,r307323,r307324,r307326,r307327,r307338,r307879,r307908,r307911, r307942,r307950,r307951,r307954,r307955,r308125,r308195,r308476,r308534, r308535,r308776,r308843,r310236,r310726: Loader fixes, 2016q4
r307322: Remove /boot/boot.conf, deprecated for 16 years
r307323: Remove fetching of pInterp.
r307324: Create a new linker set, Xficl_compile_set which contains a list of functions to call to register new forth words.
r307326: In UEFI mode expose the SMBIOS anchor base address via kenv
r307327: Update i386 build of loader.efi (but leave it disabled) so that we at least build it now.
r307338: Create a pcibios-version environment FORTH word.
r307879: Preliminary support for EFI in boot loader.
r307908: Fix the build on both arm64 and when WITHOUT_FORTH is defined.
r307911: Add better comment...
r307942: Really make WITHOUT_FORTH (MK_FORTH==no) work.
r307950: Add it (Makefile.ficl) to the right place
r307951: Fix two backwards tests.
r307954: Back out the move to the loader script from -N.
r307955: LIBSTAND goes last, so put it last here too.
r308125: In loader.efi, instead of exiting directly, try to fallback.
r308195: efinet_dev_print should honor verbose option.
r308476: boot/forth spelling issue in forth word
r308534: The file_loadraw function grew an argument, update install function
r308535: Add support for LOADER_RC setting in the pkgfs manifes
r308776: loader: zfs toplevel vdev must have spa set.
r308843: loader: smbios version check is not correct
r310236: Renumber license clauses to avoid skipping #3
r310726: cdboot: add explict suffix to ambiguous or instruction
PR: 214375 |
#
329010 |
|
08-Feb-2018 |
kevans |
MFC r303555,r303556,r303936,r303962,r304317,r304532,r305026,r305107,r305132, r305178,r305353,r305814,r306159,r306380,r306504: Loader fixes, 2016q3
r303555: bcache should support reads shorter than sector size
r303556: Improve boot loader quote parsing
r303936: Add kernel environment variables under smbios.system
r303962: Add the missing space between .asciz directive and opening quote for some lines with #ifdef BTXLDR_VERBOSE/#endif
r304317: boot1.efi Free() should check for NULL to provide consistent behavior
r304532: Replace sprintf -> snprintf for command_errbuf provisioned from dynamic content.
r305026: Emulate efi_cons_poll when WaitForKey is not available
r305107: Create a hook 'post-initialize' for people that want to define something to read in .conf files after all other .conf files for the purpose of overriding.
r305132: Remove accidentally committed stray comment.
r305178: bd_int13probe() should check extended info if sector info is bad
r305353: Don't use -N to set the OMAGIC with data and text writeable and data not page aligned.
r305814: ufsread: Do not cast struct direct from void *
r306159: Consistently declare getsecs(void) with proper return type and void when no arguments are present.
r306380: loader command interpreter should reset command_errmsg
r306504: Fix a cluster of bugs in list EFI environment variables
PR: 204602, 211958, 211958 Relnotes: yes ("Improve boot loader quote parsing") |
#
302408 |
|
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
300115 |
|
18-May-2016 |
imp |
Explain why extra sutff always outputs even when it shouldn't for the '?' command. Wasted a bunch of time tracking it down tonight.
|
#
298831 |
|
30-Apr-2016 |
pfg |
boot/forth: spelling fixes.
Reviewed by: dteske MFC after: 2 weeks
|
#
281275 |
|
08-Apr-2015 |
dteske |
Re-do proper mode-endings. Antithesis of r281176-281179 which reverted earlier migration away from sloppy mode-endings (r280925,280974-280976) due to a red-herring in diagnosing HardenedBSD boot lockup.
Thanks to: lattera (shawn.webb@hardenedbsd<dot>org) MFC after: 3 days X-MFC-to: stable/10 X-MFC-with: r280925,280974-280976,281176-281179
|
#
281176 |
|
06-Apr-2015 |
dteske |
Partially revert r280925: Back to previous mode-endings based on feedback
MFC after: 3 days X-MFC-with: r280925 Reported by: lattera
|
#
280937 |
|
01-Apr-2015 |
dteske |
Solve dreaded "dictionary full" issue by segregating words into new vocabularies delay-processing, password-processing, version-processing, frame-drawing, menu-infrastructure, menu-namespace, menu-command-helpers, and menusets-infrastructure. The net effect is to remove almost 200 definitions from the main forth vocabulary reducing the dictionary size by over 50%. The chances of hitting "dictionary full" should be greatly reduced by this patch.
MFC after: 3 days X-MFC-to: stable/10
|
#
280925 |
|
31-Mar-2015 |
dteske |
Optimize bootmsg to use fg/bg/me from screen.4th NB: screen.4th is included by way of check-password.4th
MFC after: 3 days X-MFC-to: stable/10
|
#
280924 |
|
31-Mar-2015 |
dteske |
Comments. No functional change(s).
MFC after: 3 days X-MFC-to: stable/10
|
#
277215 |
|
15-Jan-2015 |
royger |
loader: implement multiboot support for Xen Dom0
Implement a subset of the multiboot specification in order to boot Xen and a FreeBSD Dom0 from the FreeBSD bootloader. This multiboot implementation is tailored to boot Xen and FreeBSD Dom0, and it will most surely fail to boot any other multiboot compilant kernel.
In order to detect and boot the Xen microkernel, two new file formats are added to the bootloader, multiboot and multiboot_obj. Multiboot support must be tested before regular ELF support, since Xen is a multiboot kernel that also uses ELF. After a multiboot kernel is detected, all the other loaded kernels/modules are parsed by the multiboot_obj format.
The layout of the loaded objects in memory is the following; first the Xen kernel is loaded as a 32bit ELF into memory (Xen will switch to long mode by itself), after that the FreeBSD kernel is loaded as a RAW file (Xen will parse and load it using it's internal ELF loader), and finally the metadata and the modules are loaded using the native FreeBSD way. After everything is loaded we jump into Xen's entry point using a small trampoline. The order of the multiboot modules passed to Xen is the following, the first module is the RAW FreeBSD kernel, and the second module is the metadata and the FreeBSD modules.
Since Xen will relocate the memory position of the second multiboot module (the one that contains the metadata and native FreeBSD modules), we need to stash the original modulep address inside of the metadata itself in order to recalculate its position once booted. This also means the metadata must come before the loaded modules, so after loading the FreeBSD kernel a portion of memory is reserved in order to place the metadata before booting.
In order to tell the loader to boot Xen and then the FreeBSD kernel the following has to be added to the /boot/loader.conf file:
xen_cmdline="dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga" xen_kernel="/boot/xen"
The first argument contains the command line that will be passed to the Xen kernel, while the second argument is the path to the Xen kernel itself. This can also be done manually from the loader command line, by for example typing the following set of commands:
OK unload OK load /boot/xen dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga OK load kernel OK load zfs OK load if_tap OK load ... OK boot
Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D517
For the Forth bits: Submitted by: Julien Grall <julien.grall AT citrix.com>
|
#
258270 |
|
17-Nov-2013 |
dteske |
Add a try-include word (which acts the same as "include") and use it to conditionally include (but ignore failures) /boot/loader.rc.local and /boot/menu.rc.local -- to make customizing the menu easier.
Reviewed by: alfred Discussed on: -hackers
|
#
257821 |
|
07-Nov-2013 |
dteske |
Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8), making it available to architectures that do not use or load the beastie menu. This is reported to save headaches on some PPC systems where unload followed by load does not produce the desired results wherein if-given the opportunicy to abort the initial loading sequence, you can customize the first load.
Reviewed by: nwhitehorn, kan Discussed on: -current
|
#
257650 |
|
04-Nov-2013 |
dteske |
Defer loading of kernel and modules if the beastie menu is enabled. Add a kernel selection menu to the beastie menu. List of kernels is taken from `kernels' in loader.conf(5) as a space (or comma) separated list of names to display (up to 9). If not set, default value is "kernel kernel.old". Does not validate that kernels exist because the next enhancement will be to allow selection of the root device.
Discussed on: -current MFC after: 3 days
|
#
242667 |
|
06-Nov-2012 |
dteske |
Add ontop of my existing boot loader Forth code, including support for submenus. See menusets.4th(8) for additional details including examples.
Discussed on arch and recommended for inclusion at the devsummit.
This change does not alter the appearance or user experience, only enhances possibilities.
Reviewed by: adrian (co-mentor) Approved by: adrian (co-mentor)
|
#
241361 |
|
08-Oct-2012 |
dteske |
Add an echo to say we're "Booting..." when the overloaded "boot" Ficl word is executed to better differentiate between loader-specific errors and kernel- specific errors (if ever any of either).
This type of functionality hasn't been required before the introduction of the advanced menu system (r222417). Adding this functionality will help different- iate errors at the loader-level such as a BTX halt caused by heap exhaustion and errors that may be involved with executing the kernel (wrong architecture for example). A user can learn that messages before "Booting..." are related to the loader(8) environment and it's Forth-ilk, while those after are not related to loader(8) -- the point that loader(8) has ``left the building''.
This patch also includes a man-page update to color.4th(8) as the color logic moves to a lower-level (from being included by beastie.4th to being included by loader.4th).
After noticing a delay between execution of the overloaded "boot" FICL word and the display of text on-screen, gcooper confirmed that the introduction of a builtin memory test (disabled by adding hw.memtest.tests="0" to loader.conf(5)) was the cause of the delay.
This patch adds an echo to produce "Booting..." when the overloaded "boot" word is executed (this includes from the interactive command-prompt on all arches, from the menu system on arches that run the beastie menu, and even those arches that run the menu but disable it by setting beastie_disable="YES" in loader.conf(5)). When loader_color="YES" in loader.conf(5), the same message is produced but in white text on a blue background (only the letters produced have this background -- opposed to perhaps the entire line).
|
#
229881 |
|
09-Jan-2012 |
pluknet |
Get rid of a spurious warning on the console when booting the kernel from the interactive loader(8) prompt and beastie_disable="YES" is set in loader.conf(5). In this case menu.rc is not evaluated and consequently menu-unset does not have a body yet. This results in the ficl warning "menu-unset not found" when try-menu-unset invokes menu-unset.
Check for beastie_disable="YES" explicitly, so that the try-menu-unset word will not attempt to invoke menu-unset because the menu will have never been configured. [1] Use the sfind primitive as a last resort as an additional safer approach conjuring a foreign word safely. [2]
PR: kern/163938 Submitted by: Devin Teske [1] Reviewed by: Devin Teske [2] Reported and tested by: dim MFC after: 1 week X-MFC with: r228985
|
#
228985 |
|
30-Dec-2011 |
pluknet |
Unset the environment variables associated with individual menu items before invoking the kernel.
Quoting submitter:
The issue is with the new boot loader menu. It adds many loader variables including ones that contain ANSI color escapes.
Obviously, these ANSI codes don't play well with serial consoles when kenv(1) is executed without arguments (reports vary as to what happens, but it's never pretty).
The net-effect is that kenv(1) no longer reports menu-related variables.
In essence, kenv(1) output should now appear the same as on RELENG_8 (which lacks the new boot loader and didn't use any such variables). Thus, restoring serial console glory.
Submitted by: Devin Teske <devin dott teske fisglobal.com> MFC after: 2 weeks
|
#
222417 |
|
28-May-2011 |
julian |
New boot loader menus from Devin Teske. Discussed on hackers and recommended for inclusion into 9.0 at the devsummit. All support email to devin dteske at vicor dot ignoreme dot com .
Submitted by: dteske at vicor dot ignoreme dot com Reviewed by: me and many others
|
#
186789 |
|
05-Jan-2009 |
luigi |
This patch introduces a number of simplifications to the Forth functions used in the bootloader. The goal is to make the code more readable and smaller (especially because we have size issues in the loader's environment).
High level description of the changes: + define some string manipulation functions to improve readability; + create functions to manipulate module descriptors, removing some duplicated code; + rename the error codes to ESOMETHING; + consistently use set_environment_variable (which evaluates $variables) when interpreting variable=value assignments;
I have tested the code, but there might be code paths that I have not traversed so please let me know of any issues.
Details of this change:
--- loader.4th --- + add some module operators, to remove duplicated code while parsing module-related commands:
set-module-flag enable-module disable-module toggle-module show-module
--- pnp.4th --- + move here the definition related to the pnp devices list, e.g. STAILQ_* , pnpident, pnpinfo
--- support.4th --- + rename error codes to capital e.g. ENOMEM EFREE ... and do obvious changes related to the renaming; + remove unused structures (those relevant to pnp are moved to pnp.4th) + various string functions - strlen removed (it is an internal function) - strchr, defined as the C function - strtype -- type a string to output - strref -- assign a reference to the string on the stack - unquote -- remove quotes from a string
+ remove reset_line_buffer
+ move up the 'set_environment_variable' function (which now uses the interpreter, so $variables are evaluated). Use the function in various places
+ add a 'test_file function' for debugging purposes
MFC after: 4 weeks
|
#
158467 |
|
12-May-2006 |
jhb |
Remove more Alpha bits from the boot code including fixing several stale comments.
|
#
97201 |
|
24-May-2002 |
gordon |
Add support for reading an additional loader configuration file. By default, this is called /boot/nextboot.conf. This file is required to have it's first line be nextboot_enable="YES" for it to be read. Also, this file is rewritten by the loader to nextboot_enable="NO"<space> after it is read. This makes it so the file is read exactly once. Finally, the nextboot.conf is removed shortly after the filesystems are mounted r/w.
Caution should be taken as you can shoot yourself in the foot. This is only the loader piece. There will be a tool called nextboot(8) that will manage the nextboot.conf file for you. It is coming shortly.
Reviewed by: dcs Approved by: jake (mentor)
|
#
87636 |
|
11-Dec-2001 |
jhb |
- Add 'fwrite' and 'fseek' words for writing to and seeking on files. - Change the 'fopen' keyword to accept a mode parameter. Note that this will break existing 4th scripts that use fopen. Thus, the loader version has been bumped and loader.4th has been changed to check for a sufficient version on i386 and alpha. Be sure that you either do a full world build or install or full build and install of sys/boot after this since loader.old won't work with the new 4th files and vice versa.
PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
|
#
77444 |
|
29-May-2001 |
dcs |
Go back to 1.20 again.
|
#
77376 |
|
29-May-2001 |
dcs |
Revert 1.20, as it causes mysterious problems to the Alpha people.
|
#
76714 |
|
17-May-2001 |
dcs |
Allocate more memory if necessary.
|
#
66871 |
|
09-Oct-2000 |
dcs |
Now I see the error of my ways.
Previous revision of this file changed the "boot" commands to take no arguments from the stack. This is only valid in the case where a kernel has not been loaded. In that case, load_kernel_and_modules will be called, which takes a list of arguments from the stack.
When a kernel is presently loaded, though, the list of arguments must be passed to the boot command, which was the behaviour before the last revision.
Fix things for both cases.
Noticed by: S-Max and others on that chat room
|
#
66346 |
|
25-Sep-2000 |
dcs |
What could possibly have possessed me to forget the "0 (arguments)" in two of the three boot words in the "boot" redefinition, I have no clue. Fix it.
Noticed by: bp Noticed by: adrian
|
#
66046 |
|
18-Sep-2000 |
dcs |
Check for the correct minimum version required by the current code.
I hope I got this right... :-)
|
#
65949 |
|
16-Sep-2000 |
dcs |
Use _ instead or - where proper, according to the style I have been using.
Overload "?" so it will also show loader.4th commands.
|
#
65945 |
|
16-Sep-2000 |
dcs |
Solve a name clash. Add something to help debugging.
|
#
65938 |
|
16-Sep-2000 |
dcs |
Both boot and boot-conf were using a different algorithm from the one used by start to find the kernel. Fix this.
Also, boot would proceed immediately in the absence of a path as argument. Check first if a kernel has already been loaded, and, if not, fall back to load kernel&modules behavior.
Some further factorizing. I deem this code to be mostly readable by now! :-)
Many thanks to: Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
|
#
65883 |
|
15-Sep-2000 |
dcs |
Factorize, reorganize, and move code around.
The boot-conf and boot code had various bugs, and some of it was big, ugly, unwieldy, and, sometimes, plain incorrect. I'm just about completely replaced these ugly parts with something much more manageable.
Minor changes were made to the well-factorized parts of it, to accomodate the new code.
Of note:
* make sure boot-conf has the exact same behavior wrt boot order as start.
* Correct both boot and boot-conf so they'll work correctly when compiled in, as they both had some bugs, minor and major.
* Remove all the crud from loader.4th back into support.4th, for the first time since boot-conf was first improved. Hurray!
I'm fairly satisfied with the code at this time. Time to see about those man pages...
|
#
65630 |
|
09-Sep-2000 |
dcs |
First tackle at trying to handle the New Deal on kernels.
Load the first of the following kernels to be found:
${kernel} if ${kernel} is an absolute path /boot/${kernel}/${kernel} /boot/${kernel}/${bootfile} ${kernel}/${kernel} ${kernel}/${bootfile} ${kernel} ${bootfile}
The last instance of ${kernel} and ${bootfile} will be treated as a list of semicolon separated file names, and each will be tried in turn, from left to right.
Also, for each filename loader(8) will try filename, filename.ko, filename.gz, filename.ko.gz, in that order, but that's not related to this code.
This resulted in a major reorganization of the code, and much of what was accumulating on loader.4th was rightly transfered to support.4th.
The semantics of boot-conf and boot also changed. Both will try to load a kernel the same as above.
After a kernel was loaded, the variable module_path may get changed. Such change will happen if the kernel was found with a directory prefix. In that case, the module path will be set to ${directory};${module_path}.
Next, the modules are loaded as usual.
This is intended so kernel="xyzzy" in /boot/loader.conf will load /boot/xyzzy/kernel.ko, load system modules from /boot/xyzzy/, and load third party modules from /boot/modules or /modules. If that doesn't work, it's a bug.
Also, fix a breakage of "boot" which was recently introduced. Boot without any arguments would fail. No longer. Also, boot will only unload/reload if the first argument is a path. If no argument exists or the first argument is a flag, boot will use whatever is already loaded. I hope this is POLA. That behavior is markedly different from that of boot-conf, which will always unload/reload.
The semantics introduced here are experimental. Even if the code works, we might decide this is not the prefered behavior. If you feel so, send your feedback. (Yeah, this belongs in a HEADS UP or something, but I've been working for the past 16 hours on this stuff, so gimme a break.)
|
#
65621 |
|
08-Sep-2000 |
dcs |
Enhance boot-conf.
Now boot-conf can also receive parameters to be passed to the kernel being booted. The syntax is the same as in the boot command, so one boots /kernel.OLD in single-user mode by typing:
boot-conf /kernel.OLD -s instead of boot-conf -s /kernel.OLD
The syntax still supports use of directory instead of file name, so
boot-conf kernel.OLD -s
may be used to boot /boot/kernel.OLD/kernel.ko in single-user mode.
Notice that if one passes a flag to boot-conf, it will override the flags set in .conf files, but only for that invocation. If the user aborts the countdown and tries again without passing any flags, the flags set in .conf files will be used.
Some factorization was done in the process of enhancing boot-conf, as it has been growing steadly as features are getting added, becoming too big for a Forth word. It still could do with more factorization, as a matter of fact.
Override the builtin "boot" with something based on boot-conf. It will behave exactly like boot-conf, but booting directly instead of going through autoboot.
Since we are now pairing kernel and module set in the same directory, this change to boot makes sense.
|
#
61694 |
|
14-Jun-2000 |
dcs |
Revert to 1.8
|
#
61650 |
|
14-Jun-2000 |
peter |
With apologies to dcs, temporarily comment out the version check code. It is failing for everybody that I have spoken with that has tried it.
FreeBSD/i386 bootstrap loader, Revision 0.8 (root@outback.netplex.com.au, Tue Jun 13 23:26:49 PDT 2000) Loader version 0.3+ required Aborted! start not found
Note that the 0.3+ message is from inside the arch-alpha block, not the i386 block of code. And even then, 0.8 is higher than 0.3.
This prevents the rest of the loader.conf stuff working. :-/
|
#
61585 |
|
12-Jun-2000 |
dcs |
The word environment? returns a flag indicating whether the variable was found or not. Fix it's usage. Alas, it caused no problem before, besides leaving garbage in the stack, because refill, used by [if] [else] [then], was broken.
|
#
61379 |
|
07-Jun-2000 |
dcs |
Put some version checking.
|
#
61376 |
|
07-Jun-2000 |
dcs |
Modify boot-conf so it can take a kernel or directory name as a parameter and dtrt.
Also, make boot-conf always unload first. There wasn't really any point in not doing this, as the kernel _has_ to be loaded before any other modules.
Tested by: dwhite
|
#
53672 |
|
24-Nov-1999 |
dcs |
Add silly password feature. If people want to depend on a flawed security measures, so be it. It costs us almost nothing.
Document some code in support.4th that I was unable to understand just by reading.
|
#
50477 |
|
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
47198 |
|
14-May-1999 |
dcs |
Add "initialize" to loader.4th, so running "start" is not actually needed.
|
#
46005 |
|
24-Apr-1999 |
dcs |
Add loader.4th man page (worst man page I ever wrote -- reviews are welcomed). Correct a nasty bug in loader.4th before anyone notices, add a couple of features.
|
#
44603 |
|
09-Mar-1999 |
dcs |
New loader.rc stuff.
Reviewed by: jkh
|