From patchwork Thu Oct 19 15:00:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851836 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=Xs1Gi4P8; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9sB0RbCz23jP for ; Fri, 20 Oct 2023 02:01:15 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 50A598724A; Thu, 19 Oct 2023 17:01:12 +0200 (CEST) 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="Xs1Gi4P8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1B2018727A; Thu, 19 Oct 2023 17:01:11 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) (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 CBF5387024 for ; Thu, 19 Oct 2023 17:01:08 +0200 (CEST) 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-yw1-x1135.google.com with SMTP id 00721157ae682-5a877e0f0d8so7547467b3.1 for ; Thu, 19 Oct 2023 08:01:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727667; x=1698332467; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RalyHvOpSTaSDh7eHoFDxTrv8FyCZQW30j6njiQM7JI=; b=Xs1Gi4P88ZxuvrM+K0Rn+ipsKoCidllwufNRFoOg+u2H+WSCe3Q9kqwEie7uKuF75Z Xmkfu/W0DhVdkO/YCedLsIqO+D1nwQH+2tfQoS99owVI0CWDd2JJdeTVaZea83VdX/3v 3r700ELrJmiVtfThH4mDuIXQpWW7bIEGZY/dc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727667; x=1698332467; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RalyHvOpSTaSDh7eHoFDxTrv8FyCZQW30j6njiQM7JI=; b=nNfjI3z2W1Jb3aCQrer8hlAf5FTvVzb4cBLY1LwUxp+wFTeC7uFay7u2Wn4zDYVT5U /Xg+hArF/+yfaLYh3RGItHEWkKQoQVqmJ/1Mvj1qByJlgoHdmhs/BpHUDbCmDMP6tIhV d8lYCf4n6NtaC9RbAsx3jncf4y1SogmXt0ZegBlg0xqeO/xAVclzQpEMGw4Goew2Ktvn OZ0mzo+BKDgqdYQ2Xjnx9QanBocoV+8a8WcIBJhnMro6At2k0iGiNPtb17zfL51e5ZP+ PIH1KxTz5pWo8UGW7He2wOwn1kiZbFovtMIlYSRyGR97zp/khrU6ji4Ari3/Xvckr1az vvBw== X-Gm-Message-State: AOJu0Yx0KWadcvQfeVPdS3MxPtuSg3HXtXcgCBI/g99cMw2vK5Z6cirE kpMCH3OsKgKVZeeNPGQN9Ux7ptaAHtqDIuAKyTmuQg== X-Google-Smtp-Source: AGHT+IEDjF1Yk+1l7djcQdEUzJQcn3h4D7U5G+5uMIwQIwpFtKRz3Rn1JQjrzOvnhdenfu8XnOLJfg== X-Received: by 2002:a81:9293:0:b0:5a7:dac8:2fa with SMTP id j141-20020a819293000000b005a7dac802famr1674125ywg.24.1697727666770; Thu, 19 Oct 2023 08:01:06 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:06 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 01/24] buildman: Use oldconfig when adjusting the config Date: Thu, 19 Oct 2023 11:00:42 -0400 Message-Id: <20231019150105.714407-1-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass We cannot be sure that the new config is consistent, particularly when changing a major item like CONFIG_CMDLINE. Use 'make oldconfig' to check that and avoid any such problems. Signed-off-by: Simon Glass --- tools/buildman/builder.py | 2 +- tools/buildman/builderthread.py | 6 ++++++ tools/buildman/func_test.py | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index 5305477c5be6..782e59dd5cca 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -476,7 +476,7 @@ class Builder: Args: commit: Commit object that is being built brd: Board object that is being built - stage: Stage that we are at (mrproper, config, build) + stage: Stage that we are at (mrproper, config, oldconfig, build) cwd: Directory where make should be run args: Arguments to pass to make kwargs: Arguments to pass to command.run_pipe() diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index 6a61f64da1d4..a8599c0bb2a8 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -426,6 +426,12 @@ class BuilderThread(threading.Thread): # Now do the build, if everything looks OK if result.return_code == 0: + if adjust_cfg: + oldc_args = list(args) + ['oldconfig'] + oldc_result = self.make(commit, brd, 'oldconfig', cwd, + *oldc_args, env=env) + if oldc_result.return_code: + return oldc_result result = self._build(commit, brd, cwd, args, env, cmd_list, config_only) if adjust_cfg: diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py index 55dd494fe8ee..6b88ed815d65 100644 --- a/tools/buildman/func_test.py +++ b/tools/buildman/func_test.py @@ -439,6 +439,8 @@ class TestFunctional(unittest.TestCase): tools.write_file(fname, b'CONFIG_SOMETHING=1') return command.CommandResult(return_code=0, combined='Test configuration complete') + elif stage == 'oldconfig': + return command.CommandResult(return_code=0) elif stage == 'build': stderr = '' fname = os.path.join(cwd or '', out_dir, 'u-boot') @@ -461,7 +463,7 @@ Some images are invalid''' return command.CommandResult(return_code=0) # Not handled, so abort - print('make', stage) + print('_HandleMake failure: make', stage) sys.exit(1) # Example function to print output lines From patchwork Thu Oct 19 15:00:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851837 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=sp4sr4oz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9sN4DmVz23jP for ; Fri, 20 Oct 2023 02:01:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A13F887444; Thu, 19 Oct 2023 17:01:15 +0200 (CEST) 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="sp4sr4oz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C11AB8727A; Thu, 19 Oct 2023 17:01:11 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) (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 0F0F58707C for ; Thu, 19 Oct 2023 17:01:09 +0200 (CEST) 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-yw1-x1136.google.com with SMTP id 00721157ae682-5a877e0f0d8so7547537b3.1 for ; Thu, 19 Oct 2023 08:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727667; x=1698332467; darn=lists.denx.de; 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=HvxVRkR6NivE5Eyk59BtqOomOa8WJZlAhFpqDjJITTA=; b=sp4sr4ozXAPJ0SHAeFenChwv6UnnzpJ/LnbhAbGNW3XRjw+1Ubp0OIee7K3nnzTExR cDTGFH6YuLXiE5p2vD7qh8eHWgos8l8wpHpTkUKMZrYDQieaxrWqyXPiyB+vTzKjfaJj aYwZHQ8epQCSNyM3gNqGlhxGoupp+GsgjJTmg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727667; x=1698332467; 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=HvxVRkR6NivE5Eyk59BtqOomOa8WJZlAhFpqDjJITTA=; b=wy5aVO+6mg70FhTPvjkRYHVNDfR/nydJb7AqHnBA3bgODlBoA5H55Fe9cqHtXHUwwB +rLkDrzVBaItp/EDe/iUzhfYQbDHsURnXG6Tpy3EGRHxSR8W4LeMM0WevDYwjnvh1/Qw UJ+/nypDXhWYvoaj3Mp2yRsJTr+/lpxB12CqWlbU3khA9saoS13IV/V5gTGgxjGdGe1y ktBqF3DqJsPBWf7LaBDn7P2tsF4Z4brfCSqhshqO5zkCyGrxIUJOwuHM0ynSaz/i6A9z ejffbQy3s9uHfkeM8gWOAJ3aAoN2l3cFBZHzppKZu9Jr79lORykcHHaLSwT7pTC6dDBt gUyQ== X-Gm-Message-State: AOJu0Yxt6dlQ3e7CDttt24ET7jafTa+SQocBCxbpU3C22QZL7/slzV1I BOVWdxrBcpB0bHx4YHygqz6eX8DHBIQSdsmmYDuo1A== X-Google-Smtp-Source: AGHT+IEU+DAij2XQClQKpZSFDAhnxoWgaAUAkO5fH/t1rZwc5fA2BjJnSjbjAq5yxjKy2lG8uNkREQ== X-Received: by 2002:a81:48c9:0:b0:5a7:af51:fa39 with SMTP id v192-20020a8148c9000000b005a7af51fa39mr1597573ywa.8.1697727667422; Thu, 19 Oct 2023 08:01:07 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:07 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Bin Meng Subject: [v4 02/24] virtio: Make VIRTIO_NET depend on NETDEVICES Date: Thu, 19 Oct 2023 11:00:43 -0400 Message-Id: <20231019150105.714407-2-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean As VIRTIO_NET is the symbol for enabling network devices, make this depend on NETDEVICES Signed-off-by: Tom Rini --- Cc: Bin Meng --- drivers/virtio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 852f6735b602..1de68867d52e 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -56,7 +56,7 @@ config VIRTIO_SANDBOX config VIRTIO_NET bool "virtio net driver" - depends on VIRTIO + depends on VIRTIO && NETDEVICES help This is the virtual net driver for virtio. It can be used with QEMU based targets. From patchwork Thu Oct 19 15:00:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851838 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=eXJcE92K; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9sc4r9Sz23jP for ; Fri, 20 Oct 2023 02:01:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 398178744E; Thu, 19 Oct 2023 17:01:17 +0200 (CEST) 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="eXJcE92K"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D9F5E87436; Thu, 19 Oct 2023 17:01:12 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) (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 010D587259 for ; Thu, 19 Oct 2023 17:01:09 +0200 (CEST) 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-yw1-x1133.google.com with SMTP id 00721157ae682-5a7af52ee31so98545137b3.2 for ; Thu, 19 Oct 2023 08:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727668; x=1698332468; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MjA5r6OateBSE2unsZ/rZ6JI0fN4mt9QeKnejMnUv7U=; b=eXJcE92KFUJaba/S4ArpokvxDoe3tYKArppdxCWNwxbIN8ceTynSrKvkoHNPQpxQl0 tD43cT1Kee9X8dRRP0nYJxUAXsPziCSGfaABO2Q96M046fng5o1ozwWWtThuj0dtcxyU mu4M7/Z6TjCDFknlcdnjTQy07d7gy6QPE80gg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727668; x=1698332468; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MjA5r6OateBSE2unsZ/rZ6JI0fN4mt9QeKnejMnUv7U=; b=esq4eaXMm6My7rVkJkhKKVUpJMVr94bhSeWXpDbBCkaKqzxAa5P9d96VDDH2DqOLRd /Y466iGoJJdJv6M4HpUAsdVrLE/q3DjTF2cfhOVEosBXekltGf/ZSgBECtkPrlT6yelr ksm8NWUZH/8LJcNCLayni9ZhREk19eh2L3GDctPukpQaVJ5snD1rLuuEVUBsXd02nk7T Yugpx+71TQA48/9MpQBrWhtHOaVP1CUSf9HSEb24If6F8yS2yLUzmJSFXhZfN1Fc8VQ7 ora7PtnUvu+QavtWH8ENVSqYy05zjIHVJFcf32DZl6jW6nM0LrFo7CHZriN8fW31pQo4 e7yA== X-Gm-Message-State: AOJu0YxjJhPmugjEhp+qyNuikKumPkGOBzq1LuNhQ95n9Lf16fYg/XTn hzu+AsqZt7gHL8qzsvPNYb29nngxSx+0SpfxowAdrg== X-Google-Smtp-Source: AGHT+IGPfSPlbZ2KpBFRweXuA/yGTydV1HCz2heGrRKMMiXxKNQKngwkjz/X0pV+2gUisnZchri0Lw== X-Received: by 2002:a0d:d694:0:b0:5a7:afcc:80fe with SMTP id y142-20020a0dd694000000b005a7afcc80femr2948860ywd.3.1697727668319; Thu, 19 Oct 2023 08:01:08 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:07 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 03/24] dfu: Make DFU_TFTP depend on NETDEVICES Date: Thu, 19 Oct 2023 11:00:44 -0400 Message-Id: <20231019150105.714407-3-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean In order to do a DFU update over TFTP we need to have some network device available, so make this depend on NETDEVICES Signed-off-by: Tom Rini --- drivers/dfu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index 4e80e85d10d7..8771678ca5a0 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -19,6 +19,7 @@ config DFU_WRITE_ALT config DFU_TFTP bool "DFU via TFTP" + depends on NETDEVICES select UPDATE_COMMON select DFU_OVER_TFTP help From patchwork Thu Oct 19 15:00:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851839 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=gxfX4eHr; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9t00QZbz23jP for ; Fri, 20 Oct 2023 02:02:00 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9042B87456; Thu, 19 Oct 2023 17:01:17 +0200 (CEST) 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="gxfX4eHr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CE4B98743C; Thu, 19 Oct 2023 17:01:15 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (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 7F43787024 for ; Thu, 19 Oct 2023 17:01:11 +0200 (CEST) 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-yw1-x1131.google.com with SMTP id 00721157ae682-59e88a28b98so7909987b3.1 for ; Thu, 19 Oct 2023 08:01:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727670; x=1698332470; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Jz7w//TNvavXWX8aDCeodqapv8f4L9MNIU3pvpvBON4=; b=gxfX4eHrk8X59j0hnQmjqd4GQuB6xVtVg2wntnORhDJMhjexfn33yPSqiaA9h98bK6 LGXH49pmdwkUCFFM/s0zus4rDHchOM71hE8Bo5ywxLVHGtDTlHKl2H/9ZBXquHjySsug +qklcAk0EgZ3zqjaQ5flDx6y7bPrclan4IZIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727670; x=1698332470; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jz7w//TNvavXWX8aDCeodqapv8f4L9MNIU3pvpvBON4=; b=XiqlDH61UHVL+zHmjtMyPZBtryMgnyt/jQCV0AqcP/Vjz2k7MCNYqyabDISiA6YRgh VimEkRLR+bp9DF0tMiWRQvHyeNpJ1uTqd7Un0Wk+bfzRjsTer7I9TZjDVH6PE7xVYQ3K Fq7Znw6iAus2O9XlmzcrBJo2w453lkW6VEhZEi1LtucbXWFbV7KiHLBMQy9m79BwwjuG 7IYPyhibHChMUWccwqFWFJW1Ne92qgtJEw9GTxYS2THUQpwvnQQXE+pip+pt8W/OXNrQ 1oHCte6tK4aC3ABSzUFykluxaJeCmxeUjcuHO5gykLt5/rSb0P/9jPqibcnAAfunu8k4 laHA== X-Gm-Message-State: AOJu0YwpR0S59AGJdiqTiNjX4uTMxNXg7LQ4zqa+nszbXPRL9kNHkL7c 3RpEtKolgH8kGDGhZhxTWMnF3OdmG92NeGUP5yBtyg== X-Google-Smtp-Source: AGHT+IE2d4AJ17rX1G7KUHb10SAp5EDpO+ZGpMzkWgxV5AJ0VRNPXW7GfgrOYTS/st6awi1BPl4fiA== X-Received: by 2002:a81:6c92:0:b0:5a7:b545:dcaa with SMTP id h140-20020a816c92000000b005a7b545dcaamr1565494ywc.23.1697727669848; Thu, 19 Oct 2023 08:01:09 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:08 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 04/24] version: Separate our version string from the version command Date: Thu, 19 Oct 2023 11:00:45 -0400 Message-Id: <20231019150105.714407-4-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean In order to be able to disable all commands we need to construct our version string in a common file, and have the version command reference that string, like the other users of it do. Create common/version.c with just the strings. Signed-off-by: Tom Rini --- cmd/version.c | 9 --------- common/Makefile | 1 + common/version.c | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 common/version.c diff --git a/cmd/version.c b/cmd/version.c index 87e1fa4159c1..d99a44f19fb3 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -7,21 +7,12 @@ #include #include #include -#include -#include #include #include #ifdef CONFIG_SYS_COREBOOT #include #endif -#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ - U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING - -const char version_string[] = U_BOOT_VERSION_STRING; -const unsigned short version_num = U_BOOT_VERSION_NUM; -const unsigned char version_num_patch = U_BOOT_VERSION_NUM_PATCH; - static int do_version(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/common/Makefile b/common/Makefile index cdeadf72026c..b711dc29b65e 100644 --- a/common/Makefile +++ b/common/Makefile @@ -10,6 +10,7 @@ obj-y += main.o obj-y += exports.o obj-$(CONFIG_HUSH_PARSER) += cli_hush.o obj-$(CONFIG_AUTOBOOT) += autoboot.o +obj-y += version.o # # boards obj-y += board_f.o diff --git a/common/version.c b/common/version.c new file mode 100644 index 000000000000..6e27bb80e398 --- /dev/null +++ b/common/version.c @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#include +#include +#include + +#define U_BOOT_VERSION_STRING U_BOOT_VERSION " (" U_BOOT_DATE " - " \ + U_BOOT_TIME " " U_BOOT_TZ ")" CONFIG_IDENT_STRING + +const char version_string[] = U_BOOT_VERSION_STRING; +const unsigned short version_num = U_BOOT_VERSION_NUM; +const unsigned char version_num_patch = U_BOOT_VERSION_NUM_PATCH; From patchwork Thu Oct 19 15:00:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851840 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=iS59KS5g; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9t22V5Vz23jP for ; Fri, 20 Oct 2023 02:02:02 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A635E87442; Thu, 19 Oct 2023 17:01:18 +0200 (CEST) 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="iS59KS5g"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6AF5D87443; Thu, 19 Oct 2023 17:01:16 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (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 AC70B8729D for ; Thu, 19 Oct 2023 17:01:12 +0200 (CEST) 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-yw1-x112a.google.com with SMTP id 00721157ae682-5a7afd45199so101596047b3.0 for ; Thu, 19 Oct 2023 08:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727671; x=1698332471; darn=lists.denx.de; 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=MYtssAZZUagomFHU96+ovxneEAGKgf1H87+g5TJk/cU=; b=iS59KS5g1ZqziP6yysGXLLiFQxxBrojm4S80I1eEU4eVLjkGVZnSuSvN6bvfYQh4Y5 g45YqX7wQ0oEAY8bx/Nuy8YGla/EBrROviozymEwc+vegdATHg04U9/G8xc8qa60y9c4 /eRZvPqUUF2OVcihHN50Cz+HYM7M19WvbKjMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727671; x=1698332471; 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=MYtssAZZUagomFHU96+ovxneEAGKgf1H87+g5TJk/cU=; b=At7nT07A36Gc2L09g5qbwHTTkAylq4H2lmlZ9R2QRWfiiOHiSTOowKo2uzQ2G5zZ4o JAwOdCzk185J/w3sMbePMIg8OAlZPQI8BOAJX5RKBCZeoRGvRY6r4UBN3AF4OEyJGv2D tH69B7FLV//yMe9O4VBRU5qoUHf96wIJxgQ7ivWa7XfjB+jfv4fMppqqw4HJe/bbKq16 +V4O1Xger82Pz5tZErID6ORg2pELTwBKQ8N05/eYWitwLC3BUv1k5vRKCkesn+/CT/cx +BFZnqZAmThcDwBQ1glcUhP4GubAIT8ydIuA1H+aYa2Od4S2miHctpyoD7lCHY6Ai4TI pQfg== X-Gm-Message-State: AOJu0YyRTxVK+bETQkX88ZZB/+LHLorRRnSMI1/PH6WcY8O8tyJdn8Fk D1cPXXAGQ8W+rk8yBrR264LwSJZ3YnCbWjD83e7H1Q== X-Google-Smtp-Source: AGHT+IFhY+DUN+PISpHI6Ahm86JBUDJxy9qGbQrpiAZ+0YkmPnz+IqcIUnOcqsuf/7VbEQexEMaBeQ== X-Received: by 2002:a0d:cbd3:0:b0:5a7:b53f:c304 with SMTP id n202-20020a0dcbd3000000b005a7b53fc304mr2967876ywd.37.1697727670943; Thu, 19 Oct 2023 08:01:10 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:10 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Tuomas Tynkkynen , Bin Meng Subject: [v4 05/24] qemu: Correct CMD_QFW dependencies in Kconfig Date: Thu, 19 Oct 2023 11:00:46 -0400 Message-Id: <20231019150105.714407-5-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Rather than selecting CMD_QFW, we should make the option itself by enabled by default on these platforms. Then in the board-specific Kconfig we should select the appropriate back-end as needed if the command is enabled. Signed-off-by: Tom Rini --- Cc: Tuomas Tynkkynen Cc: Bin Meng --- board/emulation/qemu-arm/Kconfig | 3 +-- board/emulation/qemu-x86/Kconfig | 2 +- cmd/Kconfig | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/board/emulation/qemu-arm/Kconfig b/board/emulation/qemu-arm/Kconfig index 09c95413a541..ac2d078f42a1 100644 --- a/board/emulation/qemu-arm/Kconfig +++ b/board/emulation/qemu-arm/Kconfig @@ -5,8 +5,7 @@ config TEXT_BASE config BOARD_SPECIFIC_OPTIONS # dummy def_bool y - select CMD_QFW - select QFW_MMIO + select QFW_MMIO if CMD_QFW imply VIRTIO_MMIO imply VIRTIO_PCI imply VIRTIO_NET diff --git a/board/emulation/qemu-x86/Kconfig b/board/emulation/qemu-x86/Kconfig index 787751abba4f..01dc1d497aec 100644 --- a/board/emulation/qemu-x86/Kconfig +++ b/board/emulation/qemu-x86/Kconfig @@ -20,7 +20,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy def_bool y select X86_RESET_VECTOR select QEMU - select QFW_PIO + select QFW_PIO if CMD_QFW select BOARD_ROMSIZE_KB_1024 imply VIRTIO_PCI imply VIRTIO_NET diff --git a/cmd/Kconfig b/cmd/Kconfig index 5bc0a92d57ad..5554bd14e2ef 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2239,6 +2239,8 @@ config CMD_SYSBOOT config CMD_QFW bool "qfw" select QFW + default y if TARGET_QEMU_ARM_32BIT || TARGET_QEMU_ARM_64BIT || \ + TARGET_QEMU_X86 || TARGET_QEMU_X86_64 help This provides access to the QEMU firmware interface. The main feature is to allow easy loading of files passed to qemu-system From patchwork Thu Oct 19 15:00:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851841 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=uFUjXoAW; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9tG0xQfz23jP for ; Fri, 20 Oct 2023 02:02:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B82B48729D; Thu, 19 Oct 2023 17:01:22 +0200 (CEST) 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="uFUjXoAW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CD9408743F; Thu, 19 Oct 2023 17:01:17 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) (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 90F6D87436 for ; Thu, 19 Oct 2023 17:01:13 +0200 (CEST) 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-yw1-x1130.google.com with SMTP id 00721157ae682-5a81ab75f21so82745627b3.2 for ; Thu, 19 Oct 2023 08:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727672; x=1698332472; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gbpKLc3XWLredxJ3UkJbSTXt9FehQqh44IDXIeRCEQo=; b=uFUjXoAWsftxnewTDwHF8z4lrfdIZT+1UtBvRiQR4tfXf+Tkhsec1T89DDVVzNeBQX ld5/qlzQRIj49ZL7JICUGAUBkkPmeo4XUX5+gKnddmHdctLLPc6ZoCrCZIkB/yR8eSAd MbQJeip7Q0QQOSN09+9FL/1wmkW6hC+AHq3dg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727672; x=1698332472; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gbpKLc3XWLredxJ3UkJbSTXt9FehQqh44IDXIeRCEQo=; b=MpZXrAgIwG1pUvgly+vn38dBzFh3IRVQFcS8ZbyoMrV9QxWUnAN/Lzkeh/PDlW0KS0 DLNMH9unccALyASTRnCBsbzbIciPGeEGhjgfDBw5watS/cqfv6VcvV0SXqcXyf0WP4tm TnaaeAj/Ff+a+Es5xVrks6tx1CTF8DCc/l3kjzPlMNCla4qELFdC+mmeYpGTuLSKZ+yW nN1hiqCNCIpzwv3svvaYQB/LCdjufE2AXqwSWiRwBsUhl2qYXC6rGZqRDIaEI8r1DUIi TrttUknYAdAQ/bYfYHzvj4ghQFVUEQ14jlgPz+q2JEPk3O69mye0P2YeJcpxY5br6VhZ bHXA== X-Gm-Message-State: AOJu0YyRK++FNxPSNXjAs8LNTBrQWE2Zzfb4J8ND+6QNojQnRrCsqkfU Lu1/wbudgd/naPmo+3PMgJrRw+SK0X9mOf9xgTcG7w== X-Google-Smtp-Source: AGHT+IGgrwPS/hM+QrNNfKSuooDI2ku+WZE5tKlsZjKOukyuCzBgzkEF5PHLGmfN2Do6u+Q+rwlV2Q== X-Received: by 2002:a05:690c:90:b0:5a8:22b5:399c with SMTP id be16-20020a05690c009000b005a822b5399cmr2751937ywb.24.1697727671643; Thu, 19 Oct 2023 08:01:11 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:11 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 06/24] Kconfig: Move CONFIG_SYS_[CP]BSIZE to common/Kconfig Date: Thu, 19 Oct 2023 11:00:47 -0400 Message-Id: <20231019150105.714407-6-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Move CONFIG_SYS_CBSIZE (console buffer size) and CONFIG_SYS_PBSIZE (console print buffer size) out of cmd/Kconfig and in to common/Kconfig. Create help entries for both which explain their usage and why they are both not entirely command centric. Signed-off-by: Tom Rini --- cmd/Kconfig | 14 -------------- common/Kconfig | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 5554bd14e2ef..ecf25b062ad6 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -75,20 +75,6 @@ config SYS_MAXARGS int "Maximum number arguments accepted by commands" default 16 -config SYS_CBSIZE - int "Console input buffer size" - default 2048 if ARCH_TEGRA || ARCH_VERSAL || ARCH_ZYNQ || ARCH_ZYNQMP || \ - RCAR_GEN3 || TARGET_SOCFPGA_SOC64 - default 512 if ARCH_MX5 || ARCH_MX6 || ARCH_MX7 || FSL_LSCH2 || \ - FSL_LSCH3 || X86 - default 256 if M68K || PPC - default 1024 - -config SYS_PBSIZE - int "Buffer size for console output" - default 1024 if ARCH_SUNXI - default 1044 - config SYS_XTRACE bool "Command execution tracer" depends on CMDLINE diff --git a/common/Kconfig b/common/Kconfig index 93c96f23b013..fba1548e135b 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -52,6 +52,29 @@ config CONSOLE_RECORD_IN_SIZE The buffer is allocated immediately after the malloc() region is ready. +config SYS_CBSIZE + int "Console input buffer size" + default 2048 if ARCH_TEGRA || ARCH_VERSAL || ARCH_ZYNQ || ARCH_ZYNQMP || \ + RCAR_GEN3 || TARGET_SOCFPGA_SOC64 + default 512 if ARCH_MX5 || ARCH_MX6 || ARCH_MX7 || FSL_LSCH2 || \ + FSL_LSCH3 || X86 + default 256 if M68K || PPC + default 1024 + help + Set the size of the console input buffer. This is used both in the + case of reading input literally from the user in some manner as well + as when we need to construct or modify that type of input, for + example when constructing "bootargs" for the OS. + +config SYS_PBSIZE + int "Console output buffer size" + default 1024 if ARCH_SUNXI + default 1044 + help + Set the size of the console output buffer. This is used when we need + to work with some form of a buffer while providing output in some + form to the user. + config DISABLE_CONSOLE bool "Add functionality to disable console completely" help From patchwork Thu Oct 19 15:00:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851842 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=kev1GzWq; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9tV18fpz23jP for ; Fri, 20 Oct 2023 02:02:26 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7C9BD87455; Thu, 19 Oct 2023 17:01:23 +0200 (CEST) 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="kev1GzWq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0B41887436; Thu, 19 Oct 2023 17:01:18 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) (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 912F787442 for ; Thu, 19 Oct 2023 17:01:15 +0200 (CEST) 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-yw1-x1133.google.com with SMTP id 00721157ae682-5a7af20c488so99996297b3.1 for ; Thu, 19 Oct 2023 08:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727673; x=1698332473; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ttlHG5X4HxLhmKNPXQCwFunNrRGPYi2zmJ+37X97JFQ=; b=kev1GzWqaXb1K76IPThkJUTgTmfRwTXVxB5Dxb3lIMyg9txLUfSQTDpp/k4FVpewds CGwG6jkX06jMkS6WoP/s7fBz2ItnFiqbKBTogRuQEgoqQvYuajdJ9+Tzaabwx6u7BOFd /OcyeX9mGtIt4kBdnNiCDFXQX5wv7emFSiFws= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727673; x=1698332473; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ttlHG5X4HxLhmKNPXQCwFunNrRGPYi2zmJ+37X97JFQ=; b=deU0QdtLqkFWZ1paMCMLWSWMT4Gxdy7VcKF5S8jN6VbWP/0zLmewHVe1q0sr2r2C3K XdT/DMrZl4e1HNZ+xkAe6dnf2xukgTCH12DuOpal0JYEKrq3YoGLd2WGo19UtuaE4B/l nwQCoeTKx9y2PoJrXtLSztk70Zd6AlKfy3BULp25/M88mGwQIKrEYAt5kI/J53bNqW1+ RcKwLc8L/P1e9fmQA+4PGv9nIiLnlFk7MXUaYCzlspWDhLzHcUizOfo5M1l+EYoWTW/W U82TSeSmnlI8dzLuQTEHY8xiQGWUrSdJgce2DoL9+C4+314KYKi+SwgdlsuoaJb4VKj0 UxRQ== X-Gm-Message-State: AOJu0Yx5y1aKE8Sa8PTEk0b+oai6gog/snWeh98V6BQA5DcCpAGy+fVy pCu/+n2NQWhFEIrOJl0xEPkQOAV+9MEkAZQgGbA3BQ== X-Google-Smtp-Source: AGHT+IHxmP7a2OLeGhTsoR/SJZ4H2Nk6JWknU9FlU0cVAOcfv7kV4RwE/5pmtFPQLUzlBMmXB7qfEg== X-Received: by 2002:a0d:f044:0:b0:59e:8f6d:92e with SMTP id z65-20020a0df044000000b0059e8f6d092emr2539110ywe.49.1697727672960; Thu, 19 Oct 2023 08:01:12 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:11 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 07/24] env: Move env_set() out of cmd/nvedit.c and in to env/common.c Date: Thu, 19 Oct 2023 11:00:48 -0400 Message-Id: <20231019150105.714407-7-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Inside of env/common.c we already have our helper env_set_xxx functions, and even have a comment that explains why env_set() itself wasn't moved. We now handle that move. This requires that we rename the previous _do_env_set() to env_do_env_set() and note it as an internal env function. Add comments about this function to explain why we do this when we add the prototype. Add a new function, env_inc_id() to allow for the counter to be updated by both commands and callers, and document this as well by the prototype. Signed-off-by: Tom Rini --- cmd/Makefile | 4 +- cmd/nvedit.c | 122 ++--------------------------------------- env/common.c | 113 ++++++++++++++++++++++++++++++++++++-- include/env.h | 8 +++ include/env_internal.h | 12 ++++ 5 files changed, 135 insertions(+), 124 deletions(-) diff --git a/cmd/Makefile b/cmd/Makefile index 44db5f22861e..27a0045e7f94 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -128,6 +128,7 @@ endif obj-$(CONFIG_CMD_MUX) += mux.o obj-$(CONFIG_CMD_NAND) += nand.o obj-$(CONFIG_CMD_NET) += net.o +obj-$(CONFIG_ENV_SUPPORT) += nvedit.o obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o obj-$(CONFIG_CMD_ONENAND) += onenand.o obj-$(CONFIG_CMD_OSD) += osd.o @@ -244,9 +245,6 @@ endif # !CONFIG_SPL_BUILD obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o -# core command -obj-y += nvedit.o - obj-$(CONFIG_CMD_BCM_EXT_UTILS) += broadcom/ filechk_data_gz = (echo "static const char data_gz[] ="; cat $< | scripts/bin2c; echo ";") diff --git a/cmd/nvedit.c b/cmd/nvedit.c index daf1ad37f9be..e77338f81394 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -49,20 +49,6 @@ DECLARE_GLOBAL_DATA_PTR; */ #define MAX_ENV_SIZE (1 << 20) /* 1 MiB */ -/* - * This variable is incremented on each do_env_set(), so it can - * be used via env_get_id() as an indication, if the environment - * has changed or not. So it is possible to reread an environment - * variable only if the environment was changed ... done so for - * example in NetInitLoop() - */ -static int env_id = 1; - -int env_get_id(void) -{ - return env_id; -} - #ifndef CONFIG_SPL_BUILD /* * Command interface: print one or all environment variables @@ -198,104 +184,6 @@ DONE: #endif #endif /* CONFIG_SPL_BUILD */ -/* - * Set a new environment variable, - * or replace or delete an existing one. - */ -static int _do_env_set(int flag, int argc, char *const argv[], int env_flag) -{ - int i, len; - char *name, *value, *s; - struct env_entry e, *ep; - - debug("Initial value for argc=%d\n", argc); - -#if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_CMD_NVEDIT_EFI) - if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'e') - return do_env_set_efi(NULL, flag, --argc, ++argv); -#endif - - while (argc > 1 && **(argv + 1) == '-') { - char *arg = *++argv; - - --argc; - while (*++arg) { - switch (*arg) { - case 'f': /* force */ - env_flag |= H_FORCE; - break; - default: - return CMD_RET_USAGE; - } - } - } - debug("Final value for argc=%d\n", argc); - name = argv[1]; - - if (strchr(name, '=')) { - printf("## Error: illegal character '='" - "in variable name \"%s\"\n", name); - return 1; - } - - env_id++; - - /* Delete only ? */ - if (argc < 3 || argv[2] == NULL) { - int rc = hdelete_r(name, &env_htab, env_flag); - - /* If the variable didn't exist, don't report an error */ - return rc && rc != -ENOENT ? 1 : 0; - } - - /* - * Insert / replace new value - */ - for (i = 2, len = 0; i < argc; ++i) - len += strlen(argv[i]) + 1; - - value = malloc(len); - if (value == NULL) { - printf("## Can't malloc %d bytes\n", len); - return 1; - } - for (i = 2, s = value; i < argc; ++i) { - char *v = argv[i]; - - while ((*s++ = *v++) != '\0') - ; - *(s - 1) = ' '; - } - if (s != value) - *--s = '\0'; - - e.key = name; - e.data = value; - hsearch_r(e, ENV_ENTER, &ep, &env_htab, env_flag); - free(value); - if (!ep) { - printf("## Error inserting \"%s\" variable, errno=%d\n", - name, errno); - return 1; - } - - return 0; -} - -int env_set(const char *varname, const char *varvalue) -{ - const char * const argv[4] = { "setenv", varname, varvalue, NULL }; - - /* before import into hashtable */ - if (!(gd->flags & GD_FLG_ENV_READY)) - return 1; - - if (varvalue == NULL || varvalue[0] == '\0') - return _do_env_set(0, 2, (char * const *)argv, H_PROGRAMMATIC); - else - return _do_env_set(0, 3, (char * const *)argv, H_PROGRAMMATIC); -} - #ifndef CONFIG_SPL_BUILD static int do_env_set(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) @@ -303,7 +191,7 @@ static int do_env_set(struct cmd_tbl *cmdtp, int flag, int argc, if (argc < 2) return CMD_RET_USAGE; - return _do_env_set(flag, argc, argv, H_INTERACTIVE); + return env_do_env_set(flag, argc, argv, H_INTERACTIVE); } /* @@ -381,7 +269,7 @@ int do_env_ask(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } /* Continue calling setenv code */ - return _do_env_set(flag, len, local_args, H_INTERACTIVE); + return env_do_env_set(flag, len, local_args, H_INTERACTIVE); } #endif @@ -561,12 +449,12 @@ static int do_env_edit(struct cmd_tbl *cmdtp, int flag, int argc, if (buffer[0] == '\0') { const char * const _argv[3] = { "setenv", argv[1], NULL }; - return _do_env_set(0, 2, (char * const *)_argv, H_INTERACTIVE); + return env_do_env_set(0, 2, (char * const *)_argv, H_INTERACTIVE); } else { const char * const _argv[4] = { "setenv", argv[1], buffer, NULL }; - return _do_env_set(0, 3, (char * const *)_argv, H_INTERACTIVE); + return env_do_env_set(0, 3, (char * const *)_argv, H_INTERACTIVE); } } #endif /* CONFIG_CMD_EDITENV */ @@ -679,7 +567,7 @@ static int do_env_delete(struct cmd_tbl *cmdtp, int flag, } debug("Final value for argc=%d\n", argc); - env_id++; + env_inc_id(); while (--argc > 0) { char *name = *++argv; diff --git a/env/common.c b/env/common.c index eb1a91379539..656748c1f5b7 100644 --- a/env/common.c +++ b/env/common.c @@ -37,11 +37,116 @@ struct hsearch_data env_htab = { }; /* - * This env_set() function is defined in cmd/nvedit.c, since it calls - * _do_env_set(), whis is a static function in that file. - * - * int env_set(const char *varname, const char *varvalue); + * This variable is incremented each time we set an environment variable so we + * can be check via env_get_id() to see if the environment has changed or not. + * This makes it possible to reread an environment variable only if the + * environment was changed, typically used by networking code. */ +static int env_id = 1; + +int env_get_id(void) +{ + return env_id; +} + +void env_inc_id(void) +{ + env_id++; +} + +int env_do_env_set(int flag, int argc, char *const argv[], int env_flag) +{ + int i, len; + char *name, *value, *s; + struct env_entry e, *ep; + + debug("Initial value for argc=%d\n", argc); + +#if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_CMD_NVEDIT_EFI) + if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'e') + return do_env_set_efi(NULL, flag, --argc, ++argv); +#endif + + while (argc > 1 && **(argv + 1) == '-') { + char *arg = *++argv; + + --argc; + while (*++arg) { + switch (*arg) { + case 'f': /* force */ + env_flag |= H_FORCE; + break; + default: + return CMD_RET_USAGE; + } + } + } + debug("Final value for argc=%d\n", argc); + name = argv[1]; + + if (strchr(name, '=')) { + printf("## Error: illegal character '='" + "in variable name \"%s\"\n", name); + return 1; + } + + env_inc_id(); + + /* Delete only ? */ + if (argc < 3 || argv[2] == NULL) { + int rc = hdelete_r(name, &env_htab, env_flag); + + /* If the variable didn't exist, don't report an error */ + return rc && rc != -ENOENT ? 1 : 0; + } + + /* + * Insert / replace new value + */ + for (i = 2, len = 0; i < argc; ++i) + len += strlen(argv[i]) + 1; + + value = malloc(len); + if (value == NULL) { + printf("## Can't malloc %d bytes\n", len); + return 1; + } + for (i = 2, s = value; i < argc; ++i) { + char *v = argv[i]; + + while ((*s++ = *v++) != '\0') + ; + *(s - 1) = ' '; + } + if (s != value) + *--s = '\0'; + + e.key = name; + e.data = value; + hsearch_r(e, ENV_ENTER, &ep, &env_htab, env_flag); + free(value); + if (!ep) { + printf("## Error inserting \"%s\" variable, errno=%d\n", + name, errno); + return 1; + } + + return 0; +} + +int env_set(const char *varname, const char *varvalue) +{ + const char * const argv[4] = { "setenv", varname, varvalue, NULL }; + + /* before import into hashtable */ + if (!(gd->flags & GD_FLG_ENV_READY)) + return 1; + + if (varvalue == NULL || varvalue[0] == '\0') + return env_do_env_set(0, 2, (char * const *)argv, H_PROGRAMMATIC); + else + return env_do_env_set(0, 3, (char * const *)argv, H_PROGRAMMATIC); +} /** * Set an environment variable to an integer value diff --git a/include/env.h b/include/env.h index 430c4fa94a42..9778e3e4f2ce 100644 --- a/include/env.h +++ b/include/env.h @@ -72,6 +72,14 @@ enum env_redund_flags { */ int env_get_id(void); +/** + * env_inc_id() - Increase the sequence number for the environment + * + * Increment the value that is used by env_get_id() to inform callers + * if the environment has changed since they last checked. + */ +void env_inc_id(void); + /** * env_init() - Set up the pre-relocation environment * diff --git a/include/env_internal.h b/include/env_internal.h index 6a6949464689..ae7816d38e58 100644 --- a/include/env_internal.h +++ b/include/env_internal.h @@ -193,6 +193,18 @@ struct env_driver { extern struct hsearch_data env_htab; +/** + * env_do_env_set() - Perform the actual setting of an environment variable + * + * Due to the number of places we may need to set an environmental variable + * from we have an exposed internal function that performs the real work and + * then call this from both the command line function as well as other + * locations. + * + * Return: 0 on success or 1 on failure + */ +int env_do_env_set(int flag, int argc, char *const argv[], int env_flag); + /** * env_ext4_get_intf() - Provide the interface for env in EXT4 * From patchwork Thu Oct 19 15:00:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851843 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=oVTjb50G; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9tl5Zbfz23jP for ; Fri, 20 Oct 2023 02:02:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A243D8745F; Thu, 19 Oct 2023 17:01:27 +0200 (CEST) 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="oVTjb50G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7AFB387436; Thu, 19 Oct 2023 17:01:18 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (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 CA2E08744A for ; Thu, 19 Oct 2023 17:01:15 +0200 (CEST) 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-yw1-x112a.google.com with SMTP id 00721157ae682-5a82f176860so77509397b3.1 for ; Thu, 19 Oct 2023 08:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727674; x=1698332474; darn=lists.denx.de; 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=OorPIuOVKVz9rFKT/jKzRAK0NZ0dSHPSox/T+J0xDbc=; b=oVTjb50GKedmBkKp7HApMyPfMo9jUYcic+eIpP660CRrKWYaYKVc7Hsc+TGHdS2mXq ALc/kDhUktTRC9QmDrCqG0MR88F5IA13s6IhADmuCo72Dc6DMesggJkc+ODRdOWDxyCY EQfkuv/AxUbtD7XMQyTPzzJV9k4zQyd7fzjK4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727674; x=1698332474; 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=OorPIuOVKVz9rFKT/jKzRAK0NZ0dSHPSox/T+J0xDbc=; b=D/YUNy9ZrM0EMvGH5rkv7vq9YSyLg49b9ck4GYAQqm0esGJXgITTysbQw1+cu12s+L +WoJYGs2laacFdCdjF/XuroEA+RFh2LRQsJUf44IJtQSaDiThkxg3yhWM7Y7IBd2KTAF ErkJnDii8+cPje58CbkzX5C7sD5CB4wK/zYfBD3xsQmKs+xzoOOGfDy+559BbSzLspr7 qQ6rrp13tBoPrswAtBEm2JGdUYidawXz/3ficUikhzbX8bfy+BLW5hJt/cbMZdMFMell H90oAC1U+r0/6Yed6+QgNnKXg9f2nT4xPmdAUVgkv7jHaayayAyXRr2pmpdBo2d1/zGG niMg== X-Gm-Message-State: AOJu0YzPVj4XcxEoq/N3UwlRDP46jbFHqvIDo82PqBmxQjqP2vmIdWXp YRW80pWLnVbataggRscaPhTgXSy+ahPAWVkGfi3C7A== X-Google-Smtp-Source: AGHT+IHwZuNVV9MG9HhHdRaDDDpiaxl7KCEQOBD6eoz+Ka4MvCFVyrCHwa+hsPisLL8OxICmlJVAVA== X-Received: by 2002:a05:690c:39c:b0:5a8:1d2e:e3e4 with SMTP id bh28-20020a05690c039c00b005a81d2ee3e4mr2877748ywb.35.1697727673723; Thu, 19 Oct 2023 08:01:13 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:13 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 08/24] test: Make UNIT_TEST depend on CMDLINE Date: Thu, 19 Oct 2023 11:00:49 -0400 Message-Id: <20231019150105.714407-8-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass Many tests make some use of the command line, so require it for all test code. This could be teased apart, perhaps with a test flag indicating that it uses the command line. Leave that for later. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- test/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Kconfig b/test/Kconfig index ca648d23376f..c3db727c58e3 100644 --- a/test/Kconfig +++ b/test/Kconfig @@ -2,6 +2,7 @@ menu "Testing" config UNIT_TEST bool "Unit tests" + depends on CMDLINE help Select this to compile in unit tests for various parts of U-Boot. Test suites will be subcommands of the "ut" command. From patchwork Thu Oct 19 15:00:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851844 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=n6FBVJRT; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9ty47H3z23jP for ; Fri, 20 Oct 2023 02:02:50 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D22C8744D; Thu, 19 Oct 2023 17:01:30 +0200 (CEST) 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="n6FBVJRT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 850B08743F; Thu, 19 Oct 2023 17:01:21 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (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 CF2D587259 for ; Thu, 19 Oct 2023 17:01:16 +0200 (CEST) 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-yw1-x1131.google.com with SMTP id 00721157ae682-5a7c93507d5so96519967b3.2 for ; Thu, 19 Oct 2023 08:01:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727675; x=1698332475; darn=lists.denx.de; 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=10k3CyKXIT1Wx48gbCHpjwVz1f4wpfSj6DXHa0ce1kU=; b=n6FBVJRT/FNSxyYCu5BeR/KSZKRRBLRZp9/9FOlHlbe6nlLGnsD/ufmTJ0KrXtH4qn tAUQZHTr0JFMkBN6FWbXmf+QkrlhbN4a7CattTkVdZJLtF26Q1WQ65XPW4R7IjTB7T9t xM5W10Ten3rFg74y4eYX2E/U5SV2EEafBfHo4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727675; x=1698332475; 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=10k3CyKXIT1Wx48gbCHpjwVz1f4wpfSj6DXHa0ce1kU=; b=oLah5e0N4m+5012y93adqZTYxi4VrYP5HcA1J+m6aPSE3GqKXAf7eD8onDrJmM4M6V BeEvuZkpX8A0ZrctRbTHBS+zSSJVM9AVOnZZvhfMiLRe4ESgt6qgik/ifUYVp68h0Smd BXbIVrmgyKCwzkVPV6CY9oM3vabxoGtGHAKlmPyf/MuQROdVspzCaW/Rc4Jo2284ZCu3 A2GV/B1CrB/bHoxp2NfEBRmRAspmPwmGn01xuOgbCJcf6JasISL3bDFg/QdYwMl36j3W DYQZmx1zgLIr5OuCUQl0HDG1sUbAq2e6g5Yq0+XciVXp01RNGu7/mQQPpH9gpiZ6PU0W CfsA== X-Gm-Message-State: AOJu0YzKHOrspBsfLdtPTdOZKAPcmAuy5rtPp81+0U+28I7r80M0Yfbg 8XvQsY9fMcckzmh4bde0h03DG3J5IFaJ7yerpqdA+w== X-Google-Smtp-Source: AGHT+IH/I2b+YeGhUTMt1eWL5EzfYiNb2QVyIX55eVfsacyK78pCQtZUhBzx1+uVcADV5+4NOR7l1w== X-Received: by 2002:a0d:e2c9:0:b0:5a7:acae:3bb0 with SMTP id l192-20020a0de2c9000000b005a7acae3bb0mr2547266ywe.5.1697727675207; Thu, 19 Oct 2023 08:01:15 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:14 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 09/24] video: Don't require the font command Date: Thu, 19 Oct 2023 11:00:50 -0400 Message-Id: <20231019150105.714407-9-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass While it is nice to have the font command, using 'select' makes it impossible to build the console code without it. Stop using 'select' and make it default if CONSOLE_TRUETYPE is enabled when asking the command. Signed-off-by: Simon Glass Signed-off-by: Tom Rini --- Changes in v4: - Rework to have the command itself be default y if CONSOLE_TRUETYPE instead of selecting it. (Tom) --- cmd/Kconfig | 2 +- drivers/video/Kconfig | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index ecf25b062ad6..16e5cb8f0633 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2340,7 +2340,7 @@ config CMD_VIDCONSOLE config CMD_SELECT_FONT bool "select font size" depends on VIDEO - default n + default y if CONSOLE_TRUETYPE help Enabling this will provide 'font' command. Allows font selection at runtime. diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index ab927641bb7a..6f319ba0d544 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -180,7 +180,6 @@ config CONSOLE_ROTATION config CONSOLE_TRUETYPE bool "Support a console that uses TrueType fonts" - select CMD_SELECT_FONT help TrueTrype fonts can provide outline-drawing capability rather than needing to provide a bitmap for each font and size that is needed. From patchwork Thu Oct 19 15:00:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851845 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=aPYIqJOr; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9v90rKBz23jP for ; Fri, 20 Oct 2023 02:03:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C3CD787446; Thu, 19 Oct 2023 17:01:30 +0200 (CEST) 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="aPYIqJOr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1E6C787448; Thu, 19 Oct 2023 17:01:28 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) (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 6A56787441 for ; Thu, 19 Oct 2023 17:01:18 +0200 (CEST) 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-yw1-x1133.google.com with SMTP id 00721157ae682-59e88a28b98so7911057b3.1 for ; Thu, 19 Oct 2023 08:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727677; x=1698332477; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6t/9xFA2pg3tAQN0ki3KsAg11bZGx0qBfZdby1hHC9M=; b=aPYIqJOrf0YAK3PVb1gScqkLjvfjbYtD6rSJmQILe8N7qQO3hCTIdoyNPXtbEMz3ih 1g930XSRFC2e/go68GTV2pDvY1EvSan2fWig5irBYMUvXYS//ofMIUzXCvQP0a3HuGnd y4wQZmSD161xjFYHRHNtx4MVfZonwwhz6Ub6A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727677; x=1698332477; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6t/9xFA2pg3tAQN0ki3KsAg11bZGx0qBfZdby1hHC9M=; b=ah9DeBQNq3OOTGPzaLHbUnc6wGndvtEjoSi0132m0O6IqNMzFq6fIXvzjP7xu827hA drZqi7o0Ae3HTQItQRJQxGbN0Mvx0CmsmWeNyHUUvoUf45450hKx+3C8Kqq6SjIa+q2o fJ8nadaorhvjAjqqbCUFJpD4Tyni4LwRPv7F62pXx4ipZ00SlZ66j7YGhKf2iiHk14Vq edul+2aefTt5PBl4t9LMEfnYSS1raWau4hnd+km0codKKBiMCdcA05Cn1yJC7xPEIQyQ Waopjkt82iP0Pirm5zLYN7asE+6+7xrh29Jrul8cgYRxqShnKHvrVKBSllbFXw4rWWQR OQjQ== X-Gm-Message-State: AOJu0YxvOvZDXIxnkrYzGCnbGwGxPtGWhJg0rVITklzWGolFwW245HKd SEdFKZoaKtm2z947xzUAMUJn3ChxZ9znpyQY1DZeAA== X-Google-Smtp-Source: AGHT+IGh4GKOrz1Ty51BVC3okcy1/ZwNodqGpKAybdrCNeD6s9wkNRQk/M9/ChbGPBkJDJFK+40dwg== X-Received: by 2002:a05:690c:f8f:b0:5a8:1767:1fef with SMTP id df15-20020a05690c0f8f00b005a817671fefmr1578504ywb.9.1697727676760; Thu, 19 Oct 2023 08:01:16 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:15 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 10/24] cli_simple: Rework this support slightly Date: Thu, 19 Oct 2023 11:00:51 -0400 Message-Id: <20231019150105.714407-10-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean The interactive portion of our non-HUSH 'simple' parser is guarded by CONFIG_CMDLINE already. Much of the code behind this simple parser is also used as "input" parser, such as from menu interfaces and so forth and not strictly command line input. To support this, always build the assorted cli object files, but guard the interactive portions of cli_simple.c with a CMDLINE check. Signed-off-by: Tom Rini --- common/Makefile | 2 +- common/cli_simple.c | 77 +++++++++++++++++++++++---------------------- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/common/Makefile b/common/Makefile index b711dc29b65e..1495436d5d45 100644 --- a/common/Makefile +++ b/common/Makefile @@ -8,6 +8,7 @@ ifndef CONFIG_SPL_BUILD obj-y += init/ obj-y += main.o obj-y += exports.o +obj-y += cli_getch.o cli_simple.o cli_readline.o obj-$(CONFIG_HUSH_PARSER) += cli_hush.o obj-$(CONFIG_AUTOBOOT) += autoboot.o obj-y += version.o @@ -38,7 +39,6 @@ obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o obj-$(CONFIG_MENU) += menu.o obj-$(CONFIG_UPDATE_COMMON) += update.o obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o -obj-$(CONFIG_CMDLINE) += cli_getch.o cli_readline.o cli_simple.o endif # !CONFIG_SPL_BUILD diff --git a/common/cli_simple.c b/common/cli_simple.c index e80ba488a5eb..f89ba92d1b05 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -22,44 +22,6 @@ #define debug_parser(fmt, args...) \ debug_cond(DEBUG_PARSER, fmt, ##args) - -int cli_simple_parse_line(char *line, char *argv[]) -{ - int nargs = 0; - - debug_parser("%s: \"%s\"\n", __func__, line); - while (nargs < CONFIG_SYS_MAXARGS) { - /* skip any white space */ - while (isblank(*line)) - ++line; - - if (*line == '\0') { /* end of line, no more args */ - argv[nargs] = NULL; - debug_parser("%s: nargs=%d\n", __func__, nargs); - return nargs; - } - - argv[nargs++] = line; /* begin of argument string */ - - /* find end of string */ - while (*line && !isblank(*line)) - ++line; - - if (*line == '\0') { /* end of line, no more args */ - argv[nargs] = NULL; - debug_parser("parse_line: nargs=%d\n", nargs); - return nargs; - } - - *line++ = '\0'; /* terminate current arg */ - } - - printf("** Too many args (max. %d) **\n", CONFIG_SYS_MAXARGS); - - debug_parser("%s: nargs=%d\n", __func__, nargs); - return nargs; -} - int cli_simple_process_macros(const char *input, char *output, int max_size) { char c, prev; @@ -172,6 +134,44 @@ int cli_simple_process_macros(const char *input, char *output, int max_size) return ret; } +#ifdef CONFIG_CMDLINE +int cli_simple_parse_line(char *line, char *argv[]) +{ + int nargs = 0; + + debug_parser("%s: \"%s\"\n", __func__, line); + while (nargs < CONFIG_SYS_MAXARGS) { + /* skip any white space */ + while (isblank(*line)) + ++line; + + if (*line == '\0') { /* end of line, no more args */ + argv[nargs] = NULL; + debug_parser("%s: nargs=%d\n", __func__, nargs); + return nargs; + } + + argv[nargs++] = line; /* begin of argument string */ + + /* find end of string */ + while (*line && !isblank(*line)) + ++line; + + if (*line == '\0') { /* end of line, no more args */ + argv[nargs] = NULL; + debug_parser("parse_line: nargs=%d\n", nargs); + return nargs; + } + + *line++ = '\0'; /* terminate current arg */ + } + + printf("** Too many args (max. %d) **\n", CONFIG_SYS_MAXARGS); + + debug_parser("%s: nargs=%d\n", __func__, nargs); + return nargs; +} + /* * WARNING: * @@ -346,3 +346,4 @@ int cli_simple_run_command_list(char *cmd, int flag) return rcode; } +#endif From patchwork Thu Oct 19 15:00:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851848 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=OhCQLVEA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9vr4yQKz23jP for ; Fri, 20 Oct 2023 02:03:36 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 424D78747C; Thu, 19 Oct 2023 17:01:32 +0200 (CEST) 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="OhCQLVEA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9142887436; Thu, 19 Oct 2023 17:01:28 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) (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 9208C8725A for ; Thu, 19 Oct 2023 17:01:20 +0200 (CEST) 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-yw1-x1129.google.com with SMTP id 00721157ae682-5a7af45084eso103418177b3.0 for ; Thu, 19 Oct 2023 08:01:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727678; x=1698332478; darn=lists.denx.de; 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=6RuBlM41tPdXb89yBAXTFbLd9eqhlSwYh2NtQbaxUX8=; b=OhCQLVEAqtpDj7wZom8kUMlX/oV4e9GCh0co6gd51lCOWi1ZjyKrI9ozgVWKVZi4M1 U891rj8fRR1HKYwW23GiUiqb16cw4RQd+osdwdQKFqIRrYkf/mvb0GGg9t9h1MC0OvDf jNlT8q+p+LEeu5+7r6W7gJgCcegcUXES0SBNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727678; x=1698332478; 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=6RuBlM41tPdXb89yBAXTFbLd9eqhlSwYh2NtQbaxUX8=; b=mI6FrZ2U6RwYWUS6fqxfhSWBVCH3+xOG0Itwpa9mpDKsS6t+IY2TcQOC6G3Hg1oYJj EwFiVjFGtxw0O9cbHDCWs/rrox2qGBBG7hPPM4o22Oun+NkM0lFdVdHdb03Ws24PA4U0 Zh4LDeBnVmpW0j67yUTnUD98wH17qDSPcoIlE2k35TK4GKZcLpLzdNhA0hngtdgFlDy4 fX1kRH941DgrqWPTJpyKLds+DqZzoh3iuxtqTVpUtE4IsOjOawOeSHcKdWmSrUYmvb69 UmEhFE6AHxI3hZtSxW+aVUOzx9mnV22SBhrFLMjR4N/iyd9V9vF7UtLE//9pLC5G70o1 s8zQ== X-Gm-Message-State: AOJu0Yxz8XLBOPVWL3w7mJ2rL2R30EJezN04OEu6W727N2yLMLvyDXFn OPVDmqZzzhR56WZ+WBUJ+iLAilGPrZe7ZqiVTQmD/g== X-Google-Smtp-Source: AGHT+IFeBKJbIJMdjjQAev6Rd3u+JIhQbIWLD8Hc7oWPWsfU4nl1FQs5SSCAcWELal0+sI67J5Ca+g== X-Received: by 2002:a81:6cc9:0:b0:59f:7fb9:621a with SMTP id h192-20020a816cc9000000b0059f7fb9621amr2529903ywc.22.1697727678107; Thu, 19 Oct 2023 08:01:18 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:17 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass , AKASHI Takahiro , Heinrich Schuchardt , Ilias Apalodimas Subject: [v4 11/24] efi: Rearrange the Kconfig for CMD_BOOTEFI_BOOTMGR Date: Thu, 19 Oct 2023 11:00:52 -0400 Message-Id: <20231019150105.714407-11-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass The command should not be used to enable library functionality. Add a new BOOTEFI_BOOTMGR Kconfig for that. Adjust the conditions so that the same code is built. Signed-off-by: Simon Glass Suggested-by: AKASHI Takahiro --- Cc: Heinrich Schuchardt Cc: Ilias Apalodimas Changes in v4: - Integrate AKASHI Takahiro's feedback from v3 - Reword the help text on CMD_BOOTEFI_BOOTMGR slightly --- cmd/Kconfig | 11 ++++++++++- lib/efi_loader/Kconfig | 6 +++--- lib/efi_loader/Makefile | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 16e5cb8f0633..872cb49150cc 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -379,6 +379,15 @@ config CMD_BOOTEFI help Boot an EFI image from memory. +config CMD_BOOTEFI_BOOTMGR + bool "UEFI Boot Manager command" + depends on BOOTEFI_BOOTMGR && CMD_BOOTEFI + default y + help + Select this option to enable the 'bootmgr' subcommand of 'bootefi'. + This subcommand will allow you to select the UEFI binary to be booted + via UEFI variables Boot####, BootOrder, and BootNext. + config CMD_BOOTEFI_HELLO_COMPILE bool "Compile a standard EFI hello world binary for testing" depends on CMD_BOOTEFI && !CPU_V7M @@ -2110,7 +2119,7 @@ config CMD_EFIDEBUG config CMD_EFICONFIG bool "eficonfig - provide menu-driven uefi variables maintenance interface" default y if !HAS_BOARD_SIZE_LIMIT - depends on CMD_BOOTEFI_BOOTMGR + depends on BOOTEFI_BOOTMGR select MENU help Enable the 'eficonfig' command which provides the menu-driven UEFI diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index d20aaab6dba4..13cad6342c36 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -32,14 +32,14 @@ config EFI_LOADER if EFI_LOADER -config CMD_BOOTEFI_BOOTMGR +config BOOTEFI_BOOTMGR bool "UEFI Boot Manager" default y select BOOTMETH_GLOBAL if BOOTSTD help Select this option if you want to select the UEFI binary to be booted - via UEFI variables Boot####, BootOrder, and BootNext. This enables the - 'bootefi bootmgr' command. + via UEFI variables Boot####, BootOrder, and BootNext. You should also + normally enable CMD_BOOTEFI_BOOTMGR so that the command is available. choice prompt "Store for non-volatile UEFI variables" diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index 8d31fc61c601..0a2cb6e3c476 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -42,7 +42,7 @@ targets += initrddump.o endif obj-$(CONFIG_CMD_BOOTEFI_HELLO) += helloworld_efi.o -obj-$(CONFIG_CMD_BOOTEFI_BOOTMGR) += efi_bootmgr.o +obj-$(CONFIG_BOOTEFI_BOOTMGR) += efi_bootmgr.o obj-y += efi_boottime.o obj-y += efi_helper.o obj-$(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) += efi_capsule.o From patchwork Thu Oct 19 15:00:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851846 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=s006q8MB; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9vP5gFqz23jP for ; Fri, 20 Oct 2023 02:03:13 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 599AA8746E; Thu, 19 Oct 2023 17:01:31 +0200 (CEST) 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="s006q8MB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5ACF28745A; Thu, 19 Oct 2023 17:01:28 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) (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 29D098743C for ; Thu, 19 Oct 2023 17:01:21 +0200 (CEST) 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-yw1-x1136.google.com with SMTP id 00721157ae682-5a7c7262d5eso101377177b3.1 for ; Thu, 19 Oct 2023 08:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727680; x=1698332480; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Pii+ilK/8C/sJB44X4gspcJAIz0PQIbgF91TsVKBW7c=; b=s006q8MBdt2F2T0i8JmZzLtKTEeEDi95mH8MslSpN7YRJZc+18aUjRSZbYpKMKN6Ql q/FOcGPos+9+5ujjjO0CittVVW2fNCwJWLsGrhAgSUgNq1NWwVaoVlWxj9IcxmWI68HB I413naEMzcfxXD0uEpnrPdPfFMm0X9YjcU4Pw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727680; x=1698332480; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pii+ilK/8C/sJB44X4gspcJAIz0PQIbgF91TsVKBW7c=; b=YnHjS2a33WMinAOriHPyLUqHdhBVSqdufPrUQz9YrcSmiLPTWo5I+ENYhHOPnvFzNW SBZfC3d+YyqREloo39PG1VIHfwjXpUBg8REt1U/z2z+X6Kvoaw4iTg4bwJ54he3JwHEa Odqow2WD6eT1RdKKakLbd7OvoMfNAt8dB8yAOEHifSHHG6Y5bqXCYbD6KCm+uW13Un14 Zft2Mk7z0LKajv/2iQ6rf9EsHP9jRCgNRtWsPHqn/7SLv8b7MtqP+1H+90NA9syQVXbg SKmv7xGtl7emZjbs+J/4SCvbrkK+AsTR4rMvimwPcsUtPjc6za3orya6OYLEw/l9Mium 6Ohg== X-Gm-Message-State: AOJu0Yz/47tKypjxhQdlb/UzLKGJlK/Wq1AlV0gyyZR/2DO3zaGB8idU 6NnDS/PfvioYCSOyDgNC2QwUZKXru6Qg72m+SkHO7w== X-Google-Smtp-Source: AGHT+IGsOjRAMBHOjxS3Pm6gXjNT4HLA+geXSHR/6G32cdy71ZTRH0YfMpywHE5p9mrIL8IRDUQWEw== X-Received: by 2002:a81:5dc1:0:b0:569:e7cb:cd4e with SMTP id r184-20020a815dc1000000b00569e7cbcd4emr2129557ywb.48.1697727679504; Thu, 19 Oct 2023 08:01:19 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:18 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 12/24] bootmeth: Make BOOTMETH_EFILOADER depend on CMD_BOOTEFI Date: Thu, 19 Oct 2023 11:00:53 -0400 Message-Id: <20231019150105.714407-12-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Today, the bootmeth for using the EFI loader via bootefi depends on calling the bootefi command directly, so make this in turn depend on CMD_BOOTEFI. Signed-off-by: Tom Rini --- boot/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index a01e6cb8aafe..e0ded3249343 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -504,7 +504,7 @@ config BOOTMETH_EXTLINUX_PXE config BOOTMETH_EFILOADER bool "Bootdev support for EFI boot" - depends on EFI_LOADER + depends on CMD_BOOTEFI default y help Enables support for EFI boot using bootdevs. This makes the @@ -539,7 +539,7 @@ config BOOTMETH_DISTRO select BOOTMETH_SCRIPT # E.g. Armbian uses scripts select BOOTMETH_EXTLINUX # E.g. Debian uses these select BOOTMETH_EXTLINUX_PXE if CMD_PXE && CMD_NET && DM_ETH - select BOOTMETH_EFILOADER if EFI_LOADER # E.g. Ubuntu uses this + select BOOTMETH_EFILOADER if CMD_BOOTEFI # E.g. Ubuntu uses this config SPL_BOOTMETH_VBE bool "Bootdev support for Verified Boot for Embedded (SPL)" From patchwork Thu Oct 19 15:00:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851847 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=Qsj+RjkT; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9vd0D5Cz23jP for ; Fri, 20 Oct 2023 02:03:25 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BFF2987476; Thu, 19 Oct 2023 17:01:31 +0200 (CEST) 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="Qsj+RjkT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6EFDA87436; Thu, 19 Oct 2023 17:01:28 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (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 C24508743F for ; Thu, 19 Oct 2023 17:01:22 +0200 (CEST) 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-yw1-x1131.google.com with SMTP id 00721157ae682-5a7c95b8d14so103155887b3.3 for ; Thu, 19 Oct 2023 08:01:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727681; x=1698332481; darn=lists.denx.de; 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=qdtmRj74UXVK3HIryDZa/0xggu4HNjhJontGrzKLEEQ=; b=Qsj+RjkT4iS5EBjMuh1Wm+/3gfZRiWeBzAt1HoOnDuCzS9y59SaxpSJXB5NKVzHTUh iThToInH5fX21stgIDrTQhVHpyqJdltmWfW6lIZtvM5dWF6cmSXV8ZOBRVTv5RbX2UIA II2eYEjoBC0jW+5SNSpOZyzO0bjJM+6o97J4U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727681; x=1698332481; 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=qdtmRj74UXVK3HIryDZa/0xggu4HNjhJontGrzKLEEQ=; b=q8PtJDJ6qxwceYhCbYqMQX0ZnWnykXKSlM8qXkVdRe+lTzrx2WkBzAdBYLHRCGuItr gKl6CmYL8qH0zt56COtsKtbrFb/e1/Cn5p1Dv2G0lfaSd38b5XgH2aJyfupTKkz7BZAk QvH44+6juNloMRjvEJ//IDmoWcKOY9/Ub9J/hy5/bXKtkyY8rC+z4wAUe6JPsm8hEgF9 RCN9cq9BUI2nANZ7jhWknjAuv1BdVAivI1JwVnalDehGNdvKlixVfrPNJhwoQ9N+9huP 3d4H1VCIIDvrY/4xj2NwgYJoPDI/gHxOzL9DfLnfJSntHuNrjsz7zqCM/YNrq/FFWUNy 76uw== X-Gm-Message-State: AOJu0Yw57C+WHRDhEhNVPVPyKduyj7L/w1G2XMZy86YwuKsZGmbZb2W8 MmOvCFlLB/daEd0k5d1ayYiWQ4lRE7V5UwQdWH0zKg== X-Google-Smtp-Source: AGHT+IEqtn9sVpZdoshePKgZ5aC/P4RbTg7/JN0Uvj5WnvDw5iCUJNCQgAKDjzkTLDBipRuuaxqvUw== X-Received: by 2002:a81:7241:0:b0:599:b570:2db7 with SMTP id n62-20020a817241000000b00599b5702db7mr2741430ywc.30.1697727680966; Thu, 19 Oct 2023 08:01:20 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:20 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 13/24] autoboot: Correct dependencies on CMDLINE Date: Thu, 19 Oct 2023 11:00:54 -0400 Message-Id: <20231019150105.714407-13-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass Make AUTOBOOT depend on CMDLINE since it is mostly meaningless without it. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- boot/Kconfig | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index e0ded3249343..0dbd10a93469 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1162,14 +1162,16 @@ menu "Autoboot options" config AUTOBOOT bool "Autoboot" + depends on CMDLINE default y help This enables the autoboot. See doc/README.autoboot for detail. +if AUTOBOOT + config BOOTDELAY int "delay in seconds before automatically booting" default 2 - depends on AUTOBOOT help Delay before automatically running bootcmd; set to 0 to autoboot with no delay, but you can stop it by key input. @@ -1191,9 +1193,11 @@ config AUTOBOOT_KEYED U-Boot automatic booting process and bring the device to the U-Boot prompt for user input. +if AUTOBOOT_KEYED + config AUTOBOOT_FLUSH_STDIN bool "Enable flushing stdin before starting to read the password" - depends on AUTOBOOT_KEYED && !SANDBOX + depends on !SANDBOX help When this option is enabled stdin buffer will be flushed before starting to read the password. @@ -1202,7 +1206,6 @@ config AUTOBOOT_FLUSH_STDIN config AUTOBOOT_PROMPT string "Autoboot stop prompt" - depends on AUTOBOOT_KEYED default "Autoboot in %d seconds\\n" help This string is displayed before the boot delay selected by @@ -1218,7 +1221,6 @@ config AUTOBOOT_PROMPT config AUTOBOOT_ENCRYPTION bool "Enable encryption in autoboot stopping" - depends on AUTOBOOT_KEYED help This option allows a string to be entered into U-Boot to stop the autoboot. @@ -1245,7 +1247,7 @@ config AUTOBOOT_SHA256_FALLBACK config AUTOBOOT_DELAY_STR string "Delay autobooting via specific input key / string" - depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION + depends on !AUTOBOOT_ENCRYPTION help This option delays the automatic boot feature by issuing a specific input key or string. If CONFIG_AUTOBOOT_DELAY_STR @@ -1257,7 +1259,7 @@ config AUTOBOOT_DELAY_STR config AUTOBOOT_STOP_STR string "Stop autobooting via specific input key / string" - depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION + depends on !AUTOBOOT_ENCRYPTION help This option enables stopping (aborting) of the automatic boot feature only by issuing a specific input key or @@ -1269,7 +1271,7 @@ config AUTOBOOT_STOP_STR config AUTOBOOT_KEYED_CTRLC bool "Enable Ctrl-C autoboot interruption" - depends on AUTOBOOT_KEYED && !AUTOBOOT_ENCRYPTION + depends on !AUTOBOOT_ENCRYPTION help This option allows for the boot sequence to be interrupted by ctrl-c, in addition to the "bootdelaykey" and "bootstopkey". @@ -1278,7 +1280,7 @@ config AUTOBOOT_KEYED_CTRLC config AUTOBOOT_NEVER_TIMEOUT bool "Make the password entry never time-out" - depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION && CRYPT_PW + depends on AUTOBOOT_ENCRYPTION && CRYPT_PW help This option removes the timeout from the password entry when the user first presses the key before entering @@ -1286,7 +1288,7 @@ config AUTOBOOT_NEVER_TIMEOUT config AUTOBOOT_STOP_STR_ENABLE bool "Enable fixed string to stop autobooting" - depends on AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION + depends on AUTOBOOT_ENCRYPTION help This option enables the feature to add a fixed stop string that is defined at compile time. @@ -1317,9 +1319,12 @@ config AUTOBOOT_STOP_STR_SHA256 includes a ":", the portion prior to the ":" will be treated as a salt value. +endif # AUTOBOOT_KEYED + +if !AUTOBOOT_KEYED + config AUTOBOOT_USE_MENUKEY bool "Allow a specify key to run a menu from the environment" - depends on !AUTOBOOT_KEYED help If a specific key is pressed to stop autoboot, then the commands in the environment variable 'menucmd' are executed before boot starts. @@ -1334,6 +1339,10 @@ config AUTOBOOT_MENUKEY For example, 33 means "!" in ASCII, so pressing ! at boot would take this action. +endif + +endif # AUTOBOOT + config AUTOBOOT_MENU_SHOW bool "Show a menu on boot" depends on CMD_BOOTMENU From patchwork Thu Oct 19 15:00:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851849 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=nwxsfZqm; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9w75qMBz23jP for ; Fri, 20 Oct 2023 02:03:51 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA3EB87454; Thu, 19 Oct 2023 17:01:37 +0200 (CEST) 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="nwxsfZqm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87DD987469; Thu, 19 Oct 2023 17:01:30 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) (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 CD4A087465 for ; Thu, 19 Oct 2023 17:01:27 +0200 (CEST) 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-yw1-x1133.google.com with SMTP id 00721157ae682-5a8ada42c2aso33209387b3.3 for ; Thu, 19 Oct 2023 08:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727682; x=1698332482; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=cGOdhNVkcYPMtZzqjWnlWgn6vUL8XkbpxI8jruxoWQM=; b=nwxsfZqmSE+fJYA8eT3NKkJ9l8A1AVSuXCUUNq02NyXxGq+NowGnfnE3R42NBB6XUb 78p4rTJQ8tD16E2kCmUpY05LUHMuA4Q0jbbgETDg2oB3kioPJBjO5h17bP7jCyGpo8PH Yq4kF+AxmNL7r+GpMBBT1RuYy3HgnA1ILp9/E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727682; x=1698332482; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cGOdhNVkcYPMtZzqjWnlWgn6vUL8XkbpxI8jruxoWQM=; b=e2YCsYS+tnK2i1uLRFxTo3pMwVDwbO911bBIlN8L8zk1Da9yil6IoWUb28JEpGHjL6 RZ4OzuTiKSaSBFBRXs6NNl/C6mUiTmszOoule+18VVY+N5dLsHex6aBmOXtXK0TKXlve C+sjkgx6Aoyuz6KmLqT2QTuDTomsLm2UUiQhhAY86rPg5S7yId2SMSFlrxsKoHMXk35E Rds6mHQVBZg+naL+aAP7BCf2t3+MY2V0dPjHIwIJIv2aSPxU1I00R3EGWNyPK2MlAPNQ /iyCv6gfTTdGl7T+7ClJ9DMyaOBg7Xh+WQA+pPFi7M2/kXobEP72n9n0Z0Yc7t37XMpT 3bsg== X-Gm-Message-State: AOJu0Yxam4d4oHrASV16TTjqAUMcPzchZnJnh2slFCepeq11Z07ZY92/ OzN+/1JRIVyDaTKBZjKx/mc0hKpRn7XECSDUWdbgmQ== X-Google-Smtp-Source: AGHT+IEf+AD03rKdWot8qXlvNDk6S/f9346qnof+QksgUYaepYZoNVt4TzAF+x7Zzu/Ib6a2wJSRow== X-Received: by 2002:a0d:d995:0:b0:59c:aea:d877 with SMTP id b143-20020a0dd995000000b0059c0aead877mr2485870ywe.40.1697727682153; Thu, 19 Oct 2023 08:01:22 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:21 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 14/24] boot: Make DISTRO_DEFAULTS select CMDLINE Date: Thu, 19 Oct 2023 11:00:55 -0400 Message-Id: <20231019150105.714407-14-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean The implementation of DISTRO_DEFAULTS is done in environment scripts and requires the command line in order to work. Because of this, select CMDLINE here. Signed-off-by: Tom Rini --- boot/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/Kconfig b/boot/Kconfig index 0dbd10a93469..2075ecd34b1f 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -777,6 +777,7 @@ endmenu # Boot images config DISTRO_DEFAULTS bool "(deprecated) Script-based booting of Linux distributions" + select CMDLINE select BOOT_DEFAULTS select AUTO_COMPLETE select CMDLINE_EDITING From patchwork Thu Oct 19 15:00:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851851 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=sVALpUyN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9wc2jDZz23jP for ; Fri, 20 Oct 2023 02:04:16 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7902C87470; Thu, 19 Oct 2023 17:01:38 +0200 (CEST) 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="sVALpUyN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE15C87469; Thu, 19 Oct 2023 17:01:31 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (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 54A5C87441 for ; Thu, 19 Oct 2023 17:01:28 +0200 (CEST) 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-yw1-x1131.google.com with SMTP id 00721157ae682-5a7fb84f6ceso99638607b3.1 for ; Thu, 19 Oct 2023 08:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727683; x=1698332483; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=J8iRd02341ZQdgxQo3hwYJbTVXYRRNfrSN3IVwCidv0=; b=sVALpUyNC3WoyxiLgwVKb5IYWtqryXhaOzK0iw8oCvcYq83ugseQ0oz/6S2pBa+RR4 eWcUmxCL3Z7JeKMJ5+G0WfA85eX8j/MliKxNbOQVrS3ooNFQ0VGcpBlkTpwzqGieFWQb a/56dhsxVrq4sJItLGvPB9QgK13auXjAxDPQU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727683; x=1698332483; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J8iRd02341ZQdgxQo3hwYJbTVXYRRNfrSN3IVwCidv0=; b=bmKT86Ca7K9xrGG23gW5HgmukodkqKfLnk1fqeJWofzrky7IxjuLItOCu49Oc979RF AIymfq+jgqG+FKCFoR92Asmu+ojQ/Q6QOamboAA3LfUzl4bAiA+ukwsjJG5PiBm4jZla I995FP8nSXEyWBiN5Cv1wcbFi5bzhqsgEcZS6D64fFrBEEuQfHWoeHmLg1r/EXONpKJT ykwwyK5nxX+9pD+7hzyFbMKvOMgfAxdo2ESHakCuZkeA4bLZqNvJXkBjHqvx7KsfK+c5 DY9Qa2HZMMskkvaaBOMyqYjBs+6/lLu/KxjVzByLo1aNo7vNInYnVVmNmah/7AQmXOUR vdjw== X-Gm-Message-State: AOJu0Yy9To1rrfccwOh+jC+0e1Uhiux3RaL/59J64KEahYxlqBHgLL3g QbJOxfBvmABvjuXCEBDFTr3p39sf8CnFU7+OcwigYg== X-Google-Smtp-Source: AGHT+IGmqdPw5fdn894qqyFw/2lN/pF9Lv2dN0HEVLKiPYWLaC7s5wBeAysJLm1kCnSBQL56VzLEVw== X-Received: by 2002:a81:a214:0:b0:5a8:7edd:b7b0 with SMTP id w20-20020a81a214000000b005a87eddb7b0mr2577311ywg.38.1697727683209; Thu, 19 Oct 2023 08:01:23 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:22 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 15/24] boot: Rework BOOT_DEFAULTS to allow for CMDLINE to be disabled Date: Thu, 19 Oct 2023 11:00:56 -0400 Message-Id: <20231019150105.714407-15-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean We split BOOT_DEFAULTS to have BOOT_DEFAULTS_FEATURES and BOOT_DEFAULTS_CMDS that in turn list general features or commands that we want enabled when BOOT_DEFAULTS is selected. We only select BOOT_DEFAULTS_CMDS if CMDLINE is set. Signed-off-by: Tom Rini --- boot/Kconfig | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index 2075ecd34b1f..88b9296ee1bf 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -346,8 +346,16 @@ config PXE_UTILS help Utilities for parsing PXE file formats. -config BOOT_DEFAULTS - bool # Common defaults for standard boot and distroboot +config BOOT_DEFAULTS_FEATURES + bool + select SUPPORT_RAW_INITRD + select ENV_VARS_UBOOT_CONFIG + imply USB_STORAGE + imply EFI_PARTITION + imply ISO_PARTITION + +config BOOT_DEFAULTS_CMDS + bool imply USE_BOOTCOMMAND select CMD_ENV_EXISTS select CMD_EXT2 @@ -358,14 +366,14 @@ config BOOT_DEFAULTS 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 + +config BOOT_DEFAULTS + bool # Common defaults for standard boot and distroboot + select BOOT_DEFAULTS_FEATURES + select BOOT_DEFAULTS_CMDS if CMDLINE help These are not required but are commonly needed to support a good selection of booting methods. Enable this to improve the capability @@ -431,7 +439,6 @@ config BOOTSTD_FULL config BOOTSTD_DEFAULTS bool "Select some common defaults for standard boot" depends on BOOTSTD - imply USE_BOOTCOMMAND select BOOT_DEFAULTS select BOOTMETH_DISTRO help From patchwork Thu Oct 19 15:00:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851850 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=qsQHJkMy; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9wM1ZfPz23jP for ; Fri, 20 Oct 2023 02:04:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A04087440; Thu, 19 Oct 2023 17:01:38 +0200 (CEST) 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="qsQHJkMy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BB31587465; Thu, 19 Oct 2023 17:01:30 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) (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 54EDE87446 for ; Thu, 19 Oct 2023 17:01:28 +0200 (CEST) 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-yw1-x1134.google.com with SMTP id 00721157ae682-5a7c011e113so107906017b3.1 for ; Thu, 19 Oct 2023 08:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727685; x=1698332485; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=h+67bDOMpd2Kt18oQqVHggtlLTBIDN1D9T8czDuiY3c=; b=qsQHJkMy6/CwLRUL/kfJAIHzTjI65tyZDWYq2mi8tRnqWUZTKUU1Axy9eVc9EA87cu Lc6GlQfMDUjePeT6MCVADNb2S0ISoZDuA83tC99VtrizAUdPxX7ufiWROprvLTQVXYeT bcAcIKuAwZRZ5vKttqgumEIj6znKWFmqX4zGQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727685; x=1698332485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h+67bDOMpd2Kt18oQqVHggtlLTBIDN1D9T8czDuiY3c=; b=ahdXPsLu3kMTZ5m6X4fNnPbEGaCuv8t+Fc0m8c/kXFdhIKpGmv9gXQcKnYw13HzRfo VWIV1EDfqyAmnd0fMx/LyeZkMqfqp9R//36Raf8DnphEYjT+nMWK3c8VyzS9G8bi8cwQ 63Wi7n/e8947vZykQVvmMP3igBh1U2Cyav3Nwcg+UlyDPE7yW3lkWw41d4UkDH9bHSgi J3pnTv3YPFKZV5XIWlbIjNfChnxANntifpj/JqicTcHpv5843Wm/kFwdYs1noPag3RKy e9EeaoJht1NdKEBRVX7yAXevpRrapeaL5zX8nrN3vtHfmRQ9TBZqhUQNFrJXErpcidBl jOVw== X-Gm-Message-State: AOJu0YwMG+9hYH3uzL71e91t5gLRX4ILwS4D4MKdgiltnSsX/INP5CHX IxHtRrkqGI8hqjH50X0JdpNx3EtTAq8gavT7lctC2w== X-Google-Smtp-Source: AGHT+IHbxGZwl7ckc3k5tJgAuWQQNPjc6fYcn1M1SrVzp2jVMxPa9rmKPTITXO6ogE9Vh+L7/tVONQ== X-Received: by 2002:a81:48c4:0:b0:59e:9a44:9db9 with SMTP id v187-20020a8148c4000000b0059e9a449db9mr2403927ywa.26.1697727684631; Thu, 19 Oct 2023 08:01:24 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:23 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 16/24] boot: Move SYS_BOOTM_LEN to be by LEGACY_IMAGE_FORMAT Date: Thu, 19 Oct 2023 11:00:57 -0400 Message-Id: <20231019150105.714407-16-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean This particular option is required for booting all image types, regardless of if we are starting an OS via command line or something else. Move the question for SYS_BOOTM_LEN to be by the question for LEGACY_IMAGE_FORMAT, as that's where our generic OS questions start. Signed-off-by: Tom Rini --- boot/Kconfig | 11 +++++++++++ cmd/Kconfig | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index 88b9296ee1bf..7c92e0974c5f 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -692,6 +692,17 @@ config LEGACY_IMAGE_FORMAT loaded. If a board needs the legacy image format support in this case, enable it here. +config SYS_BOOTM_LEN + hex "Maximum size of a decompresed OS image" + depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ || \ + LEGACY_IMAGE_FORMAT || SPL_LEGACY_IMAGE_FORMAT + default 0x4000000 if PPC || ARM64 + default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7 + default 0x800000 + help + This is the maximum size of the buffer that is used to decompress the OS + image in to if attempting to boot a compressed image. + config SUPPORT_RAW_INITRD bool "Enable raw initrd images" help diff --git a/cmd/Kconfig b/cmd/Kconfig index 872cb49150cc..099ec444ae99 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -361,17 +361,6 @@ config BOOTM_VXWORKS help Support booting VxWorks images via the bootm command. -config SYS_BOOTM_LEN - hex "Maximum size of a decompresed OS image" - depends on CMD_BOOTM || CMD_BOOTI || CMD_BOOTZ || \ - LEGACY_IMAGE_FORMAT || SPL_LEGACY_IMAGE_FORMAT - default 0x4000000 if PPC || ARM64 - default 0x1000000 if X86 || ARCH_MX6 || ARCH_MX7 - default 0x800000 - help - This is the maximum size of the buffer that is used to decompress the OS - image in to, if passing a compressed image to bootm/booti/bootz. - config CMD_BOOTEFI bool "bootefi" depends on EFI_LOADER From patchwork Thu Oct 19 15:00:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851852 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=HzqNj5TA; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9wq5p1rz23jP for ; Fri, 20 Oct 2023 02:04:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC9FB8747F; Thu, 19 Oct 2023 17:01:38 +0200 (CEST) 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="HzqNj5TA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 79E2F8747F; Thu, 19 Oct 2023 17:01:32 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (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 551F287448 for ; Thu, 19 Oct 2023 17:01:28 +0200 (CEST) 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-yw1-x112d.google.com with SMTP id 00721157ae682-59e88a28b98so7912437b3.1 for ; Thu, 19 Oct 2023 08:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727686; x=1698332486; darn=lists.denx.de; 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=O/0n44yy2ftK4uX/Yr0zfrlRSSze7UY5xUsbdhotmXE=; b=HzqNj5TAyG0TR0pO50h/45f6ae2ZmmZZftAHdr2ykcssqp8j0Dw3MnxOjK31oZqMJL Kxgh4mf1qGy9XOLcOHcK1IgtD0V435mJyQEIYDwFdSK5YiKHzhEr6Zcr7y6lpwwUD6b9 ivpzVGTudWaK8ml4h9+Uy2u8dLqGrDqwkr2Zk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727686; x=1698332486; 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=O/0n44yy2ftK4uX/Yr0zfrlRSSze7UY5xUsbdhotmXE=; b=Rl4eSt9qRqIfOANaSJ6t/mZqCtpEC80CvYrec30TJGkBZW+K1LQfyJcXtC218KN5uH CudVx5QHr6cxAh2m2RdFG0cRAeQbFqPQGbPXKO8L0RRQmylCOtADt5AUbNFZfyE7f4Sv RVQXnaQ7OsnTih6d827+evTuhPl9e0FuH/Bzpd3IEobRuWiULc0ov5d4nbyjy2aBR/4b C/jC0MLmT2oA8qDoIGM5WBH5xvlfK6GXaSpGibnrk078ducygXcJbrMH8VoLCb+PX9LR e8dDF83XzPWgw4SFxC0j4oLKSuuYGn3+6BHw8iwa9gQ7RUGj8LRApLG+XN8mAB+9HwRm 8Yjw== X-Gm-Message-State: AOJu0YyM3sC3v6e3EIZpLgFSKuwhhrgKy4iaSt+fwNDJuWHAZDcFvJOn aEmEPRNgoruUWcUIdWh7IfFQ5SpnIcgaD29DUJC9FQ== X-Google-Smtp-Source: AGHT+IGBfdGNiY0x/Rqc0RMM/D/SBy8h0z8arwUY3ftWxCpYt6t9EJl55/iVfaoGxGfQ+OmsxcrBLg== X-Received: by 2002:a05:690c:16:b0:5a7:fcaf:c1c0 with SMTP id bc22-20020a05690c001600b005a7fcafc1c0mr1467217ywb.8.1697727685911; Thu, 19 Oct 2023 08:01:25 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:25 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 17/24] bootmeth_cros: Require bootm.o and bootm_os.o Date: Thu, 19 Oct 2023 11:00:58 -0400 Message-Id: <20231019150105.714407-17-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean In order to use bootmeth_cros, at least on non-X86, we need to be able to start any type of kernel that the "bootm" code paths can handle. Add these objects to the required list for this option. Signed-off-by: Tom Rini --- Cc: Simon Glass --- boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/Makefile b/boot/Makefile index ad608598d298..3fd048bb41ab 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -28,7 +28,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootstd-uclass.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX) += bootmeth_extlinux.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX_PXE) += bootmeth_pxe.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o -obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_CROS) += bootmeth_cros.o +obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_CROS) += bootm.o bootm_os.o bootmeth_cros.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o ifdef CONFIG_$(SPL_TPL_)BOOTSTD_FULL From patchwork Thu Oct 19 15:00:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851853 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=tD0pu8uA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9x44gYkz23jP for ; Fri, 20 Oct 2023 02:04:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6C95487483; Thu, 19 Oct 2023 17:01:39 +0200 (CEST) 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="tD0pu8uA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 815A28743E; Thu, 19 Oct 2023 17:01:32 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) (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 E6C6B8743F for ; Thu, 19 Oct 2023 17:01:28 +0200 (CEST) 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-yw1-x112b.google.com with SMTP id 00721157ae682-5a8ee23f043so690287b3.3 for ; Thu, 19 Oct 2023 08:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727687; x=1698332487; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eXLlsoYApHoieHKD3N+QSEaG6l/MZ3Vt+BjQAeba0wk=; b=tD0pu8uAsB8wRxnoztN1OlVtmvM2YIvBOKQkTzQLfoq42uQ4M7c5q3umLSXF5ks2Wh Qmpd9iF4L4El812gNnAt6pHSzqEn41PGlHU+1DNeE6tLmMyDBO03id3yoNCx2hiBYC0U ZqR3xd+xZZ50aIG4PVgLS2r4LSFQBekgLDfPY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727687; x=1698332487; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eXLlsoYApHoieHKD3N+QSEaG6l/MZ3Vt+BjQAeba0wk=; b=oNJnYjmwR6TEwZzOODfWGY9dRpIWn2OKPBR2SY2SgD7BkZxcbPlgW6kEOrxBTx1+GN 1oJFqDvvfVdypJb88FpDg9Nfk0tBx3nYeij6D3RIoe8SSKY2OHf0Ok7DeEnJVzjcmHM7 SQGCCN2i9ui4PuRI6QHoMYIfkeWJ8k26Qyt8Z5S/+xhKYfNKjXsLn+BqipVfgFk7C2ts urx9PWPCO4OEfCY7ci7fqoZJrxfT3SBWJw4ePe6AyG++4+INHU0PAFdWJlpZThp/Huj1 BI/9Pdyq7rXIHKGuKfSHyQtOq9dmlMHUT+6qithZp5aJc3bLhO3aizBLrAKWE/Tk4xqP 9NgA== X-Gm-Message-State: AOJu0YwBHNePyWaGYgkGWoH3h7+t0qVFiKSFMOUh187+Rio47epf5Ai2 jM9I1fYb6k5zwRpw/okOto1WvpGXtOT8BszayaTrOg== X-Google-Smtp-Source: AGHT+IHHb5lvxYqzrhna46o/rO1CUfycRIoICwrFzh/buij5MYkic/PSc3kDfHl1BNcN/f+6E+51Iw== X-Received: by 2002:a0d:db07:0:b0:5a7:b516:6eab with SMTP id d7-20020a0ddb07000000b005a7b5166eabmr2539726ywe.15.1697727687418; Thu, 19 Oct 2023 08:01:27 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:26 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 18/24] bootmeth_script: Depend on CMDLINE Date: Thu, 19 Oct 2023 11:00:59 -0400 Message-Id: <20231019150105.714407-18-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean As this particular bootmeth requires the command line and assorted commands to function, make sure we have CMDLINE enabled. Signed-off-by: Tom Rini --- boot/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boot/Kconfig b/boot/Kconfig index 7c92e0974c5f..40a04f43ee3d 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -543,7 +543,7 @@ config BOOTMETH_VBE config BOOTMETH_DISTRO bool # Options needed to boot any distro - select BOOTMETH_SCRIPT # E.g. Armbian uses scripts + select BOOTMETH_SCRIPT if CMDLINE # E.g. Armbian uses scripts select BOOTMETH_EXTLINUX # E.g. Debian uses these select BOOTMETH_EXTLINUX_PXE if CMD_PXE && CMD_NET && DM_ETH select BOOTMETH_EFILOADER if CMD_BOOTEFI # E.g. Ubuntu uses this @@ -671,6 +671,7 @@ config BOOTMETH_SANDBOX config BOOTMETH_SCRIPT bool "Bootdev support for U-Boot scripts" default y if BOOTSTD_FULL + depends on CMDLINE select HUSH_PARSER help Enables support for booting a distro via a U-Boot script. This makes From patchwork Thu Oct 19 15:01:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851854 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=jAmZBdLj; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9xN17xjz23jP for ; Fri, 20 Oct 2023 02:04:56 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC4828748B; Thu, 19 Oct 2023 17:01:39 +0200 (CEST) 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="jAmZBdLj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA1EA8743E; Thu, 19 Oct 2023 17:01:32 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) (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 38B958745D for ; Thu, 19 Oct 2023 17:01:30 +0200 (CEST) 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-yw1-x1133.google.com with SMTP id 00721157ae682-5a877e0f0d8so7552767b3.1 for ; Thu, 19 Oct 2023 08:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727688; x=1698332488; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WiEHq7p8aMvtiykxv8utIa5Q8Rliz9M4cSuuKPx2Mrs=; b=jAmZBdLjkyYQxzozGGRm/Ea0HEpWjmKWwfxqCPLhgguQSeN7NqMdLb2Akz1cwbITPH 0futNZ66TfXg47a82pSRY1xBzouMO9L8JcwNLxnr+j4gySuamQpL7RjwcqwjPZ6uFA/X lRILv/6YFCn7n0Yl3XKQ6aodWS4Q9TrS6cMDg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727688; x=1698332488; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WiEHq7p8aMvtiykxv8utIa5Q8Rliz9M4cSuuKPx2Mrs=; b=dcjIgu8vq8qix4BEe9bmF5MfH838N2OAUpvy/qJGOWWoIPezXs8/ZPMZp8SRHXDOCb so3itDMHiIYiuG3NRCrJixcc2YjlbGBzvCWi2uuhBD4mvsy7TiUyjp0hTbDmGeS9mz43 FOBUyt/kfmNCG61FMkToeFjLOytXlTK2hlKASsPSWQomXi5YUFTF/Kbqat+C3m/Er9yf +IvI5LEUehe6s8jNNy2Yydf34XKcx4dTbGynbv5BmhyhVCQpcrhWLZLLLLkgp4YL/ZF3 t+VFaKzp5E6Ralk9brytWwsBLkHex1/wOR7s9NtPWmG+MINUCjmx+M8zrtEzOzpvWivx +axg== X-Gm-Message-State: AOJu0YzinntvaKLJU3CbX7ShTWh2yZdDMTP/BkgatQxaFK82Nf/fqi9F QF87Ue3knkpyf18QKWZbVLfQqNd5xe5rgLlWCq6CuA== X-Google-Smtp-Source: AGHT+IHep1iJh66dfw9JgML2sy1SCauYDOvVyMt0Zh4fpWgEL4R77wvok/1rjjtZm6vOzAevBMjWGQ== X-Received: by 2002:a0d:cb87:0:b0:5a7:be23:296f with SMTP id n129-20020a0dcb87000000b005a7be23296fmr1615721ywd.10.1697727688421; Thu, 19 Oct 2023 08:01:28 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:27 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 19/24] boot: Make preboot and bootcmd require CMDLINE Date: Thu, 19 Oct 2023 11:01:00 -0400 Message-Id: <20231019150105.714407-19-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean In order for a predefined "preboot" or "bootcmd" to be executed by the running system we must have a command line. Add CMDLINE as a dependency. Signed-off-by: Tom Rini --- boot/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boot/Kconfig b/boot/Kconfig index 40a04f43ee3d..fabf6fec2195 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1558,6 +1558,7 @@ config BOOTARGS_SUBST config USE_BOOTCOMMAND bool "Enable a default value for bootcmd" + depends on CMDLINE help Provide a default value for the bootcmd entry in the environment. If autoboot is enabled this is what will be run automatically. Enable @@ -1577,6 +1578,7 @@ config BOOTCOMMAND config USE_PREBOOT bool "Enable preboot" + depends on CMDLINE help When this option is enabled, the existence of the environment variable "preboot" will be checked immediately before starting the From patchwork Thu Oct 19 15:01:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851855 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=J9+5wNU4; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9xg6yZ2z20cx for ; Fri, 20 Oct 2023 02:05:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 50D398748F; Thu, 19 Oct 2023 17:01:40 +0200 (CEST) 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="J9+5wNU4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A342587259; Thu, 19 Oct 2023 17:01:35 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) (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 7DCAE87470 for ; Thu, 19 Oct 2023 17:01:31 +0200 (CEST) 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-yw1-x112f.google.com with SMTP id 00721157ae682-5a7db1f864bso96482937b3.3 for ; Thu, 19 Oct 2023 08:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727690; x=1698332490; darn=lists.denx.de; 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=OGwZJoiurMToJUJJt1ZwY8XyW3B/TxGPwTs7HXCJRPI=; b=J9+5wNU4YvSnZ/d+1MkdbclqW7oUZ3c+r7NA1BzsaZ9++/UizOSe/BJUMpl9jF+AXF ENck1V1DwdRpx9fStU1PZAoImM0eauldX3m+gtDipUEiEAgQyTTtoIfTWNU3DwaGyHKH r3j2cBXj6CWVDBU27TnS05YrcrUdlMhueYZDg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727690; x=1698332490; 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=OGwZJoiurMToJUJJt1ZwY8XyW3B/TxGPwTs7HXCJRPI=; b=muSbdYQVXESiZRkjcrjezYVORsfneXWVEdYbfnqrdr6F6DsqMKf0bWPDvia9cIZ+so 4clVOWihzCaTvzcHLFRK/pYGcDzT75MjXpenCcEtBX++Y1lo4QfBguqOR446WI3TyQTU STnnzilPEa5XrlWTVh5n3Ctgytwy4tsaFlkS8AHQRloLhbWroisVcQi8qaNi1YagQ+8/ Yyhr7tgvE4uwDOaUJf+sbdMojt/mqOcxCojrXumHJovSYWdgbDhLGiiSMEbG3NgSKD82 CNUv/1Qv232JS1pcvV3sLGFxf6hx8Z2Qu62s+dzRE3givaBUp/xZxOxKt8IA2J7MUs6+ 484A== X-Gm-Message-State: AOJu0Yz6SePgzhgZIN9icKdqWNPA/53CrQWbdMdNUX1jigBSx+W+3Ble AJwQ4VeajkNGqqu1bSyRupZy/4Mvb994teG+AnX42g== X-Google-Smtp-Source: AGHT+IFmkYQsQ6z3+jtwboCgPyWfddZDLjaX4XErMhsytYl0nv10XNA7BAhjDkAXgwzl6UghgbnGGw== X-Received: by 2002:a0d:eb03:0:b0:5a2:20ec:40be with SMTP id u3-20020a0deb03000000b005a220ec40bemr2698838ywe.29.1697727689844; Thu, 19 Oct 2023 08:01:29 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:28 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 20/24] cmd: Make most commands depend on CMDLINE Date: Thu, 19 Oct 2023 11:01:01 -0400 Message-Id: <20231019150105.714407-20-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass If we disable CMDLINE then we should not ask about enabling the hush parser nor any of the commands that would be run on the command line as it is no longer available. Convert the CMDLINE option into a menuconfig and make every command referenced under cmd/Kconfig depend on it. This leaves as future work moving the commands that are not under the cmd/ hierarchy as future work. Signed-off-by: Simon Glass Signed-off-by: Tom Rini --- Changes in v4: - Reword the commit message slightly. - Make this not depend on other patches --- Makefile | 2 +- cmd/Kconfig | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index e0040a40d330..969f3f74a74d 100644 --- a/Makefile +++ b/Makefile @@ -851,7 +851,7 @@ HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makef libs-$(CONFIG_API) += api/ libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ libs-y += boot/ -libs-y += cmd/ +libs-$(CONFIG_CMDLINE) += cmd/ libs-y += common/ libs-$(CONFIG_OF_EMBED) += dts/ libs-y += env/ diff --git a/cmd/Kconfig b/cmd/Kconfig index 099ec444ae99..91297cb53f9a 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1,7 +1,5 @@ -menu "Command line interface" - -config CMDLINE - bool "Support U-Boot commands" +menuconfig CMDLINE + bool "Command line interface" default y help Enable U-Boot's command-line functions. This provides a means @@ -11,9 +9,10 @@ config CMDLINE Depending on the number of commands enabled, this can add substantially to the size of U-Boot. +if CMDLINE + config HUSH_PARSER bool "Use hush shell" - depends on CMDLINE help This option enables the "hush" shell (from Busybox) as command line interpreter, thus enabling powerful command line syntax like @@ -25,7 +24,6 @@ config HUSH_PARSER config CMDLINE_EDITING bool "Enable command line editing" - depends on CMDLINE default y help Enable editing and History functions for interactive command line @@ -40,15 +38,13 @@ config CMDLINE_PS_SUPPORT config AUTO_COMPLETE bool "Enable auto complete using TAB" - depends on CMDLINE default y help Enable auto completion of commands using TAB. config SYS_LONGHELP bool "Enable long help messages" - depends on CMDLINE - default y if CMDLINE + default y help Defined when you want long help messages included Do not set this option when short of memory. @@ -77,8 +73,7 @@ config SYS_MAXARGS config SYS_XTRACE bool "Command execution tracer" - depends on CMDLINE - default y if CMDLINE + default y help This option enables the possiblity to print all commands before executing them and after all variables are evaluated (similar @@ -2872,4 +2867,5 @@ config CMD_MESON default y help Enable useful commands for the Meson Soc family developed by Amlogic Inc. -endmenu + +endif From patchwork Thu Oct 19 15:01:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851856 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=YhOh/GZA; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9y01LF9z20cx for ; Fri, 20 Oct 2023 02:05:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D9B0687495; Thu, 19 Oct 2023 17:01:40 +0200 (CEST) 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="YhOh/GZA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C54DF8743C; Thu, 19 Oct 2023 17:01:36 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) (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 B15DD87454 for ; Thu, 19 Oct 2023 17:01:32 +0200 (CEST) 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-yw1-x112f.google.com with SMTP id 00721157ae682-5a7dafb659cso99013607b3.0 for ; Thu, 19 Oct 2023 08:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727691; x=1698332491; darn=lists.denx.de; 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=AirJw0cDDMZ+s+9xPvxHuqKBNLqNBaZF0XDHiCvDU1w=; b=YhOh/GZAXxVGJJ/JhOiT2Zlfq16Ow6uUCQ5rw+/Ij2As7wWQXCJT0VBwzUG8Fe36lY +6AQI1PNh9BYrL9ULfebGC+kq7E0FNVxieTYAfLTWSUIRIrVpznx4O4WCcFTrANsHNzH jMnMaHuCWtT31uhx2Fk1usoCm9QJdd+0EjKyU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727691; x=1698332491; 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=AirJw0cDDMZ+s+9xPvxHuqKBNLqNBaZF0XDHiCvDU1w=; b=rghZBtdz3Ia6J2UnOQ1jMeQxX7yIXasWnPn/HZnZ7xfZiQlM82jjmmadwgEGdDS4lL MDSSXbyhmy6wd8ThBE000+QbQsr7ulcwc+8oCMBlE8Hz5w6Z/71RCvyyhAd5HS4DSfXq GSlRcqjruH7rfkc7Ws+6IN9O6wDLWnMshpQ5JT8IvYFzENGj+Blirq5aMHjmtjp/WMUI l/nfWM/UlrjdLkfPOZDMEJXjUvI06gAxMtTqijQH2LY7/lrTuxLG3VExFK06Acd8b5zz bkzHu4PKp3C+gWNNCvHDBZCikgxgU336vJ7l1AzrufhAN7GHFbGa0h59nIclc7Zse3FM XqJw== X-Gm-Message-State: AOJu0Yw9Nl4eYNafJxYN5LqfUUHTRnAYd65P5d/d6RtwI3YiwULrq497 5lLABpWfnJbelAiCItOIOsBQlcoG2aKV4ZyK7qFj9Q== X-Google-Smtp-Source: AGHT+IEG8ikGtHzm9JH3aZTb+d0pMr14IDTfQqIS8YLl9S16zNvC7wIRNLTKNR7NAvEpGEDxYdKR2w== X-Received: by 2002:a05:690c:ece:b0:5a7:bfbf:691d with SMTP id cs14-20020a05690c0ece00b005a7bfbf691dmr3195190ywb.42.1697727691088; Thu, 19 Oct 2023 08:01:31 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:30 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 21/24] sandbox: Disable CONFIG_DISTRO_DEFAULTS Date: Thu, 19 Oct 2023 11:01:02 -0400 Message-Id: <20231019150105.714407-21-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass This is not used for sandbox, so drop it. Enable the things that it controls to avoid dstrastic changes in the config settings for sandbox builds. The end result is that these are enabled: BOOTMETH_DISTRO BOOTSTD_DEFAULTS and these are disabled: USE_BOOTCOMMAND BOOTCOMMAND (was "run distro_bootcmd") DISTRO_DEFAULTS Note that the tools-only build has already disabled DISTRO_DEFAULTS and BOOTSTD_FULL Signed-off-by: Simon Glass Signed-off-by: Tom Rini --- Changes in v4: - Only modify sandbox and restrict the changes to only DISTRO_DEFAULTS --- arch/Kconfig | 3 +++ configs/sandbox64_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/sandbox_flattree_defconfig | 1 - configs/sandbox_noinst_defconfig | 1 - configs/sandbox_spl_defconfig | 1 - configs/sandbox_vpl_defconfig | 1 - 7 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 19f2891ba1c5..edfa3f7f83aa 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -208,6 +208,9 @@ config SANDBOX imply PHYSMEM imply GENERATE_ACPI_TABLE imply BINMAN + imply BOOTSTD_DEFAULTS if BOOTSTD_FULL && CMDLINE + imply BOOTMETH_DISTRO if BOOTSTD_FULL && CMDLINE + imply CMD_SYSBOOT if BOOTSTD_FULL config SH bool "SuperH architecture" diff --git a/configs/sandbox64_defconfig b/configs/sandbox64_defconfig index 1a033b22018b..ff895b930170 100644 --- a/configs/sandbox64_defconfig +++ b/configs/sandbox64_defconfig @@ -14,7 +14,6 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_LEGACY_IMAGE_FORMAT=y -CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_FDT=y diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 47417cb0391d..5230b81be2c4 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -14,7 +14,6 @@ CONFIG_FIT_RSASSA_PSS=y CONFIG_FIT_CIPHER=y CONFIG_FIT_VERBOSE=y CONFIG_LEGACY_IMAGE_FORMAT=y -CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_FDT=y diff --git a/configs/sandbox_flattree_defconfig b/configs/sandbox_flattree_defconfig index 29ae4532c508..8df2a82c521c 100644 --- a/configs/sandbox_flattree_defconfig +++ b/configs/sandbox_flattree_defconfig @@ -12,7 +12,6 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_LEGACY_IMAGE_FORMAT=y -CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_FDT=y diff --git a/configs/sandbox_noinst_defconfig b/configs/sandbox_noinst_defconfig index db05e6308329..44e55f4452f3 100644 --- a/configs/sandbox_noinst_defconfig +++ b/configs/sandbox_noinst_defconfig @@ -25,7 +25,6 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y -CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_FDT=y diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index 56072b15ad2d..015e0a59d085 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -20,7 +20,6 @@ CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y -CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_FDT=y diff --git a/configs/sandbox_vpl_defconfig b/configs/sandbox_vpl_defconfig index 5bd0281796d4..9935575352b2 100644 --- a/configs/sandbox_vpl_defconfig +++ b/configs/sandbox_vpl_defconfig @@ -27,7 +27,6 @@ CONFIG_FIT=y CONFIG_FIT_VERBOSE=y CONFIG_FIT_BEST_MATCH=y CONFIG_SPL_LOAD_FIT=y -CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y CONFIG_BOOTSTAGE_FDT=y From patchwork Thu Oct 19 15:01:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851857 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=gHgD9wQV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9yD2TtWz20cx for ; Fri, 20 Oct 2023 02:05:40 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4A1C58749B; Thu, 19 Oct 2023 17:01:44 +0200 (CEST) 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="gHgD9wQV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E141B87468; Thu, 19 Oct 2023 17:01:37 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (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 D623587259 for ; Thu, 19 Oct 2023 17:01:35 +0200 (CEST) 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-yw1-x112d.google.com with SMTP id 00721157ae682-5a81ab75f21so82750737b3.2 for ; Thu, 19 Oct 2023 08:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727692; x=1698332492; darn=lists.denx.de; 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=7dee0lhKBvxSuK2Y6NxF2rMok8KADIY6PR9/OQAsJ18=; b=gHgD9wQVKZaDwFA4HvqwZ634RYdZDz6GiyWRYJGNBwwl5r1KLScP3f+gncHTFxQoLc go5BnkiUoEwk2AsEXCobZiw1WI6yLzvmarpESvSbf5Kgcg+F9GZguhR0sytTV5leGoDT KjvQcbL7cikkbTE2W5UWwC3JmC5IytM/g0oiQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727692; x=1698332492; 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=7dee0lhKBvxSuK2Y6NxF2rMok8KADIY6PR9/OQAsJ18=; b=oKaczRNwATv1MxotyOPsFRbQF+jeZWXslt7eAnr3QubPk57xZzJI4lrrwrKarnwuhj wo8rWbEIOWeJ5ux3u8N0GxAQS8XVVgr8psrfMV8psP5j8eti/wyrOCm6xNtWPgc2hTRH Xqycqa5CtVLixmxuYxVzXBENV6grpyjuQTWuBYkeOn/+eboIX3PXofETp8CC+c8LDUD0 T6YK9+EjEd1w+GUQgHH4s+ztqQr69G0v2Iq92z7QCvuhnnQ6I0ThHy0RhqRUFI5Ljc/v qvXIx28mm97R26YiImiEENZl7qxAC2Td2GRByB8d3cSka31CfyQy7naVokiLUsAg2qTZ 07lA== X-Gm-Message-State: AOJu0YxmWEDgP9R0h3NSR/ox4EIM22GdM2SpjhZvY9CNpm7bLI9jhPE0 6w6wVTvKB+9f+OcWDML8ZFfLeHbFY/2btFDrWmR5qw== X-Google-Smtp-Source: AGHT+IGmXm4vRdq4VgH6ruIFwqaL2o2ilSBTTVuSwGqS4/9RwX2uK3zZ99IdHXFvL+OT8X/q00oP5g== X-Received: by 2002:a0d:cc97:0:b0:5a7:c906:14f with SMTP id o145-20020a0dcc97000000b005a7c906014fmr2489656ywd.11.1697727692489; Thu, 19 Oct 2023 08:01:32 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:31 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [v4 22/24] sandbox: Avoid requiring CMDLINE Date: Thu, 19 Oct 2023 11:01:03 -0400 Message-Id: <20231019150105.714407-22-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean From: Simon Glass Add some dependencies on features that we had been selecting so that we can still disable CMDLINE. Signed-off-by: Simon Glass Signed-off-by: Tom Rini --- Changes in v4: - Reword the commit slightly (Tom) - Rework overall to select if CMDLINE Changes in v3: - Reorder the Kconfig options a little --- arch/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index edfa3f7f83aa..78727050aecd 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -134,7 +134,7 @@ config SANDBOX select ARCH_SUPPORTS_LTO select BOARD_LATE_INIT select BZIP2 - select CMD_POWEROFF + select CMD_POWEROFF if CMDLINE select DM select DM_EVENT select DM_FUZZING_ENGINE @@ -152,10 +152,10 @@ config SANDBOX select PCI_ENDPOINT select SPI select SUPPORT_OF_CONTROL - select SYSRESET_CMD_POWEROFF + select SYSRESET_CMD_POWEROFF if CMD_POWEROFF select SYS_CACHE_SHIFT_4 select IRQ - select SUPPORT_EXTENSION_SCAN + select SUPPORT_EXTENSION_SCAN if CMDLINE select SUPPORT_ACPI imply BITREVERSE select BLOBLIST From patchwork Thu Oct 19 15:01:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851858 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=AbD8HHNi; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9yT73LLz20cx for ; Fri, 20 Oct 2023 02:05:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B45FA874A0; Thu, 19 Oct 2023 17:01:44 +0200 (CEST) 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="AbD8HHNi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 16AAA87469; Thu, 19 Oct 2023 17:01:38 +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.1 required=5.0 tests=BAYES_00,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-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (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 1BAA887448 for ; Thu, 19 Oct 2023 17:01:36 +0200 (CEST) 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-yw1-x112d.google.com with SMTP id 00721157ae682-5a7d9d357faso100896057b3.0 for ; Thu, 19 Oct 2023 08:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727694; x=1698332494; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xILpf6KPxsL3IgN6tZhzvuTRItvF6seW2sbxi9L5UqE=; b=AbD8HHNi74m8klqUbZRs/2MJNzo9w/DKAs1+wY7APw0SWecCsxK5sMJANJwoEpWVXd u3+EUtLT5w8X7bbXKQ4EdXVMFVpodmeoi1OhUqsKQ/CN0+x1cjS6WuuvnzLXE96m/ISu PVfgR8PI9/Ido2CyGc/3hG4Py9pdKgSxUwfNs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727694; x=1698332494; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xILpf6KPxsL3IgN6tZhzvuTRItvF6seW2sbxi9L5UqE=; b=wzuAEBICm9Faf2ERg+IGujW0poiOaEGcEWTWfJGrkaq4KcTJrDOouEVAR2LBdcqUVO VPqJurdBv8Bcchq1sxLrozYYlEJzGseAP/Faq9Hwgr4S2hgrvdsTraV8gESyo61YSg56 LrTZNYmhpwQ28uaPJh6knawMz0EIqHUdfUQ+hBWUOauyEt2xqx/HDIizvnXzX9imn0fz ICCoebixQE9amopMeR8xV7q0ppTkhgYFaD75RUqzQHxrr57PU4mw6cuMR4p6joOiHmTK m9u5lsCGiOEAyghHqzQphv+oBVdDJiDdDgDoh0TrkCgN6ImigV9L2p4ipTB6/q7PtKL2 zVxw== X-Gm-Message-State: AOJu0Yy43nAF3QAEfA/LDx6vDd3SOOJoJazZHRCX7nPANhMMkS4+ch2y zlpSt5Flxl8NVlDP5HkxQvCENkBz3D0c/8HiC4/uag== X-Google-Smtp-Source: AGHT+IHqj0lAVxmbHnGFyPuzYbtFI3z/pJhaUaSLf886N0vujvkxW2N/ABINrMYIeTFSvJZhbRTjSA== X-Received: by 2002:a81:4708:0:b0:571:11ea:b2dd with SMTP id u8-20020a814708000000b0057111eab2ddmr2766977ywa.32.1697727693756; Thu, 19 Oct 2023 08:01:33 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:32 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [v4 23/24] sandbox: Add Date: Thu, 19 Oct 2023 11:01:04 -0400 Message-Id: <20231019150105.714407-23-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Add a mostly empty asm/barrier.h file for sandbox where we define nop() to be an empty function. Signed-off-by: Tom Rini Reviewed-by: Sean Anderson --- arch/sandbox/include/asm/barrier.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 arch/sandbox/include/asm/barrier.h diff --git a/arch/sandbox/include/asm/barrier.h b/arch/sandbox/include/asm/barrier.h new file mode 100644 index 000000000000..0928a78cbf8b --- /dev/null +++ b/arch/sandbox/include/asm/barrier.h @@ -0,0 +1,3 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#define nop() From patchwork Thu Oct 19 15:01:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1851859 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; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.a=rsa-sha256 header.s=google header.b=QYay4v1o; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SB9yl01pPz20cx for ; Fri, 20 Oct 2023 02:06:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 18830874A4; Thu, 19 Oct 2023 17:01:45 +0200 (CEST) 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="QYay4v1o"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D6EB387477; Thu, 19 Oct 2023 17:01:38 +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.1 required=5.0 tests=BAYES_00,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-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) (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 A049387441 for ; Thu, 19 Oct 2023 17:01:36 +0200 (CEST) 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-yw1-x1132.google.com with SMTP id 00721157ae682-5a7dd65052aso108458067b3.0 for ; Thu, 19 Oct 2023 08:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1697727695; x=1698332495; darn=lists.denx.de; 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=fE6C55oYab3ouRm0gE7cCPJyay94jmpJf5B5CLeG+7w=; b=QYay4v1oW5Xn4N98wnxEy34olJSUjMgC3AHtnVcerY59iax/NCrHGCYc45rwvxirMw 8gcaOLTQyhu68Pn3rl7IeG7WHFUOe9Vw2vaWY+zvpibx9f9KZG2VzyWfO+OBvcUo9JKI wYvV84KCREqkQaHGCJXuL6Y2yChuNOqlR9WfA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697727695; x=1698332495; 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=fE6C55oYab3ouRm0gE7cCPJyay94jmpJf5B5CLeG+7w=; b=wtIa5nQsiz0yDuH5OUFGmxT2T7qXY47Rp66ytwCMIpdZV5BaxxQDB0hsRLm/NXt2kP ESzDbA39h8FAZTzXCq0qUUbKeP7whpzrsRNgbalWpuFKS2khhosVRmQG8YtlsD6vxjNV CQLVSPavqr9FxY4nSSN5mrtLQ9LxJ8hkIrdpVse5dwuvieCW/uAkOw6tX2O6tbG7s9mE YNa18dq6iI6RdH5VdGWc5/En7dh1W7zes3tNkoYHwyvOnMmy9F/UuZ3bx/c5ha68TSJf skwiQJO8oZtdMIxA/UkWSB+sA7t8WIYPmvl7p37TjY55OaTupzozfff7jQa1B1tkmjT+ Fa6g== X-Gm-Message-State: AOJu0YzAEPk+wmzz/NOF0eRq84o+M7zNscF5vnPMylIbctmlNC82KI7Q Mu9ST/tn9LpwzQ20Ylv5P4+nG9xQeQNtoguD/s72+g== X-Google-Smtp-Source: AGHT+IEB7rAf8f5x+ooWCy8hbQKTvMfTYQU74D9vcuL3WcDmBeC7wFx2WNM0PYN1Ph8V4HlKnNzdKg== X-Received: by 2002:a0d:d514:0:b0:5a7:bbd1:ec1d with SMTP id x20-20020a0dd514000000b005a7bbd1ec1dmr2667423ywd.17.1697727694999; Thu, 19 Oct 2023 08:01:34 -0700 (PDT) Received: from bill-the-cat.tail58a08.ts.net (2603-6081-7b00-6400-0000-0000-0000-0f48.res6.spectrum.com. [2603:6081:7b00:6400::f48]) by smtp.gmail.com with ESMTPSA id c11-20020a814e0b000000b005a7c35a1396sm2475077ywb.29.2023.10.19.08.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 08:01:34 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Sean Anderson Subject: [v4 24/24] clk_k210.c: Clean up how we handle nop Date: Thu, 19 Oct 2023 11:01:05 -0400 Message-Id: <20231019150105.714407-24-trini@konsulko.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019150105.714407-1-trini@konsulko.com> References: <20231019150105.714407-1-trini@konsulko.com> 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.8 at phobos.denx.de X-Virus-Status: Clean Now that sandbox has and defines nop() there we should include that in our driver for clarity and then remove our local nop() from . Signed-off-by: Tom Rini Reviewed-by: Sean Anderson --- I can see that our ARM should be and updated in a few other ways to match how the kernel is currently. This is not a big deal yet as this driver is only for sandbox for risc-v Cc: Sean Anderson --- drivers/clk/clk_k210.c | 1 + include/k210/pll.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/clk_k210.c b/drivers/clk/clk_k210.c index c534cc07e092..b9469b93853b 100644 --- a/drivers/clk/clk_k210.c +++ b/drivers/clk/clk_k210.c @@ -16,6 +16,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/include/k210/pll.h b/include/k210/pll.h index fd16a89cb203..175c47f6f233 100644 --- a/include/k210/pll.h +++ b/include/k210/pll.h @@ -16,9 +16,6 @@ struct k210_pll_config { #ifdef CONFIG_UNIT_TEST TEST_STATIC int k210_pll_calc_config(u32 rate, u32 rate_in, struct k210_pll_config *best); -#ifndef nop -#define nop() -#endif #endif #endif /* K210_PLL_H */