From nobody Mon May 20 04:08:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjPFJ61LWz5LhC2; Mon, 20 May 2024 04:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjPFJ0pZ0z4CtG; Mon, 20 May 2024 04:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sgjtmUhDr6VgrkcT0oweZuL6QVyOJA6b6zKoaDFmgtk=; b=WUcqii5j+eKMdMC07NlkhMcIlIFfq/+XPwQGita3udFQMdIH6GTqaYT+nePZjeqeesuSd8 ycg/NfchRrMS3q5cUYq6TU9H3i21j67pRBexBMa/7mQmFh+2722mSd6J+OLHlnTIqkuXv6 DJtkIapPbeDjWRB0txmIDMIxkmwmYS+0szH62etaV0W4VKv3aAGncmVFeoVRLHuPm9JbV0 tjkaGJyweX8cjSazNTH8SbpNu3SmJLW62+5Gf43wrPnOoyx9Jh9lDQLstNHOmxyrCFrOt5 3kzhzrRyYN5y56KXRtjcEg/yB6siOCUrdv4hbccfzPb8SokxmKtCCcofymZAwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716178116; a=rsa-sha256; cv=none; b=WEJpRc0eETIbwKkbO19IfYPLPS+PhLZNEG8/bkCmOXaIntzQkfWrAQJDJY4ECdd6s4dOdg AFjd7d2F2h5jAXudQVqXpcS0DC/Uoc36UPFrB6nDfNVTSCYUbXsrvjckFcJcarvndFrbAW m2D5ystAAZxP96wpI1iveRU67LqK4Zdc2tENDx/eV2vdy69cmtdxHp0LONHSSMizfErtA/ TMjHEE/Yf/9AbfUa93ZfIer/U38XRqA8ftrqmdWaCG9fpmHY5gp9J+w+1lwFBsABdft/NF 9IrdbWLNo41ndHLBm7fzqjtEwJbXc0MZejJTig4MbBXQzfUXs9sy1ngvEz5YWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sgjtmUhDr6VgrkcT0oweZuL6QVyOJA6b6zKoaDFmgtk=; b=qA/8vDj39TJxi5H8ir/ZKHJZbEzyTHzcsBFkv6jC9Xs/CAhwENRJzEbgmFnHeks7OEVCK6 fpNHGcQ5pmlit1KxlfUFmDVBdWsL31WFCdjWLqB8fpBdE75DciFUaqStOSjtso0d9P+TSa NAgV+g7Rts6MDrAO4E1H7kUSkpxKPaIEg1ydOx1bX2FDpkm8jXP3IwaK0RrdnYp9C6J6Ju op3qRtd0gN5pqm1FWa382PA8GT4Kn5KSWGxRLMryZ1bD82gsI4TZ0C97Xv2AfIF3zAtamx 10XP9lokndG64fkl2j9r1fO3/Qu6drr6+pxgK4QjygyNGRasv5f6ob429C++RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjPFJ0Qt5zNHJ; Mon, 20 May 2024 04:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K48aJc081155; Mon, 20 May 2024 04:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K48ZVH081152; Mon, 20 May 2024 04:08:35 GMT (envelope-from git) Date: Mon, 20 May 2024 04:08:35 GMT Message-Id: <202405200408.44K48ZVH081152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0111f09ca670 - main - kboot: Initialize hostfs_root sooner (and remove kboot.conf) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0111f09ca67070271e43655db2e4989cf2d64f88 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0111f09ca67070271e43655db2e4989cf2d64f88 commit 0111f09ca67070271e43655db2e4989cf2d64f88 Author: Warner Losh AuthorDate: 2024-05-19 17:05:48 +0000 Commit: Warner Losh CommitDate: 2024-05-20 04:05:41 +0000 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 --- stand/kboot/kboot/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/kboot/kboot/main.c b/stand/kboot/kboot/main.c index ed5cad450000..994df1ec9fa1 100644 --- a/stand/kboot/kboot/main.c +++ b/stand/kboot/kboot/main.c @@ -357,17 +357,17 @@ main(int argc, const char **argv) /* Parse the command line args -- ignoring for now the console selection */ parse_args(argc, argv); - parse_file("host:/kboot.conf"); + hostfs_root = getenv("hostfs_root"); + if (hostfs_root == NULL) + hostfs_root = "/"; /* Initialize all the devices */ devinit(); + /* Figure out where we're booting from */ bootdev = getenv("bootdev"); if (bootdev == NULL) bootdev = hostdisk_gen_probe(); - hostfs_root = getenv("hostfs_root"); - if (hostfs_root == NULL) - hostfs_root = "/"; #if defined(LOADER_ZFS_SUPPORT) if (bootdev == NULL || strcmp(bootdev, "zfs:") == 0) { /*