mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
kboot: Initialize hostfs_root sooner (and remove kboot.conf)
Move the initialization of hostfs_root to be a bit sooner. While it doesn't matter for the default case, we may want to use hostfs files sooner. Also, while we're here, remove kboot.conf. It duplicates the command line and has proven difficult to use. It will be replaced by an early script that can influence the state of the boot loader before we select a device to boot from (including strongly suggesting which one to boot from). Sponsored by: Netflix
This commit is contained in:
parent
68344c9c6c
commit
0111f09ca6
|
@ -357,17 +357,17 @@ main(int argc, const char **argv)
|
||||||
/* Parse the command line args -- ignoring for now the console selection */
|
/* Parse the command line args -- ignoring for now the console selection */
|
||||||
parse_args(argc, argv);
|
parse_args(argc, argv);
|
||||||
|
|
||||||
parse_file("host:/kboot.conf");
|
hostfs_root = getenv("hostfs_root");
|
||||||
|
if (hostfs_root == NULL)
|
||||||
|
hostfs_root = "/";
|
||||||
|
|
||||||
/* Initialize all the devices */
|
/* Initialize all the devices */
|
||||||
devinit();
|
devinit();
|
||||||
|
|
||||||
|
/* Figure out where we're booting from */
|
||||||
bootdev = getenv("bootdev");
|
bootdev = getenv("bootdev");
|
||||||
if (bootdev == NULL)
|
if (bootdev == NULL)
|
||||||
bootdev = hostdisk_gen_probe();
|
bootdev = hostdisk_gen_probe();
|
||||||
hostfs_root = getenv("hostfs_root");
|
|
||||||
if (hostfs_root == NULL)
|
|
||||||
hostfs_root = "/";
|
|
||||||
#if defined(LOADER_ZFS_SUPPORT)
|
#if defined(LOADER_ZFS_SUPPORT)
|
||||||
if (bootdev == NULL || strcmp(bootdev, "zfs:") == 0) {
|
if (bootdev == NULL || strcmp(bootdev, "zfs:") == 0) {
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue