From nobody Tue Aug 13 17:31:40 2024 X-Original-To: dev-commits-src-branches@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 4Wjz2j2t48z5T613; Tue, 13 Aug 2024 17:31:41 +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 4Wjz2h319Dz4ZFR; Tue, 13 Aug 2024 17:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723570300; 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=47ypGrWThteSTOXGfWToXoKv9Qtflf+jG9gSzdDF/0E=; b=LrmqO64zmv2r5EizIHYF+fVE078meXzvagZ5tlT0BSjkLOx9vma88lLOm0eLgytU1vZV0C +wzFfPpKcOz2QbYqS1vIkudfdQ4DTZ6BA7pMI3f0S2hkBj7lIAHAfbz70ooiUW9WXtAjAo 1AB2m9oRrvZVLY5PsdOTZ2fK0p4l/hOxyRxAcbxWKwtCWDrlW/HcBg3gHhWJwCLOqFZkE6 JWX7fPQPIfvvjK80tqpF7jVPF5XiYilRdktRE7s9+2zNrH6pOfom3zyQM1u2gEP9XlClLX LGH5DvxuroKDqA3zbdT6OuT+fax7W/i4rvauJtk+hZ3FRAkbq92kSM245Qu27A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723570300; a=rsa-sha256; cv=none; b=WwX5SFZcndxu0MzcfedJ8MlHEE1pGcXuElyCkcDpBTdexGOWRH4ytVFqhC9mMwtT7LTfbE o/S7KKyKbrBuBlbgjjWRLohgfSquj5KdDbqEbUoQxMAk1MyPb0elkITJCnj6TxT0GQqKMP gyM1BX0hDJOciV0YueKV/xxhAomsWn4IzJwQYvcUCcZnsuGYgVZPney9CwzXUlOjL2GCow MblJmh77z2O5k2DX1w0IMtiCBHBvxs/dpqxHaN0hRhGXPDHDAhaM2GkNaIRRo94OBvaFl7 H+mhNkhSmLLPOTqFq95yvZDEaAGkzXKqEh2DW91vEcg3qXvCTnjyoWtP3iAxWA== 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=1723570300; 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=47ypGrWThteSTOXGfWToXoKv9Qtflf+jG9gSzdDF/0E=; b=AtYAxzX0NHThmKbhtrb7sQirHTDvHd4sC2Q92agw/VR2ZNteNw1ResMh6exR+KJpz7vx/2 213u2tmzUX8QrXDp+VYXxlpJoWvYjZXq1DIcssS1H39T/QqfanZL6M1Jb9f/cPP+C+PEFJ BEFJLjGBafRSLP6doyV7Wkz5nYFyKAnGm3THF4nt2EKmbuGkOueXdw4OiRLcAGSQBXnQJ+ l4+4GlB3ZgfBAoTKppfAw9GltWRgr9f5aGN4KV/Cf3Rkr1fuWEQ/YnJh/mCfonFc5y5l/3 Bewj1dUc4zhJ+NJExtLK3umdjczGWWH+bH1K9Gb/3/lL257gB+LO2qckMDjPsg== 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 4Wjz2h2ZzZzKP6; Tue, 13 Aug 2024 17:31:40 +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 47DHVegh051033; Tue, 13 Aug 2024 17:31:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47DHVex3051030; Tue, 13 Aug 2024 17:31:40 GMT (envelope-from git) Date: Tue, 13 Aug 2024 17:31:40 GMT Message-Id: <202408131731.47DHVex3051030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e179ee000ef2 - stable/14 - loader: Add WITH/WITHOUT_LOADER_PXEBOOT build option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e179ee000ef2731a7baa6edc32ed8bfcca751f8b Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e179ee000ef2731a7baa6edc32ed8bfcca751f8b commit e179ee000ef2731a7baa6edc32ed8bfcca751f8b Author: Warner Losh AuthorDate: 2024-08-05 21:19:21 +0000 Commit: Warner Losh CommitDate: 2024-08-13 17:31:38 +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 (cherry picked from commit 20d35d5817851df3a6d20e75df2e14a192b94940) --- 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 788c6a9b956f..3ff71df3e0da 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -132,6 +132,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 883cd4a556bb..5e52b1e12c30 100644 --- a/stand/i386/Makefile +++ b/stand/i386/Makefile @@ -17,7 +17,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.