From patchwork Tue Sep 10 10:27:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 826967 Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp227793wrc; Tue, 10 Sep 2024 03:28:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVaTNyz9KxpxGO0x7sQ47drT43I31pvA5B2x2iWBlZ/jmoEK3pVwVPWrVS/q3jvJi0C6VgncQ==@linaro.org X-Google-Smtp-Source: AGHT+IG4GFZZzLN91NfLFNGsz/yrVGMnEkf4RmneNgfBbnauaMCa1Uzu4DPpIr14Ll/CxbSVeFE3 X-Received: by 2002:a05:600c:511e:b0:42c:b9a5:bd95 with SMTP id 5b1f17b1804b1-42cb9a5c02cmr49315395e9.0.1725964101316; Tue, 10 Sep 2024 03:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725964101; cv=none; d=google.com; s=arc-20240605; b=kPnFl0DNbBRo1aYSywIqQcH7s68pNDN118QX/ju1J/inmBUOGdhLAGRFeXAFpbEJm6 3uTW/RExjySSLrBnqovr3ah7l5BTdcHZV/ThTfQDt1OO0vOe2cKjcZ7zZS63rcSf+c6Y xMCx7zARAkR+u/Qqww4j2ZkO5eLUawcw2a+enzgdjMhqIYdkxbBAAPgF4//a3I29dc4l LsFZD3xvy8qjuqaaPeLqmSd0S1i6oe9ykDFoBn11FF3VX/+G6RXzkSCnHsasD8FoTJqC JNGLrrRMrWjxJscqUE7zV7Tei3fciRL6G+OkpKFJotVYegyLi9ssqvk0y8fjD93WHfwR L5jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=wARXaWg6tLzBmXUfjS8MpABU+wrXkhyqtt5xJ/UdxsU=; fh=4x2LETilBTbAp5zctaF6z/bSorfMk7AVBnXy596hrnA=; b=gEEvJvHVWZk/5F6IYvazTN03Ut6uKhs8RYsnqZKCJSzrYBEpXJ1b4bQvlgGaon4lCg kDSOBE54ls/1cvdP5XU9uPvNktVXXm49itLtzE7gZTd7UpkjZza04FzRBj38aEbRxyHs oNLo/SpIRYxU1uI26X4yDfh+bhtKkBC4RkKLpTQTyQR373IdxufXMkGaSbGRQlYWfYIR xMShcz6Kcy0SMK2Xss7XeJCU855UCA0akd0o/66GOKx4p6hQJ93hQy+cI1wms0Jwus+E /SJG2A1bwMxdzjbdrVjO/snbsvL1y+eT6lo2OS9itDo7dor+qXqlhFmLvT4xfQ7oUu2c 9yAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lj8e7XBh; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id ffacd0b85a97d-378956b7631si3101481f8f.501.2024.09.10.03.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 03:28:21 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lj8e7XBh; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2B7A289017; Tue, 10 Sep 2024 12:28:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="lj8e7XBh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4F46989017; Tue, 10 Sep 2024 12:28:19 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 674598901C for ; Tue, 10 Sep 2024 12:28:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jerome.forissier@linaro.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-42cb57f8b41so28401465e9.0 for ; Tue, 10 Sep 2024 03:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725964094; x=1726568894; 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=wARXaWg6tLzBmXUfjS8MpABU+wrXkhyqtt5xJ/UdxsU=; b=lj8e7XBhc4u/u+zspvDslLLDXsBfGr9ntiJW/Ug5cP9epF+TwQ+hdEBTxN9NsZfajl HUMNz5Puj2qFU+HCwVxUKh5XeGe+eT4a8v4OSdoKXGniOlE4Vu7XcQpH2OJhrFKTOHc1 M+uF5hN+YIP/kQ+rZVJg5y0Vo1PoI4yTo3gcG7XVbeELicU5OsTxX1vXbtCjLZuXJQBt MBRDNiXgHZcnTQP82hYhXNFrBMQJkqh9fpMdQoMQcIuaIuh7OEfVQ4XCrIPM05lViQlY 10m2CYD5AgUpHhPdEkwnhN+7y2+NtLdiW4c9rJjYDPBjsTgpv28BQBeV09f7nwh2JHLQ 9bLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725964094; x=1726568894; 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=wARXaWg6tLzBmXUfjS8MpABU+wrXkhyqtt5xJ/UdxsU=; b=AU55cb6ibQ5t6ECfUgXnFBhBiNuvz1CXLgeloTzH4NXeaQpPfCkezdCfWmOttghru9 RrG9UtRJoIImZ/ubKt0iUVLsW+hUonOZvtLRqwwsW8PA/TAfielhniAdxttjpFxzJ2Ni xZy8WQFH/pNmjamlRMV04ijjjgGPfApa5afR6ds839K9PGMohUb3CVUgfanZ1FZ7e6fH MAQOi6P4zRDzSt7sEBiYv65ilXZuvWO28y/OmzMDtAYVjqFrxOXfNmzRGnqWxuoBmdSk J1JzjZFXTim5MkuJ2vhbndzV+qITRcMndyOoZ0JzmvzzmsrqTcVrglfhZ3RHDCqCkh5J h9DA== X-Gm-Message-State: AOJu0YxzR2vK0Io8XqgWMTpKnZXb7krpYj0L4CmKMdl3K7sm36tPqWr4 ivDmyJgGmECGTKr1y4Sp2WcmNdJmTUkk6be/Iq4iRC4UV2npxDJdyA484Tn4DyWHomN/1cEGO5v rEzbkSQ== X-Received: by 2002:a05:600c:605a:b0:42c:af5f:c00c with SMTP id 5b1f17b1804b1-42caf5fc0b6mr99240155e9.21.1725964094232; Tue, 10 Sep 2024 03:28:14 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:d022:7718:6b27:6851]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956652ddsm8549593f8f.29.2024.09.10.03.28.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2024 03:28:13 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Jerome Forissier , Lukasz Majewski , Mattijs Korpershoek , Tom Rini , Marek Vasut , Heinrich Schuchardt , Jaehoon Chung , Jonas Karlman , Miquel Raynal Subject: [PATCH] dfu: fix Kconfig dependencies Date: Tue, 10 Sep 2024 12:27:50 +0200 Message-Id: <20240910102751.3182982-1-jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.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 Fix link errors caused by missing Kconfig dependencies: 1. DFU_OVER_USB compiles common/dfu.c which calls g_dnl_clear_detach() which is implemented in drivers/usb/gadget/g_dnl.c which needs USB_GADGET_DOWNLOAD. Test case: $ printf "CONFIG_USB_GADGET_DOWNLOAD=n\nCONFIG_USB_FUNCTION_FASTBOOT=n" \ >>configs/am62px_evm_a53_defconfig $ make am62px_evm_a53_defconfig $ make CROSS_COMPILE=aarch64-linux-gnu- [...] common/dfu.c:34:(.text.run_usb_dnl_gadget+0x68): undefined reference to `g_dnl_clear_detach [...] 2. With the above fixed, the same build causes: common/spl/spl_dfu.c:29:(.text.spl_dfu_cmd+0xb0): undefined reference to `run_usb_dnl_gadget' This is because SPL_DFU compiles common/spl/spl_dfu.c which calls run_usb_dnl_gadget() which is implemented in common/dfu.c which needs DFU_OVER_USB. Therefore add these dependencies to Kconfig. Signed-off-by: Jerome Forissier Reviewed-by: Marek Vasut Reviewed-by: Mattijs Korpershoek Reviewed-by: Ilias Apalodimas --- drivers/dfu/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index d034b501360..604386bb734 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -7,7 +7,7 @@ config DFU config DFU_OVER_USB bool select HASH - depends on USB_GADGET + depends on USB_GADGET_DOWNLOAD config DFU_OVER_TFTP bool diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 03fe3bca197..9921d3e0a77 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -323,6 +323,7 @@ config SPL_DFU bool "Support DFU (Device Firmware Upgrade) in SPL" select SPL_HASH select SPL_DFU_NO_RESET + depends on DFU_OVER_USB depends on SPL_RAM_SUPPORT help This feature enables the DFU (Device Firmware Upgrade) in SPL with