Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   pgoyette
Date:           Tue May 20 12:26:03 UTC 2025

Modified Files:
        src/share/man/man8/man8.x86: boot.8
        src/sys/arch/i386/stand/boot: boot2.c
        src/sys/arch/i386/stand/efiboot: boot.c

Log Message:
Historically (prior to supporting the KERNEL_DIR build option), the
boot-commands ``boot file'' and ``boot /file'' were equivalent and
attempted to execute the same set of files.  (In the boot-loader,
all path (filename) lookups start at the root directory whether or
not a leading slash is present.)

However, with the recent addition of support for the KERNEL_DIR
option, the leading slash character resulted in skipping the attempt
to load /file/kernel and /file/kernel.gz, and thus the boot loader
will not attempt to boot from a new KERNEL_DIR environment if the
leading slash is present.  This commit restores attempting to load
these files, thus making these two boot-commands once again equivalent
in both legacy and KERNEL_DIR environments..

Changes were tested on both i386 (biosboot/qemu) and amd64 (both
biosboot/qemu and efiboot/bare-metal).  Correct behavior was observed
using the filenames printed by a preexisting printf().  The output
from ``boot'' commands without arguments was also confirmed to meet
expectations, and commands other than ``boot'' continued to work as
expected.

As discussed on tech-kern, port-i386, and port-amd64 mailing lists.
The more extensive documentation requested by riastradh@ should have
been dealt with more than five years ago with the initial KERNEL_DIR
commit;  this commit doesn't pretend to meet that request.  As noted
by kre@, the changes being made here are minor/trivial and highly
unlikely to break anything.  These changes only affect booting in
new KERNEL_DIR environments; "legacy" environments are not affected.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/share/man/man8/man8.x86/boot.8
cvs rdiff -u -r1.88 -r1.89 src/sys/arch/i386/stand/boot/boot2.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/i386/stand/efiboot/boot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index