From patchwork Fri Oct 21 00:22:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1692750 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=j/myr65j; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MtlbG6FV2z23kD for ; Fri, 21 Oct 2022 11:24:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 833DA84FE7; Fri, 21 Oct 2022 02:24:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="j/myr65j"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FF6084FE1; Fri, 21 Oct 2022 02:23:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 C6F7E84FD0 for ; Fri, 21 Oct 2022 02:23:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12c.google.com with SMTP id u2so825417ilv.6 for ; Thu, 20 Oct 2022 17:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; 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=NZc0/TTS3M8R0HgiCoqMAv3wTCN2gblgznOQjRIEgV4=; b=j/myr65jujzElSL0cq8Z8pZ3gaKoqDPo3ROX7pJK073NDrsh+yElB1QtsKBQ+uJZSd 4I5fVBOUuqjR+NZQH17kZEuEaqfqniJLhbNp3RP5s8ZqST4teTVsQyqymmGP4ya+V2Cm OJshARxlgG1rdxZr4stQ/b44NHJp+CN3c8z+U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=NZc0/TTS3M8R0HgiCoqMAv3wTCN2gblgznOQjRIEgV4=; b=rXazxSlRaLx+mgT3uIUvFQEb8ED7rsH3bIdo/BgZmts92SCZ7+acT8AT/Z6L4yMRnr VH7sLaGNDCMz+aAD/W3LYlp4yVR+U8Qo40+cncOr0skqK1jmpIUrbUC0aA6V8ltz4MSN 3wpk9HJjgKTDndsESboYb4zXkqsy2SvSeHNJLUsbAvCNxqbx+lvn2SRJV92sAGb/iSD2 /+x8Ba0IZuIG1Sw23SQzS0HHnKnZuDE711YECONfyVbCuL0f8OMAWhIqHTulxJq2dt7q w1m3TuU9qcCR9SNAfigYxMfPmH9LYmwM8OSKvEQDBfn3MXq5hqIjwZF1rbYEoQW8WEIK yTPw== X-Gm-Message-State: ACrzQf2nfVEY0styNYYbASXqQ+DQKdkCHlBPj+pXNQKVhTWfcUblZ72t Q9gsScQxmqc64AReEU2Ii3Pyo80oZpbV9A== X-Google-Smtp-Source: AMsMyM4Q0TbIPqomu8Bgz5aXzyqYxtpQNAUx3wCirQQbDPDojWhZdDxpY7H7Z/Gc5ShZnwt3zwR6xA== X-Received: by 2002:a05:6e02:1a2d:b0:2fc:1387:c076 with SMTP id g13-20020a056e021a2d00b002fc1387c076mr12075941ile.17.1666311822131; Thu, 20 Oct 2022 17:23:42 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id f8-20020a02a108000000b00356738a2aa2sm3646131jag.55.2022.10.20.17.23.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 17:23:41 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v3 06/43] spl: Add a separate silence option for SPL Date: Thu, 20 Oct 2022 18:22:43 -0600 Message-Id: <20221021002320.1169603-7-sjg@chromium.org> X-Mailer: git-send-email 2.38.0.135.g90850a2211-goog In-Reply-To: <20221021002320.1169603-1-sjg@chromium.org> References: <20221021002320.1169603-1-sjg@chromium.org> MIME-Version: 1.0 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.6 at phobos.denx.de X-Virus-Status: Clean Add an option to allow silent console to be controlled separately in SPL, so that boot progress can be shown. Disable it by default for sandbox since it is useful to see what is going on there. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Refactor based on a change to the earlier patch in spl.c common/Kconfig | 22 ++++++++++++++++++++++ common/spl/spl.c | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/common/Kconfig b/common/Kconfig index 6608a4f0fc1..5926645b3c3 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -113,6 +113,28 @@ config SILENT_CONSOLE GD_FLG_SILENT flag is set. Changing the environment variable later will update the flag. +config SPL_SILENT_CONSOLE + bool "Use a silent console in SPL" + default y if SILENT_CONSOLE && !SANDBOX + help + This selects a silent console in SPL. When enabled it drops some + output messages. The GD_FLG_SILENT flag is not used in SPL so there + is no run-time control of console messages in SPL. + + Future work may allow the SPL console to be silenced completely using + this option. + +config TPL_SILENT_CONSOLE + bool "Use a silent console in TPL" + default y if SILENT_CONSOLE && !SANDBOX + help + This selects a silent console in TPL. When enabled it drops some + output messages. The GD_FLG_SILENT flag is not used in TPL so there + is no run-time control of console messages in TPL. + + Future work may allow the TPL console to be silenced completely using + this option. + config SILENT_U_BOOT_ONLY bool "Only silence the U-Boot console" depends on SILENT_CONSOLE diff --git a/common/spl/spl.c b/common/spl/spl.c index 91b4adc4004..4635e77e979 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -703,7 +703,7 @@ static int boot_from_devices(struct spl_image_info *spl_image, if (CONFIG_IS_ENABLED(SHOW_ERRORS)) ret = -ENXIO; loader = spl_ll_find_loader(bootdev); - if (!IS_ENABLED(CONFIG_SILENT_CONSOLE)) { + if (!CONFIG_IS_ENABLED(SILENT_CONSOLE)) { if (loader) printf("Trying to boot from %s\n", spl_loader_name(loader));