From nobody Tue Aug 06 23:30:28 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 4WdqKx1cFFz5S8Yx; Tue, 06 Aug 2024 23:30:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdqKx1190z4mQ1; Tue, 6 Aug 2024 23:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987029; 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=NL/u5B/lqaQQgEPDkQEkqaoN7benN/pglHxjMtH4AM8=; b=OvCz0Ws7cwOqvtVagWWoKUGLm7kVBz0GQPC/gfSv5ZDOXGT2J32vcuafTVfEzxtaC6polK QIDBWDDHwlnCTu7Q5WXW7fcrmRNPrj2LwEE/OF+weWmG2XZ4LSsfMNeKJ7bjIDrB3jyLzk hju/FvEd9xiZiDkSwl2u+pl7rEanqZ9hmVrmWvm7r56zK051qiqoFkbCfoidQH6366fbuJ TN9+x7dOS/I0wZzIvczBYQ8N/9fK3ZGO2ezUN6gpbs2el9uLjxZFQZ9ivcBx0/3v5dT1/N bZTn+uJE/Qmk/Oe8ozLT0bxkzWmsbN624MT6PRFKSksHWp+QX0gy4UvhOVumAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987029; a=rsa-sha256; cv=none; b=nbr6T31tGUDdZixXIetM3dYkSFMra3mvqXg6XQIivoS/60EF1L12sIDDxIKioMAwKA8P+x NsgHqPC/fUaKLUOMTa73Q/ThdY4hhJ0YdXChwuYoFf5S0EsUxTb0P97ZLPEV0I1NS6/EUB zRSWwmsPHWuXIZcj4gNfqO2nX6nysS3J6KzMMwp9YFun7mw4V6jjyC6UsNpLHU7jhYf0zX DwvLes7STbC8RZ8LKwy7fRrRT8eEU1poay5vEP7PacoisMWKTcken3b9pcO+NMrijXDJ16 xK7HjfhrGExChumiDzEe3u0P35Sgn+3R2g067F2T+hQHyp/umokl1ocn7XKuAw== 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=1722987029; 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=NL/u5B/lqaQQgEPDkQEkqaoN7benN/pglHxjMtH4AM8=; b=tNGdmIw7Pbn1BAxpXq2yIVZcYba2oXUh5+qTZt9/RzolzkLkgtncnP68hFdwgiVUlRg+ha VDK4kRHYX9XyYWD4WxZa+kvxbJ45fhh6fzA2XYVtP4YZSkryGv4uhE+nNyRBUmrf1Eh2au AYKAdLaNxPSM+ZicRcYBprh4XgdYZ7ARW/WelQHL1cZnRQVpC+5wTFoGpe2VoCH4GR2OHs MQbtnLnseeftsAKhuB6MjwK5dN168UOnrGGLXXCzBbi09Hm9qojETedA7GhLwbKl3qgaCK 8ss1Okkmcv4AXp1UFLXMIJ42C1K9Byhgbo8JIqmWbSORh6SUFRVd/fxXiQKv6Q== 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 4WdqKx0dYlzRht; Tue, 6 Aug 2024 23:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 476NUS24080834; Tue, 6 Aug 2024 23:30:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476NUSJl080831; Tue, 6 Aug 2024 23:30:28 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:30:28 GMT Message-Id: <202408062330.476NUSJl080831@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: 20d35d581785 - main - loader: Add WITH/WITHOUT_LOADER_PXEBOOT build option 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: 20d35d5817851df3a6d20e75df2e14a192b94940 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=20d35d5817851df3a6d20e75df2e14a192b94940 commit 20d35d5817851df3a6d20e75df2e14a192b94940 Author: Warner Losh AuthorDate: 2024-08-05 21:19:21 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:22:36 +0000 loader: Add WITH/WITHOUT_LOADER_PXEBOOT build option 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 --- share/mk/src.opts.mk | 1 + stand/i386/Makefile | 2 +- tools/build/options/WITHOUT_LOADER_PXEBOOT | 10 ++++++++++ tools/build/options/WITH_LOADER_PXEBOOT | 25 +++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index d7e246d10396..c10598246639 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -130,6 +130,7 @@ __DEFAULT_YES_OPTIONS = \ LOADER_KBOOT \ LOADER_LUA \ LOADER_OFW \ + LOADER_PXEBOOT \ LOADER_UBOOT \ LOCALES \ LOCATE \ diff --git a/stand/i386/Makefile b/stand/i386/Makefile index a08e956ef4f9..f9aedcc3a008 100644 --- a/stand/i386/Makefile +++ b/stand/i386/Makefile @@ -16,7 +16,7 @@ SUBDIR.${MK_LOADER_LUA}+= loader_lua SUBDIR.yes+= loader_simp # special boot programs, 'self-extracting boot2+loader' -SUBDIR.yes+= pxeldr +SUBDIR.${MK_LOADER_PXEBOOT}+= pxeldr SUBDIR.${MK_LOADER_ZFS}+= zfsboot gptzfsboot diff --git a/tools/build/options/WITHOUT_LOADER_PXEBOOT b/tools/build/options/WITHOUT_LOADER_PXEBOOT new file mode 100644 index 000000000000..e6b09381884e --- /dev/null +++ b/tools/build/options/WITHOUT_LOADER_PXEBOOT @@ -0,0 +1,10 @@ +Do not build pxeboot on i386/amd64. +When the pxeboot is too large, or unneeded, it may be disabled with this option. +See +.Va WITH_LOADER_PXEBOOT +for how to adjust the defaults when you need both a larger +.Pa /boot/loader +and +.Pa /boot/pxeboot +.Pp +This option only has an effect on x86. diff --git a/tools/build/options/WITH_LOADER_PXEBOOT b/tools/build/options/WITH_LOADER_PXEBOOT new file mode 100644 index 000000000000..01d4a0b86a66 --- /dev/null +++ b/tools/build/options/WITH_LOADER_PXEBOOT @@ -0,0 +1,25 @@ +Build pxeboot on i386/amd64. +The PXE Boot loader package needs more space than we may have in the boot loader. +If you need to increase +.Va LOADERSIZE +beyond 500000, then building +.Xr pxeboot 8 +will fail. +To allow a larger +.Va LOADERSIZE +for some environments, it may be necessary to disable pxeboot builds or adjust +its defaults. +You can set the default loader for pxeboot to use independently of the system +default by setting +.Va PXEBOOT_DEFAULT_INTERP +to one of +.Dq lua , +.Dq 4th , +or +.Dq simp . +The limit on the size of the loader used for +.Xr pxeboot 8 +can be set independently with +.Va PXEBOOTSIZE . +.Pp +This option only has an effect on x86.