Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4DBBC6FD1C for ; Fri, 24 Mar 2023 20:58:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06F1185D4A; Fri, 24 Mar 2023 21:58:36 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="O4CFEx1z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CCDC785DA9; Fri, 24 Mar 2023 21:58:32 +0100 (CET) Received: from mail-yb1-xb36.google.com (mail-yb1-xb36.google.com [IPv6:2607:f8b0:4864:20::b36]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 04A9C859F1 for ; Fri, 24 Mar 2023 21:58:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb36.google.com with SMTP id p15so3792272ybl.9 for ; Fri, 24 Mar 2023 13:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1679691508; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YV40+ZsdcCsFvrVdnmYv5QlHndDoxNmawttn5UuVXTY=; b=O4CFEx1zhlzkcawrwiydH3m7bhRaovVyShdyBJjjsRLy2x8NESTeF8shECo8Mz7G/H c3TXbxOhwKaUhuRupV2Poaq04+miQNqM/+0LVJGdNPM4UpWvQ0GkLNkA4rEQQXcRk/KF 9Ew1gI7MkNQNfpBmgdpSFmPNuCluvLdPC/i64= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679691508; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YV40+ZsdcCsFvrVdnmYv5QlHndDoxNmawttn5UuVXTY=; b=eTHDZK3ESb3BU6pBheVvqvzrOqkbSGcrRUrCOWUbK++LbU8fTD0CKVzvoLPZBX51pU MZ4GMB/SmnGA4xgg3lrmEAHGhvMseYYGXEC1SZz3N6ucRfI2WUKyHGhC6ox9gzryVEWw EcdCzf7dpI37WU+z2Ux1Oojse/jRCjJiKLZwAzGuJgyVGFoVsON0o5gCSvwWTF4cA3CJ p7YPTB7c0L+u5lp5rWUVW69AT8JqGWBEwduRqlnj1lO0lpmPWArIG17cbaVR9lql3P06 DOFiCXYk5FchwrmUCj6CGwjvMNB3TCgyqllHeDz6f55JK6Vw049E9aucTUmNFPpJTAo8 22ZQ== X-Gm-Message-State: AAQBX9ecdGIvLmCZhJS/VeKnhXEISnMpWliwDqF4e2x7lF2EyaPzI3WL KjlxKwX63nlQWJ74zNydRIPxHDFmHCYHKSA2mOU7VA== X-Google-Smtp-Source: AKy350Y/ZYC2qwWMXlls0fxVs7HiNz+hE4ywRD9MkQBSxjlk+pxDuAsVcSfH2pLbOT8qaBIxY8GQyw== X-Received: by 2002:a05:6902:1543:b0:b44:1a6:6ccb with SMTP id r3-20020a056902154300b00b4401a66ccbmr4807591ybu.3.1679691508456; Fri, 24 Mar 2023 13:58:28 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b00-6400-523d-0f3b-e0c2-6594.res6.spectrum.com. [2603:6081:7b00:6400:523d:f3b:e0c2:6594]) by smtp.gmail.com with ESMTPSA id j83-20020a252356000000b00b7767ca7469sm680446ybj.6.2023.03.24.13.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 13:58:28 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 4/7] boot: Create a common BOOT_DEFAULTS for distro and bootstd Date: Fri, 24 Mar 2023 16:58:13 -0400 Message-Id: <20230324205816.2035181-5-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230324205816.2035181-1-trini@konsulko.com> References: <20230324205816.2035181-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass These two features use a lot of common options. Move them into a common CONFIG to reduce duplication. Use 'select' for most options since these are things that boards aren't supposed to override. For now it is not possible to disable BOOT_DEFAULTS but we may take another look later. Note that five options use 'imply' to match existing behaviour. Signed-off-by: Simon Glass [trini: Rework a bit so we don't grow so many platforms unintentionally] Signed-off-by: Tom Rini --- Changes in v4: - Reword the commit message - Rework the logic so that build-wise, nothing changes. --- boot/Kconfig | 62 ++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index 8fa3181d7e23..ad035695a4a3 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -350,6 +350,32 @@ config PXE_UTILS help Utilities for parsing PXE file formats. +config BOOT_DEFAULTS + bool # Common defaults for standard boot and distroboot + imply USE_BOOTCOMMAND + select CMD_ENV_EXISTS + select CMD_EXT2 + select CMD_EXT4 + select CMD_FAT + select CMD_FS_GENERIC + select CMD_PART if PARTITIONS + select CMD_DHCP if CMD_NET + select CMD_PING if CMD_NET + select CMD_PXE if CMD_NET + select SUPPORT_RAW_INITRD + select ENV_VARS_UBOOT_CONFIG + select CMD_BOOTI if ARM64 + select CMD_BOOTZ if ARM && !ARM64 + imply CMD_MII if NET + imply USB_STORAGE + imply EFI_PARTITION + imply ISO_PARTITION + help + These are not required but are commonly needed to support a good + selection of booting methods. Enable this to improve the capability + of U-Boot to boot various images. Currently much functionality is + tied to enabling the command that exercises it. + config BOOTSTD bool "Standard boot support" default y @@ -410,24 +436,7 @@ config BOOTSTD_DEFAULTS bool "Select some common defaults for standard boot" depends on BOOTSTD imply USE_BOOTCOMMAND - # Bring in some defaults which are generally needed. Boards can drop - # these as needed to save code space. Bootstd does not generally require - # the commands themselves to be enabled, but this is how some of the - # functionality is controlled at present - imply CMD_EXT2 - imply CMD_EXT4 - imply CMD_FAT - imply CMD_FS_GENERIC - imply CMD_PART - imply CMD_DHCP if NET - imply CMD_MII if NET - imply CMD_PING if NET - imply CMD_PXE if NET - imply USB_STORAGE - imply SUPPORT_RAW_INITRD - imply ENV_VARS_UBOOT_CONFIG - imply EFI_PARTITION - imply ISO_PARTITION + select BOOT_DEFAULTS help These are not required but are commonly needed to support a good selection of booting methods. Enable this to improve the capability @@ -823,27 +832,12 @@ endmenu # Boot images config DISTRO_DEFAULTS bool "Select defaults suitable for booting general purpose Linux distributions" + select BOOT_DEFAULTS select AUTO_COMPLETE select CMDLINE_EDITING - select CMD_BOOTI if ARM64 - select CMD_BOOTZ if ARM && !ARM64 - select CMD_DHCP if CMD_NET - select CMD_ENV_EXISTS - select CMD_EXT2 - select CMD_EXT4 - select CMD_FAT - select CMD_FS_GENERIC - select CMD_PART if PARTITIONS - select CMD_PING if CMD_NET - select CMD_PXE if NET select CMD_SYSBOOT - select ENV_VARS_UBOOT_CONFIG select HUSH_PARSER - select SUPPORT_RAW_INITRD select SYS_LONGHELP - imply CMD_MII if NET - imply USB_STORAGE - imply USE_BOOTCOMMAND help Select this to enable various options and commands which are suitable for building u-boot for booting general purpose Linux distributions. -- 2.34.1