From patchwork Fri Aug 23 13:48:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821705 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386126wrh; Fri, 23 Aug 2024 06:49:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwryDbiykVI8SscKXd4NJObU09uOylhmIzD0RFVu9ZhF00Zd35t+ft7iiyAhECa9hmkwypOg==@linaro.org X-Google-Smtp-Source: AGHT+IG5NjiVQOmKR75LR17UEJtZH/20HHPTEgOdjZUwhWehvAjUJsx9cKoGtBtEFSDIlJ2ezcpm X-Received: by 2002:a5d:494d:0:b0:371:8341:d589 with SMTP id ffacd0b85a97d-3731187e2e3mr1575778f8f.12.1724420956411; Fri, 23 Aug 2024 06:49:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724420956; cv=none; d=google.com; s=arc-20160816; b=TvW7wpLftOPGuOzMn/GtbCKJBNIeQ78gvC9cHH2CP+Z3H9It2Xk6KmQ38D3E2Aipyg TaS/g5iLmh7I/TVzM40n0+bgWQgygZyBpal0Ps9WctILRJPQpJCksb9pdQhqfPigDU0c WHLI8jrsDmef7fKbHoZI2FBvWNW7ot4lo5sKPCyvdlXQ+787jATWr1u1fKoIQrSq1syd I0QEMYk3V97jiYryCfMSydAlpKEk2CmBI3Ceygit33pCO+4Tto9n80oxrxZz9Gfvb4V8 apMrNpOH3tZnUFzjtCUziLPKrqYrZydfjj1EzxZlngvM4H3Iq6jngo5i6CMNybMqblYb W7Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uOTQNZd1OFEvNEscEUawarENuiq+pq1NNlw8zoOJclY=; fh=TPR6V1FWUdiJK6ron/xUL0r/YP9P50xSS2b+6aCLTvI=; b=mVkMmnC3VP00fzBPu9Qk5A/jeIG38C8WJWesLXfJTeUIJbg7SyhkUQ4Vlq8Oh/sgPR Ra1YC6YwK2PMFZfj4xmDkS8AZxXYjVYEKWmCbNzRY528/c/iMOg98iavMl63RPA/f5L4 KYOlhyPqVZ1n4WKL4b/TyZBtc3mSOxsei0o3RA0EnNpBfVsbfJqr/gjLX0KAJf3VU25Q ALGduNZmB+943PUOGMMOAHdFbpO1GaAQexuteW5QX7tOOi3CKaFO9vqIqnDQcapVHXFR +CVJDVHwgDuM7cS/5hhq5CXV+cCDAOjmstU+MhnuLL6Wd1vcIu6xoAgngRwrn76qpIz3 qV4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yx8CXJAI; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-373082ad018si1459138f8f.1031.2024.08.23.06.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:16 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yx8CXJAI; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 269B5889B4; Fri, 23 Aug 2024 15:49:15 +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="yx8CXJAI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8F71E88965; Fri, 23 Aug 2024 15:49:13 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 A895588722 for ; Fri, 23 Aug 2024 15:49:11 +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-x32f.google.com with SMTP id 5b1f17b1804b1-428243f928cso16093315e9.3 for ; Fri, 23 Aug 2024 06:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420951; x=1725025751; 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=uOTQNZd1OFEvNEscEUawarENuiq+pq1NNlw8zoOJclY=; b=yx8CXJAIb3C4gGVxKqMrP0RS2ux5YhZ9vMzIe19d6z1UuexJBLhoC4JqTCTLoWnjtP 9AGaQ2XyikYsFF5qiSHOgTRPhK54d2ZSHvErUjvWZade5Vpc1RJkKBgdi+Nh4okrNCIq 5w5Qb+1JSMOqk3e3mD9VzDczzL5KtyKv8HYZJvyRHZ9wNtwW81Oy5INGaIndJio34tAQ 5QJ3fH4YpyVxSE5wEa6NPIkJVkBESELQd4Nw28sByMOwYW2rpKS3gMRAtuyOn0Yd6sCE l2orBFLYQhmuGpgVxn06TZvECDjKIPoWOABlVizGQQnHmjKPEBCobUMDj23ysgGAl5Ta k7kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420951; x=1725025751; 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=uOTQNZd1OFEvNEscEUawarENuiq+pq1NNlw8zoOJclY=; b=H1qIV7yTgowO+rkAfrgDqLFaGod+PbDtVzv+zCmY66EJkToUnLB1zUxlj1iniTOrwL OGroqGjq5gpylcQejrocV42F3p76lYZTXu7tNkA2dTrvf9v4qeRcW+eXzb87CCUPGq1T r+sRge/l5tcUqU4DivVEs5m46L3daSLacknks+Zv5u+twzcycYPmeUDiDo75rX+l2bPQ cqFcmE36UyzY5hiXbF1mre8jaWvA9rzE5K6pVqgpiejgaMT7o1m/UdM3vGRdLm8FuHAT stiItH4FIwHzzPfTky5iMNc3F+0pZblil8uYMF2NGOZPb15qTKf+Ne0oCgBV5sn7vHMh cb/Q== X-Gm-Message-State: AOJu0YxpuBsQil27CKj0ox2YWlscQvOc0lK+klEFLbDsMuRbwvbu7og5 3AFHLhwRTzaIfLxO9FcPZlaVMN9Zhm75Dhf3JhJdwWmTEEv2rqhC3ZgwE47LadYWCEMAMc+EI9G r0E4xgg== X-Received: by 2002:a5d:424a:0:b0:371:93aa:361c with SMTP id ffacd0b85a97d-373118878f6mr1569906f8f.7.1724420950918; Fri, 23 Aug 2024 06:49:10 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:10 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Heinrich Schuchardt , Andrew Davis , Sumit Garg , Rasmus Villemoes , Bryan Brattlof , Jesse Taube , "Leon M. Busch-George" Subject: [PATCH v9 01/37] Makefile: detect HOST_ARCH properly when CROSS_COMPILE is multi-word Date: Fri, 23 Aug 2024 15:48:05 +0200 Message-Id: <6ece1bd7ecd90c5396247237cbf26ada63643ca7.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 When CROSS_COMPILE contains multiple words, HOST_ARCH is not properly detected and the sandbox build fail. It typically happens when using ccache. For example: $ make sandbox_defconfig $ make CROSS_COMPILE="ccache x86_64-linux-gnu-" \ CC="ccache x86_64-linux-gnu-gcc" [...] In file included from boot/bootmeth_efi.c:16: include/efi_default_filename.h:33:2: error: #error Unsupported UEFI architecture 33 | #error Unsupported UEFI architecture | ^~~~~ A similar error occurs when the build is done via buildman and ~/.buildman contains: [toolchain-wrapper] wrapper = ccache Fix the issue by considering only the last word in $(CROSS_COMPILE). Signed-off-by: Jerome Forissier --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f90e48f58a5..dc7bdd79420 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ include include/host_arch.h ifeq ("", "$(CROSS_COMPILE)") MK_ARCH="${shell uname -m}" else - MK_ARCH="${shell echo $(CROSS_COMPILE) | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}" + MK_ARCH="${shell echo ${lastword $(CROSS_COMPILE)} | sed -n 's/^[[:space:]]*\([^\/]*\/\)*\([^-]*\)-[^[:space:]]*/\2/p'}" endif unexport HOST_ARCH ifeq ("x86_64", $(MK_ARCH)) From patchwork Fri Aug 23 13:48:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821707 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386262wrh; Fri, 23 Aug 2024 06:49:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqczzIQ5RrvqPqdzY+R5EcAL2MvXZtN5tf9CZG23K5cIQS4zehGLY3DW9fWty/GOh4KFBgXQ==@linaro.org X-Google-Smtp-Source: AGHT+IFB3qYkRXpC0gqnB7gPRkAF3dscG7sY+fkR1WpvTJzTwXFVPRxK+bfUhAhjQvu5LeGBhTgJ X-Received: by 2002:a05:6000:11c3:b0:371:8a69:18b5 with SMTP id ffacd0b85a97d-373118e3585mr1416505f8f.44.1724420977057; Fri, 23 Aug 2024 06:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724420977; cv=none; d=google.com; s=arc-20160816; b=FsGq8xBvOqsXIAzkeT5UYDXpGJ2ZZCaS2ZDUQ/Vgh7JJzZkea0Hg8nGw4BbZjBUsPQ 1n3lsn6sPtB8FxUpzgEhMzIeoTBiUx7sy4ZdQOygWMki/QKNNNLN8lPXnb26KwSOdj2z qn+pCB62Bi5wq0ZUdojlrFBJx5tsItJ5pRci+MNRQXm4hak28+Db2d7Z06Y3c1FfAlal jBN/nkabGwbsLd/QmUYucMoTYljRskGzkC6QdSrEGKoFdBV2mh6AWl1Y7r1BDi1BPx+u b1UPVPnPax13zSQ5q6j4K+OYKpPhEagZuNYu5X4FvVe3UXv4/7MBRsbx4jDsvH5rvXAp CcWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1RUCm8sy2GtMBaE9cyArf0W/WZmq/xfWl2TCC2Aall0=; fh=0U3Xnu4fBdGs20FflcvyX3Wt8HW9XVySFjDwkjjpc/I=; b=h3Q3cJcpHW9e1zMU8YU5djgd4BsibFpxogfKv8H8rb7PxeGY8GNOyldQIS/W9k66DG 0bUHTwK6PWeJonH1TTsugL2Z17ASHrf0ybxs43LfGR2jpyrBhERmYX/EEjeaUFbzVpcL xkSeK7Rj0spawHdqV+M0uJLDHXGbS13rp8wBVCBAzg0uGhUA3oy/NZ/1Jmqf5VHm5NZq 8btuybkEXUJ3WpvUZk4p7Nu+lrf/q2EYnizAhdtfr+peySY1IYEN6de0NpXrl5jMgkbp GutjvE1p/Sl7Oa5wKteOHXwxS3xS3ZJJc1pmRdsHsnsJmsoybu+jGmrRMSqpR+HiEJRf nBJg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j0Gr82p1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-3730829f068si1511130f8f.978.2024.08.23.06.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j0Gr82p1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 0F06888965; Fri, 23 Aug 2024 15:49:18 +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="j0Gr82p1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D05928890A; Fri, 23 Aug 2024 15:49: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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (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 1470E88915 for ; Fri, 23 Aug 2024 15:49:13 +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-wr1-x430.google.com with SMTP id ffacd0b85a97d-371941bbfb0so1029816f8f.0 for ; Fri, 23 Aug 2024 06:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420952; x=1725025752; 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=1RUCm8sy2GtMBaE9cyArf0W/WZmq/xfWl2TCC2Aall0=; b=j0Gr82p1DIx9X/E4H/7UvOZRV2DpzVR/6XjDZ5/91HTzQ6BuVvHj1sZmYpzVFwVBtk zKWpTr0z/vu+u46sQduFPI7f89U2gTwrppT3L0rYHiJwiPOTM0nUIOMTCAI8+AphAMu5 FUE08BzP+oPO/6y9VHJauKIofQBGMu8zLP4lqT0C6JFnbiZSuzTCkyrfxdmti3w5p8uv +pnDN2lBgkgAQLUR3ZShexLs9bS8JVeg2L3zToxVR+zHZE/sux3p/1UljwkeOzXt+V/w bUtJtHqX7JMbR8hTFQNP1+GW2qQPqC2+R8gHv5bFRGB/3FXG8L2qtrbh2V0NT3fJeYof 3TeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420952; x=1725025752; 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=1RUCm8sy2GtMBaE9cyArf0W/WZmq/xfWl2TCC2Aall0=; b=QeBDy28mED5RfBql2xClg4GyCj6GMovm1yyU14nUTgVeFZB9j7WuLI/bKZa0tIXirb /lGN+8AVEgf5j/CfE9YfagiMGQgo3ML2FWIfYzX9/BkjPGTjbsQ1VeyVVVS6oj5v+Lst jlhbMPSR27QYvvQbLCiGjhQPpq+LRAsPoBD8gQntyRspRsl/ghG1TU46q/vLK034WtFM 2Cg/KzMPOzEXtH7Dl6zt/Vo8IB3ATfng3b2Zv3wrIYLfM3OQeOHgUmw7QnyvpTuqaUNn yU5jbhGOoXM2X05PskYTDJF9zi2VKBCjrdaey1B6MLZwHMrjRY/q8zJohq0+BKHJoZ+N LBsA== X-Gm-Message-State: AOJu0YxaI26h6bVMs/j8W5zwQc/Nm3SD0Bc6otrdbbmgleRRgJvIvHws C12ABbahE506/joIJSfs00yoqRqW7dx30kBKo3BK5C2Vu8gipRov043ZBtdJIzWF3Jp4uleEMVp Rzs0Lyw== X-Received: by 2002:a05:6000:c47:b0:367:9c12:3e64 with SMTP id ffacd0b85a97d-373118e3c99mr1515831f8f.46.1724420952078; Fri, 23 Aug 2024 06:49:12 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:11 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Angelo Dureghello , TsiChung Liew , Stefan Roese , Marek Vasut , Peng Fan , Jason Liu , William Zhang Subject: [PATCH v9 02/37] flash: prefix error codes with FL_ Date: Fri, 23 Aug 2024 15:48:06 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Prefix the flash status codes (ERR_*) with FL_ in order to avoid clashes with third-party libraries. Case in point: including the lwIP library header file which defines err_enum_t as an enum with values being ERR_*. Signed-off-by: Jerome Forissier Reviewed-by: Tom Rini Reviewed-by: Ilias Apalodimas --- board/cobra5272/flash.c | 26 +++++++++--------- board/freescale/m5253demo/flash.c | 6 ++--- common/flash.c | 44 +++++++++++++++---------------- drivers/mtd/cfi_flash.c | 36 ++++++++++++------------- include/flash.h | 20 +++++++------- 5 files changed, 66 insertions(+), 66 deletions(-) diff --git a/board/cobra5272/flash.c b/board/cobra5272/flash.c index 616842e62f4..d324aa6ac11 100644 --- a/board/cobra5272/flash.c +++ b/board/cobra5272/flash.c @@ -135,22 +135,22 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) { ulong result; int iflag, cflag, prot, sect; - int rc = ERR_OK; + int rc = FL_ERR_OK; int chip1; ulong start; /* first look for protection bits */ if (info->flash_id == FLASH_UNKNOWN) - return ERR_UNKNOWN_FLASH_TYPE; + return FL_ERR_UNKNOWN_FLASH_TYPE; if ((s_first < 0) || (s_first > s_last)) { - return ERR_INVAL; + return FL_ERR_INVAL; } if ((info->flash_id & FLASH_VENDMASK) != (AMD_MANUFACT & FLASH_VENDMASK)) { - return ERR_UNKNOWN_FLASH_VENDOR; + return FL_ERR_UNKNOWN_FLASH_VENDOR; } prot = 0; @@ -160,7 +160,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) } } if (prot) - return ERR_PROTECTED; + return FL_ERR_PROTECTED; /* * Disable interrupts which might cause a timeout @@ -217,11 +217,11 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) MEM_FLASH_ADDR1 = CMD_READ_ARRAY; if (chip1 == ERR) { - rc = ERR_PROG_ERROR; + rc = FL_ERR_PROG_ERROR; goto outahere; } if (chip1 == TMO) { - rc = ERR_TIMEOUT; + rc = FL_ERR_TIMEOUT; goto outahere; } @@ -252,7 +252,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data) { volatile u16 *addr = (volatile u16 *) dest; ulong result; - int rc = ERR_OK; + int rc = FL_ERR_OK; int cflag, iflag; int chip1; ulong start; @@ -262,7 +262,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data) */ result = *addr; if ((result & data) != data) - return ERR_NOT_ERASED; + return FL_ERR_NOT_ERASED; /* * Disable interrupts which might cause a timeout @@ -302,7 +302,7 @@ static int write_word(flash_info_t *info, ulong dest, ulong data) *addr = CMD_READ_ARRAY; if (chip1 == ERR || *addr != data) - rc = ERR_PROG_ERROR; + rc = FL_ERR_PROG_ERROR; if (iflag) enable_interrupts(); @@ -320,13 +320,13 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) if (addr & 1) { printf ("unaligned destination not supported\n"); - return ERR_ALIGN; + return FL_ERR_ALIGN; } #if 0 if (cnt & 1) { printf ("odd transfer sizes not supported\n"); - return ERR_ALIGN; + return FL_ERR_ALIGN; } #endif @@ -364,5 +364,5 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) cnt -= 1; } - return ERR_OK; + return FL_ERR_OK; } diff --git a/board/freescale/m5253demo/flash.c b/board/freescale/m5253demo/flash.c index 334518a4bc9..ab5d2ebff64 100644 --- a/board/freescale/m5253demo/flash.c +++ b/board/freescale/m5253demo/flash.c @@ -72,7 +72,7 @@ int flash_get_offsets(ulong base, flash_info_t * info) } } - return ERR_OK; + return FL_ERR_OK; } void flash_print_info(flash_info_t * info) @@ -369,9 +369,9 @@ int write_buff(flash_info_t * info, uchar * src, ulong addr, ulong cnt) } if (cnt == 0) - return ERR_OK; + return FL_ERR_OK; - return ERR_OK; + return FL_ERR_OK; } /*----------------------------------------------------------------------- diff --git a/common/flash.c b/common/flash.c index 24ddc8bee72..a64e51a9b5a 100644 --- a/common/flash.c +++ b/common/flash.c @@ -110,13 +110,13 @@ addr2info(ulong addr) * Make sure all target addresses are within Flash bounds, * and no protected sectors are hit. * Returns: - * ERR_OK 0 - OK - * ERR_TIMEOUT 1 - write timeout - * ERR_NOT_ERASED 2 - Flash not erased - * ERR_PROTECTED 4 - target range includes protected sectors - * ERR_INVAL 8 - target address not in Flash memory - * ERR_ALIGN 16 - target address not aligned on boundary - * (only some targets require alignment) + * FL_ERR_OK 0 - OK + * FL_ERR_TIMEOUT 1 - write timeout + * FL_ERR_NOT_ERASED 2 - Flash not erased + * FL_ERR_PROTECTED 4 - target range includes protected sectors + * FL_ERR_INVAL 8 - target address not in Flash memory + * FL_ERR_ALIGN 16 - target address not aligned on boundary + * (only some targets require alignment) */ int flash_write(char *src, ulong addr, ulong cnt) @@ -131,11 +131,11 @@ flash_write(char *src, ulong addr, ulong cnt) __maybe_unused ulong cnt_orig = cnt; if (cnt == 0) { - return (ERR_OK); + return (FL_ERR_OK); } if (!info_first || !info_last) { - return (ERR_INVAL); + return (FL_ERR_INVAL); } for (info = info_first; info <= info_last; ++info) { @@ -146,7 +146,7 @@ flash_write(char *src, ulong addr, ulong cnt) if ((end >= info->start[i]) && (addr < e_addr) && (info->protect[i] != 0) ) { - return (ERR_PROTECTED); + return (FL_ERR_PROTECTED); } } } @@ -169,11 +169,11 @@ flash_write(char *src, ulong addr, ulong cnt) #if defined(CONFIG_FLASH_VERIFY) if (memcmp(src_orig, addr_orig, cnt_orig)) { printf("\nVerify failed!\n"); - return ERR_PROG_ERROR; + return FL_ERR_PROG_ERROR; } #endif /* CONFIG_SYS_FLASH_VERIFY_AFTER_WRITE */ - return (ERR_OK); + return (FL_ERR_OK); } /*----------------------------------------------------------------------- @@ -182,33 +182,33 @@ flash_write(char *src, ulong addr, ulong cnt) void flash_perror(int err) { switch (err) { - case ERR_OK: + case FL_ERR_OK: break; - case ERR_TIMEOUT: + case FL_ERR_TIMEOUT: puts ("Timeout writing to Flash\n"); break; - case ERR_NOT_ERASED: + case FL_ERR_NOT_ERASED: puts ("Flash not Erased\n"); break; - case ERR_PROTECTED: + case FL_ERR_PROTECTED: puts ("Can't write to protected Flash sectors\n"); break; - case ERR_INVAL: + case FL_ERR_INVAL: puts ("Outside available Flash\n"); break; - case ERR_ALIGN: + case FL_ERR_ALIGN: puts ("Start and/or end address not on sector boundary\n"); break; - case ERR_UNKNOWN_FLASH_VENDOR: + case FL_ERR_UNKNOWN_FLASH_VENDOR: puts ("Unknown Vendor of Flash\n"); break; - case ERR_UNKNOWN_FLASH_TYPE: + case FL_ERR_UNKNOWN_FLASH_TYPE: puts ("Unknown Type of Flash\n"); break; - case ERR_PROG_ERROR: + case FL_ERR_PROG_ERROR: puts ("General Flash Programming Error\n"); break; - case ERR_ABORTED: + case FL_ERR_ABORTED: puts("Flash Programming Aborted\n"); break; default: diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index a7826e81c17..e50502824ac 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -593,11 +593,11 @@ static int flash_status_check(flash_info_t *info, flash_sect_t sector, flash_read_long(info, sector, 0)); flash_write_cmd(info, sector, 0, info->cmd_reset); udelay(1); - return ERR_TIMEOUT; + return FL_ERR_TIMEOUT; } udelay(1); /* also triggers watchdog */ } - return ERR_OK; + return FL_ERR_OK; } /*----------------------------------------------------------------------- @@ -616,9 +616,9 @@ static int flash_full_status_check(flash_info_t *info, flash_sect_t sector, case CFI_CMDSET_INTEL_PROG_REGIONS: case CFI_CMDSET_INTEL_EXTENDED: case CFI_CMDSET_INTEL_STANDARD: - if (retcode == ERR_OK && + if (retcode == FL_ERR_OK && !flash_isset(info, sector, 0, FLASH_STATUS_DONE)) { - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; printf("Flash %s error at address %lx\n", prompt, info->start[sector]); if (flash_isset(info, sector, 0, FLASH_STATUS_ECLBS | @@ -627,14 +627,14 @@ static int flash_full_status_check(flash_info_t *info, flash_sect_t sector, } else if (flash_isset(info, sector, 0, FLASH_STATUS_ECLBS)) { puts("Block Erase Error.\n"); - retcode = ERR_NOT_ERASED; + retcode = FL_ERR_NOT_ERASED; } else if (flash_isset(info, sector, 0, FLASH_STATUS_PSLBS)) { puts("Locking Error\n"); } if (flash_isset(info, sector, 0, FLASH_STATUS_DPS)) { puts("Block locked.\n"); - retcode = ERR_PROTECTED; + retcode = FL_ERR_PROTECTED; } if (flash_isset(info, sector, 0, FLASH_STATUS_VPENS)) puts("Vpp Low Error.\n"); @@ -702,12 +702,12 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst, if (get_timer(start) > tout) { printf("Flash %s timeout at address %lx data %lx\n", prompt, (ulong)dst, (ulong)flash_read8(dst)); - return ERR_TIMEOUT; + return FL_ERR_TIMEOUT; } udelay(1); /* also triggers watchdog */ } #endif /* CONFIG_SYS_CFI_FLASH_STATUS_POLL */ - return ERR_OK; + return FL_ERR_OK; } /*----------------------------------------------------------------------- @@ -810,7 +810,7 @@ static int flash_write_cfiword(flash_info_t *info, ulong dest, cfiword_t cword) break; } if (!flag) - return ERR_NOT_ERASED; + return FL_ERR_NOT_ERASED; /* Disable interrupts which might cause a timeout here */ flag = disable_interrupts(); @@ -899,7 +899,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, shift = 3; break; default: - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; goto out_unmap; } @@ -930,7 +930,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, } } if (!flag) { - retcode = ERR_NOT_ERASED; + retcode = FL_ERR_NOT_ERASED; goto out_unmap; } @@ -950,7 +950,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, retcode = flash_status_check(info, sector, info->buffer_write_tout, "write to buffer"); - if (retcode == ERR_OK) { + if (retcode == FL_ERR_OK) { /* reduce the number of loops by the width of * the port */ @@ -975,7 +975,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, src += 8, dst += 8; break; default: - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; goto out_unmap; } } @@ -1025,7 +1025,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, } break; default: - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; goto out_unmap; } @@ -1043,7 +1043,7 @@ static int flash_write_cfibuffer(flash_info_t *info, ulong dest, uchar *cp, default: debug("Unknown Command Set\n"); - retcode = ERR_INVAL; + retcode = FL_ERR_INVAL; break; } @@ -1389,7 +1389,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) if (i > cnt) i = cnt; rc = flash_write_cfibuffer(info, wp, src, i); - if (rc != ERR_OK) + if (rc != FL_ERR_OK) return rc; i -= i & (info->portwidth - 1); wp += i; @@ -1398,7 +1398,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) FLASH_SHOW_PROGRESS(scale, dots, digit, i); /* Only check every once in a while */ if ((cnt & 0xFFFF) < buffered_size && ctrlc()) - return ERR_ABORTED; + return FL_ERR_ABORTED; } #else while (cnt >= info->portwidth) { @@ -1413,7 +1413,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) FLASH_SHOW_PROGRESS(scale, dots, digit, info->portwidth); /* Only check every once in a while */ if ((cnt & 0xFFFF) < info->portwidth && ctrlc()) - return ERR_ABORTED; + return FL_ERR_ABORTED; } #endif /* CONFIG_SYS_FLASH_USE_BUFFER_WRITE */ diff --git a/include/flash.h b/include/flash.h index 60babe8a805..32bc65e7b60 100644 --- a/include/flash.h +++ b/include/flash.h @@ -127,16 +127,16 @@ void flash_perror(int err); /*----------------------------------------------------------------------- * return codes from flash_write(): */ -#define ERR_OK 0 -#define ERR_TIMEOUT 1 -#define ERR_NOT_ERASED 2 -#define ERR_PROTECTED 4 -#define ERR_INVAL 8 -#define ERR_ALIGN 16 -#define ERR_UNKNOWN_FLASH_VENDOR 32 -#define ERR_UNKNOWN_FLASH_TYPE 64 -#define ERR_PROG_ERROR 128 -#define ERR_ABORTED 256 +#define FL_ERR_OK 0 +#define FL_ERR_TIMEOUT 1 +#define FL_ERR_NOT_ERASED 2 +#define FL_ERR_PROTECTED 4 +#define FL_ERR_INVAL 8 +#define FL_ERR_ALIGN 16 +#define FL_ERR_UNKNOWN_FLASH_VENDOR 32 +#define FL_ERR_UNKNOWN_FLASH_TYPE 64 +#define FL_ERR_PROG_ERROR 128 +#define FL_ERR_ABORTED 256 /*----------------------------------------------------------------------- * Protection Flags for flash_protect(): From patchwork Fri Aug 23 13:48:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821709 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386430wrh; Fri, 23 Aug 2024 06:49:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWWjcklsCYYIGm1tSYaL0+WrNDsigVPoyFOPtf5h8iIWx7v2m3KV4UIAO0bAiSsNEW48jL3vQ==@linaro.org X-Google-Smtp-Source: AGHT+IEy/KUmbaFBQ48+fOOiG0TCG7jHkbHgu1sGfjz0Cuu4F/BbCzN1tZ1oJHZGGXcz0bV488C8 X-Received: by 2002:a05:600c:3152:b0:426:59fe:ac27 with SMTP id 5b1f17b1804b1-42acd5dcce8mr18746845e9.26.1724420997294; Fri, 23 Aug 2024 06:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724420997; cv=none; d=google.com; s=arc-20240605; b=GYLVfoMUsJkSfxPE97zvIaXplTV7nImjYExUPjoBW4nn0kOj476wGc5KSPmutgnLH1 APQLfeCH+lb7QpswgyqkqrRpiB4q4NKsyiZBN1JhbRcI6Ci522Ig0FF4bsyqazpWQp4D dOlioSIRN6Vq2YZdILMRO7Bnb7EI8uhoBsne2CksT47j6OsOixILxnKk+1ZM7atnFbt5 i4b+HuYSgqRuxO9XLsSUmXfvPk+UxanTzZzWIT9N3hzV4zwrafYogPcSXVO9JS4ohc4l pKz/kDQ9kGJUyDhp0VKk0+zwnKSCVQFP3W+wAUtcwdTANMrk6SXRQHQQJfpTGc58B9YM kdug== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8UxEwYmmxaI0ImhWCNG5rhD8GmJXXPCHlorBsPBG8Ok=; fh=9uCUvxIYabDL3/svIUuSUJgW3azLY9CeRClUZWaY/2w=; b=a2hjF4dtvtrPuNBbXllQ52IJWYoqVtMoU1BAKr4b8ZyIJugqGVpepklrj+ojNvGrrL KKsxoDRn+5wx9NGoTpFFfgTdarr7Ae2c60UTJDnOWtWWaA7EjXW+wk0IbRUxVnN1xbPD hzPh/O8awoiOI1op34vvgTuk0z/9yx2lGuSArmmoUrWdYYMNtl7118vb4gc6QMu1GpW3 iKuatHTvaEMwCSM7xGJgp6k1wPgu8c0bGZE2dszaJzHVNayNQQ1moKbApWsl4O6ebi7q oyo2PiEEqWmvwFFWJ9v1wpn8VG5JsaqnUUeQu4ZC5utm00g3U8Fzh0yIRtC/WVYPlZ97 BEZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w6ZqfldB; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42abefb8ad9si29493735e9.111.2024.08.23.06.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:57 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w6ZqfldB; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 B1AAE88AA9; Fri, 23 Aug 2024 15:49: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="w6ZqfldB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D7F5688915; Fri, 23 Aug 2024 15:49: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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 F1F7388965 for ; Fri, 23 Aug 2024 15:49:14 +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-x332.google.com with SMTP id 5b1f17b1804b1-42ab99fb45dso20767685e9.1 for ; Fri, 23 Aug 2024 06:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420954; x=1725025754; 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=8UxEwYmmxaI0ImhWCNG5rhD8GmJXXPCHlorBsPBG8Ok=; b=w6ZqfldB1YuKhnt0/N0aGYHqgcmfTqe92NkaUiraWv3s7emsUUHpzBrEre/dy8kSrX NiEXb8tpS35YzZpgLCvbViTXy6gsELHoroSJdp57qZ9I8pfk0vRTeKr0SCFxWynHWTzM +YPm+wGVj+fDAQg5fQoVzX9KZqhB9pHb2dwNJBrHVW7yrAbSgukv/q4d/Aa7PMzuLlKO EQqdMO0cE3lZhdEtx+X+ZtnO04Q5U+G0D7ejdwtvWdpS6EUWSeq9JoPOLlr11g36cqM7 sBRcjwS9vOLs32E1wKBr5XfE3nMxNUUoEAucGjzf94Xc3Qnz7JsmpD4eA7KCIFQ4GML5 qyJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420954; x=1725025754; 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=8UxEwYmmxaI0ImhWCNG5rhD8GmJXXPCHlorBsPBG8Ok=; b=ndBOCZcMuWG+0U6psGUeGigQVV7e7TLvwKEQ0xSELTmvYVx3W0dtc4VWN9xrPDMA4J lxKKpg8OWn6CF3Rjwra/nVIlfvbEQHsK5N52xaskG+ViYx6gD51yzKFMv/Mj8aAZzSw0 YrH3lnOvlZbe1Hl/FQzy1UPGtM12cb0ZzxAC6hQAIVFg63mfkEhu46YAzyBIunb0KuRV pQAV63/kaoj3x/uyp4YDlZYnyUGHDQLJcHkiYrEU+Z5M+HoFrxWqDroV8RnnSXD2bnOQ uQNog1+vXi/LZgOEqUdrEX/Qq+quujZe2H8qGMhr2uoO/GnRQUaDTYJyKC9mZVhoEggk KdPA== X-Gm-Message-State: AOJu0Yw0yeFEAtMVPHsZ1XuGj8dsVrMXBWN0yq8YyIOzUp8CYeQpH9FD 3u+UwlMSCYNOW1DDagd4+ze5W9IfidwJl4XIWkLvCZxKnxdt6Nj9zw8rX0JwRktZbAIQvfuqnWS q9O78ZKQ0 X-Received: by 2002:adf:a458:0:b0:368:7943:8b1f with SMTP id ffacd0b85a97d-373118c8a0fmr1739832f8f.43.1724420954099; Fri, 23 Aug 2024 06:49:14 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:13 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Eugen Hristev , Tom Rini , Nicolas Ferre , Jakub Klama , Artur Rojek , Stefan Roese , Heiko Schocher , Marcin Jabrzyk Subject: [PATCH v9 03/37] at91: rename mem_init() to at91_mem_init() Date: Fri, 23 Aug 2024 15:48:07 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 AT91-based platforms have a mem_init() function declared in arch/arm/mach-at91/include/mach/at91_common.h and implemented in various places. In preparation of the introduction of the lwIP networking library which also has a global mem_init() function, rename the AT91 one to at91_mem_init(). Signed-off-by: Jerome Forissier --- arch/arm/mach-at91/include/mach/at91_common.h | 2 +- arch/arm/mach-at91/spl_at91.c | 2 +- arch/arm/mach-at91/spl_atmel.c | 2 +- board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 2 +- board/atmel/at91sam9n12ek/at91sam9n12ek.c | 2 +- board/atmel/at91sam9x5ek/at91sam9x5ek.c | 2 +- board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 2 +- board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 2 +- board/atmel/sama5d2_icp/sama5d2_icp.c | 2 +- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 2 +- board/atmel/sama5d3_xplained/sama5d3_xplained.c | 2 +- board/atmel/sama5d3xek/sama5d3xek.c | 2 +- board/atmel/sama5d4_xplained/sama5d4_xplained.c | 2 +- board/atmel/sama5d4ek/sama5d4ek.c | 2 +- board/conclusive/kstr-sama5d27/kstr-sama5d27.c | 2 +- board/gardena/smart-gateway-at91sam/spl.c | 2 +- board/siemens/corvus/board.c | 2 +- board/siemens/smartweb/smartweb.c | 2 +- board/siemens/taurus/taurus.c | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-at91/include/mach/at91_common.h b/arch/arm/mach-at91/include/mach/at91_common.h index 683e539b1b3..8fec346c1e4 100644 --- a/arch/arm/mach-at91/include/mach/at91_common.h +++ b/arch/arm/mach-at91/include/mach/at91_common.h @@ -28,7 +28,7 @@ void at91_pllb_init(u32 pllar); void at91_mck_init(u32 mckr); void at91_mck_init_down(u32 mckr); void at91_pmc_init(void); -void mem_init(void); +void at91_mem_init(void); void at91_phy_reset(void); void at91_sdram_hw_init(void); void at91_mck_init(u32 mckr); diff --git a/arch/arm/mach-at91/spl_at91.c b/arch/arm/mach-at91/spl_at91.c index cde1700a283..0d1233cd109 100644 --- a/arch/arm/mach-at91/spl_at91.c +++ b/arch/arm/mach-at91/spl_at91.c @@ -142,7 +142,7 @@ void board_init_f(ulong dummy) preloader_console_init(); #endif - mem_init(); + at91_mem_init(); at91_spl_board_init(); } diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c index 62a7df8a195..7bfbadf0483 100644 --- a/arch/arm/mach-at91/spl_atmel.c +++ b/arch/arm/mach-at91/spl_atmel.c @@ -134,7 +134,7 @@ void board_init_f(ulong dummy) board_early_init_f(); - mem_init(); + at91_mem_init(); ret = spl_init(); if (ret) { diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c index 3bd94d0889d..af486e977e5 100644 --- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c @@ -125,7 +125,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index afc0c0520e1..6f9abcbb127 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -167,7 +167,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index e5688c6cf13..f52b9a97731 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -181,7 +181,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c index 36995a927cf..cb3cd7ac9ae 100644 --- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c @@ -146,7 +146,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) (8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET)); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c index c775d593e58..15cbd0daa6f 100644 --- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c @@ -208,7 +208,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) ddrc->cal_mr4 |= ATMEL_MPDDRC_CAL_MR4_MR4R(0xFFFE); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c index 986da01639f..6f0d578abf7 100644 --- a/board/atmel/sama5d2_icp/sama5d2_icp.c +++ b/board/atmel/sama5d2_icp/sama5d2_icp.c @@ -180,7 +180,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) (7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET)); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index c8a8eb49826..d104736fa7c 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -146,7 +146,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) 7 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index 54cc3c4d900..f98322fb540 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -175,7 +175,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index f2e1242fcb0..28079a81517 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -241,7 +241,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 09ca16ca88c..f9112fc5321 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -184,7 +184,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index 1f8b85f0614..0bdc6adbdc8 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -169,7 +169,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 8 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; const struct atmel_mpddr *mpddr = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c index 64282ae9dc7..37750137ad9 100644 --- a/board/conclusive/kstr-sama5d27/kstr-sama5d27.c +++ b/board/conclusive/kstr-sama5d27/kstr-sama5d27.c @@ -182,7 +182,7 @@ static void ddrc_conf(struct atmel_mpddrc_config *ddrc) (8 << ATMEL_MPDDRC_TPR2_TFAW_OFFSET)); } -void mem_init(void) +void at91_mem_init(void) { struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; struct atmel_mpddr *mpddrc = (struct atmel_mpddr *)ATMEL_BASE_MPDDRC; diff --git a/board/gardena/smart-gateway-at91sam/spl.c b/board/gardena/smart-gateway-at91sam/spl.c index fb3ec48f9c5..db9ba881884 100644 --- a/board/gardena/smart-gateway-at91sam/spl.c +++ b/board/gardena/smart-gateway-at91sam/spl.c @@ -110,7 +110,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c index 7d73d1f2b36..cd27fc1cc37 100644 --- a/board/siemens/corvus/board.c +++ b/board/siemens/corvus/board.c @@ -187,7 +187,7 @@ static void ddr2_conf(struct atmel_mpddrc_config *ddr2) 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); } -void mem_init(void) +void at91_mem_init(void) { struct atmel_mpddrc_config ddr2; diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c index 946fbc3f229..e9e4bc348cb 100644 --- a/board/siemens/smartweb/smartweb.c +++ b/board/siemens/smartweb/smartweb.c @@ -238,7 +238,7 @@ void at91_spl_board_init(void) | AT91_SDRAMC_TRP_VAL(2) | AT91_SDRAMC_TRCD_VAL(2) \ | AT91_SDRAMC_TRAS_VAL(5) | AT91_SDRAMC_TXSR_VAL(8)) -void mem_init(void) +void at91_mem_init(void) { struct at91_matrix *ma = (struct at91_matrix *)ATMEL_BASE_MATRIX; struct at91_port *port = (struct at91_port *)ATMEL_BASE_PIOC; diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c index bda12a97708..3764ab48ab3 100644 --- a/board/siemens/taurus/taurus.c +++ b/board/siemens/taurus/taurus.c @@ -177,7 +177,7 @@ void sdramc_configure(unsigned int mask) sdramc_initialize(ATMEL_BASE_CS1, &setting); } -void mem_init(void) +void at91_mem_init(void) { unsigned int ram_size = 0; From patchwork Fri Aug 23 13:48:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821708 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386343wrh; Fri, 23 Aug 2024 06:49:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVAw9tNYcYwlpsL/BiEg7D7IlAjyvp8krnFMyfcIdU0rLU2gfJD8OMb/9ezMnEg8NT5imYhrA==@linaro.org X-Google-Smtp-Source: AGHT+IG85k66BMVS8+PdzNOWEkuGDtcV6rGCPNUWWSMtWPaZIrrJxct1AbwYf4UyFgG4cNBX5Uwi X-Received: by 2002:a05:600c:4694:b0:429:d43e:db9e with SMTP id 5b1f17b1804b1-42acc9fe365mr13454165e9.36.1724420986703; Fri, 23 Aug 2024 06:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724420986; cv=none; d=google.com; s=arc-20240605; b=hg/Ktg34JUQBhZWie1S8pm3e2HeVfPeho7apVM8A3Q/FBxNoW2SF8aalRZKeWIbzyI PssWsnhH3XcdSla7c3UaD1e97+pBAtj7mOqNZO0w8j/10Uerxt0QNaOQRE8sylzzyrkd zYsuLhv3HurPXnTYE0NtFZLsPlgiP5E9DMl4/qTeWkkj5dlzdn0JgvwuNjwzBNiGztKe UAJOJJQvGXtWbLpZFUF50phzMpOY9GZjr+BUYGaz2qMZTRIRre3Uyu6svatii2maU6bo V4Ds8qsHnZfQUUkeBiNMbvP9BfS/ck3DYh4D4LExBPisQ4iu+NvmQKXUJWSBMuQmfeVQ d/zA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iFG+cepuhJetnnc/QhAyO6HKp2bGrqBgx5fNZtZoZ5U=; fh=ThdVVZAeTRhYRIsitiRafY870JZ08RRoQKK9619Vak0=; b=gN+Iqx88JHUE8HON+JriToDuPMdbXIqbkORtvqZC5Y+oOYDlu4EDhKrA00eKpTgdy8 2a0o5kIoe/7pE7XxjxLkvojVHHAhkbIAB4U2EITgN1zVSB+wzqUseWFdNFI6Sgd6RzUn dYfBJJPq4VAAq0rsEY9wf9XM0w7w0lApG+1f5TKpwcsug8rhYmDLDh/S19gUeHomkU9C Z9/nHlCMQmr0C4WmVwFhW5AXVCuge5eAHTZL4Hpdlv6DBrRp10aE47zR8N88/BIZ02wa BJx+AW/8EPi6BZfAc/fIuVEV1EQ/xJ5H8/5vi62Xk71sHwhr/ftc+EVqlvSg1HNs2/6c R/qA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y1pFXgCI; 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 5b1f17b1804b1-42abefb90absi29639245e9.110.2024.08.23.06.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:46 -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=Y1pFXgCI; 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 61D1188A50; Fri, 23 Aug 2024 15:49: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="Y1pFXgCI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B07A688A25; Fri, 23 Aug 2024 15:49: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 C737B889EF for ; Fri, 23 Aug 2024 15:49:15 +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-x329.google.com with SMTP id 5b1f17b1804b1-42809d6e719so15502665e9.3 for ; Fri, 23 Aug 2024 06:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420955; x=1725025755; 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=iFG+cepuhJetnnc/QhAyO6HKp2bGrqBgx5fNZtZoZ5U=; b=Y1pFXgCIbFJs4hXUavBPCQG5jx9X9njKP0dJdlhhadE3FvYbigLuVMpBxg1UtlKZ+e 8ibG31exXRPo11kyqKAjbNQS+5f/HP8QkzaGXvPel0IUmR2bi76nOozlKNt0GyjIv/o7 u/nfhRZ1XxQPZjUbpvvDOHxwDl3ty1uf8DhvvAq44QybemCCL2hjGeQ/L1/6Y5hYlDFV Ui+sCYDvqfHPZrL4vqAQvFNmG4G3pOGGGW8Yv9u/gWhG3ZirIUYAv1BXODNFXXILBC4Z QqsPLx9OSpzSzmzc5W1Eq+DGAXoetKHvOrkzLLbMlGOQzloTgQOxpzowUY4i6km1+S1b oJvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420955; x=1725025755; 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=iFG+cepuhJetnnc/QhAyO6HKp2bGrqBgx5fNZtZoZ5U=; b=VQiOblIWtXHkqMLGg+ippGFrSpPv60yoha9uKAB4Oboygu5mC1aCVD+x2GXRRoQLWa my06YmdVGCiXUPED1h4nvegFM2VOV8m37a0mhttJJMDEy/CxwEweB67tXcKEQEYTPEBm iQn8eKOmhWoF56rzYwhYkbdTe99mLcl6CP78ATfKx7spAxpwwgYG4zFl63VSvaiAVQob FOrl0smoFdgFwF7ZHk6KHSYRWni/v34PpfH/0RFTMvkFyhAKpNuoLDsjTvOjwTjddUT3 h3O1uku/6P6O/+5E3vCwYiqm4B9meQOlbdiRXcQR4EwXvfMSl2l+kWV7KXaJ2ZiFkAc/ Pg3Q== X-Gm-Message-State: AOJu0YzhJedxeBEaW+U9QJ48UpQksIhzkZIhYCJIRKsICscnO+8rFJfN WDNi9dVhG/XRkKQKpzREJ5PQ5vX4JGU5MeFshCx56mIkFgxJZMbTbGjuP9bbZqR5TP2/BwToGdO Aa45vhw== X-Received: by 2002:a5d:4cc2:0:b0:371:72a8:15e with SMTP id ffacd0b85a97d-37311855fecmr1552444f8f.16.1724420954931; Fri, 23 Aug 2024 06:49:14 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:14 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini Subject: [PATCH v9 04/37] arm: omap2: add missing #include Date: Fri, 23 Aug 2024 15:48:08 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 emac.c implements cpu_eth_init() so it needs to pull the corresponding header file. Signed-off-by: Jerome Forissier Reviewed-by: Tom Rini --- arch/arm/mach-omap2/omap3/emac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-omap2/omap3/emac.c b/arch/arm/mach-omap2/omap3/emac.c index 7348e92cabd..1e30a06361d 100644 --- a/arch/arm/mach-omap2/omap3/emac.c +++ b/arch/arm/mach-omap2/omap3/emac.c @@ -9,6 +9,7 @@ #include #include #include +#include /* * Initializes on-chip ethernet controllers. From patchwork Fri Aug 23 13:48:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821710 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386484wrh; Fri, 23 Aug 2024 06:50:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV6x/Zf2C7ABC8Ykq1+CXil/jMdmWSYQ+xxQizyEjJEsSP2sE0pqfDnYBnwyssBpd5Hn6Cs2w==@linaro.org X-Google-Smtp-Source: AGHT+IFMo2Ih3Hf5yeNmzHS/abAPtGzMk7o/M9nOFPvPibKdKKvNLtmK/gSq1W20dyWO00HyEn/E X-Received: by 2002:a05:600c:4745:b0:425:7c5f:1bac with SMTP id 5b1f17b1804b1-42acc8e16b7mr17866415e9.21.1724421007605; Fri, 23 Aug 2024 06:50:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421007; cv=none; d=google.com; s=arc-20160816; b=e7Z9gs12d1etVUu0mK0rAkFya8BE3bP5IZanfoGJHo0Zr/vpxynX8Dhn72mTyVhUZw BbleXcXP79pD9RzQxMVb03uIHIkf7YKykgZ0nTu2xyjydpRVCRzpCzUUaFxb7YuPvpHu Pl1c1h5uvRwLgzbh8wUQZ8SBrA7dchlAtmkR3tAXpajyhftAXeqpQNHpxz0vGeJKxnuZ xfJzUKL/gUIwZ1VwMEchlTp3tsCgHwmRUxXqeaI4pI5WcwjHdRBMgYkaK2DyXKkFiSyo hl8sgqq6UYsPYCrFIR+rprcd5qSmWare/YMXOgP6VkhCCfAqce5OVbN5L7zlCoyis6gV Ys3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LpbosyhlpRV3kqLXjV99Gj/U9ZaNJ/exWx7NDBToF6A=; fh=8Var754V4vNAlZWgtcLfgBHWbeRV8EJV7fDR2YeWbkc=; b=XuC+QBMfrwub+lplbUbo2fZnP+3Rk5Ptw6XLnAOh36FfqDb+UTf9cs7k78LMQ9Qixb s/gkKYClVfNqQy1rDpfduvT5cIg6dfwgr0k30rN9hnV5FS7FvOJgQShTao3/GBLlJAYf bPLi8laDH75Oi9ZbC35/xpu/wZ+SXlz8xCKt78LhTYOWV9YQKEB2MTD8ab8tsY4lcyvz /0n5GxoNoLGam72/vjO5LS6MwabOp/4oMSGyyDizWpOQ0/lv/eV780xpoM0opFvwkZIB 4s5jqWyTMwCqqmadeGOf/rdxz84f5IOB62GxCBs5iqzgRbVNhFvYDyVcNI3ytMV8pyhQ DvoA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zTs5OsjU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-373082a9309si1477658f8f.1008.2024.08.23.06.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:07 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zTs5OsjU; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 1CD1288ADC; Fri, 23 Aug 2024 15:49:21 +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="zTs5OsjU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7490E88A2C; Fri, 23 Aug 2024 15:49: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (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 9711E8890A for ; Fri, 23 Aug 2024 15:49: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-wr1-x42d.google.com with SMTP id ffacd0b85a97d-371b2e95c34so1101593f8f.3 for ; Fri, 23 Aug 2024 06:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420956; x=1725025756; 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=LpbosyhlpRV3kqLXjV99Gj/U9ZaNJ/exWx7NDBToF6A=; b=zTs5OsjURMt7AD8wT2YkPl+F7IDgw/G+6QDHOhEHdagx6G6l9td+tzLNYpZEUydb0k qncUPpRE58Oys+BUqyTVkB6tGKaPHpzpGpyQ0WxUqVlc79+BMH93Ciie1kAEXV/29//N EHKT6v8GHC+/7T/YfassTq76pgFzBmR9Fro3D3p2kr4aYapWIRIeCRY4U1/0LjzM8uZp VXuOLwjT3XYOEmTx7pSBnwegDAPKS1rSSSQ5HO0AwHfgK2RLnHVspW8m329iW13kSofo lhCgxY76hyzjLx6poDqEevoEGjJsTDZ5vgNanTxFNsxGWY42QA4JKUTN+lM/y2uXNQzR yN1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420956; x=1725025756; 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=LpbosyhlpRV3kqLXjV99Gj/U9ZaNJ/exWx7NDBToF6A=; b=S/Bt1XGs0/yfHptaGLC8SjU/jlS53wV/6PdiIhs1uR8XGKJUyHfhSTP3HR1U//xrgr IQwycHkN0zdTXBQ0XvNU8/LZ4vMiB4S1PvNnmiHZTDZ/SEJz0ZJyFUuCbZ0xjyv+3aKK zpYZMNDDGQ0w1oiAc3RdAyK9drIjUI0odF1XzdzWZwp2bRyoUx6cMWOJPioobfC+glpE Y4tbSpzim+KUCaONBeZwqJ/KS84nz+wRp+Ui5ThSfX4icACkT5ACEFuq5Q/SVH0B/D/A aJd2rAtTZJ9YHReiKsnDlrmCHjz+1gOpPnbH2rmizeEE91FeOup2ea4HQNlJZmVRWSQj cXzw== X-Gm-Message-State: AOJu0Yy5AcBu33pqBZ/isy2Ub51HQZK3euZTdaSbOM9F46T04L3ilAkK GfI2wZZjTYVr4CbTYxIDaMLevFidV1yVt5Sj52trEYuaFanDJrM6Dwy4gWS3aXcbzwHdwZNPFE3 OghmiA8Bd X-Received: by 2002:a5d:6b03:0:b0:368:12ef:92cf with SMTP id ffacd0b85a97d-373118e3735mr1701766f8f.48.1724420955799; Fri, 23 Aug 2024 06:49:15 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:15 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini Subject: [PATCH v9 05/37] net: fm: call dtsec_init_phy() only when it is defined Date: Fri, 23 Aug 2024 15:48:09 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 dtsec_init_phy() is defined only with MII so add the proper conditional in the caller code. Signed-off-by: Jerome Forissier --- drivers/net/fm/eth.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index 19f3f0fef07..e4ec7696939 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -701,8 +701,10 @@ static int init_phy(struct fm_eth *fm_eth) supported |= SUPPORTED_2500baseX_Full; #endif +#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) && !defined(BITBANGMII) if (fm_eth->type == FM_ETH_1G_E) dtsec_init_phy(fm_eth); +#endif #ifdef CONFIG_PHYLIB #ifdef CONFIG_DM_MDIO From patchwork Fri Aug 23 13:48:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821711 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386580wrh; Fri, 23 Aug 2024 06:50:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWkYT1NdakCNO9vzJkqaRwpLhptie6CmySYhgBpTQx30EvdxkBLVInJVA0+wHa7VE9w/rMMdg==@linaro.org X-Google-Smtp-Source: AGHT+IFvqrOYnE1CyRQwU/gXjKcDdFTWGiYhWYgWtTwh3L1HB6SSM8VFAxt2dcuzuSoY+E3rVg+v X-Received: by 2002:a05:6000:184b:b0:365:f52f:cd44 with SMTP id ffacd0b85a97d-373118ec939mr1762142f8f.57.1724421019705; Fri, 23 Aug 2024 06:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421019; cv=none; d=google.com; s=arc-20160816; b=WrHfft4U+9z8PmafDI8TS3NTnxXSpiAV/xmexC3XkgfAQeVHqHkzbGtgLHuZot6T4k diTB3lTr/1Z5LD8uYIkuNj8hed+FHCS1uzPC+25DveS3/8OLKjOaCD4kn/t/C0KyLlzL 3Egx2lkWggdoUk05axunjbSlDClNU76HlnNYBg8X41tcsNWHe3cAd279NG+yIdU7r9L3 Xqrhz7efjGSq0olwo6bvZRDoL9KTO6Ht45TaKbCv2iOLQJFeA+HSIzyBOKbGsboij97F zQozAhEtzw4A0quS85bTt/QAzG2axHaAqX/7fHKBTbTfOHwOmRJsW8Yv+LJJ2883RY3I hFlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RYA9NeMGf/EOsm4I8RC0qHiTNbH71LXUaESIJufafA0=; fh=AFXeK5yzYSW+Nlw9Mzu/putXqh6y/lo7VO9XHEXIN6M=; b=Prc369Ntbjhhnc0oEdHLrWCUUizoE8Lx7dwtxSBQVJWNt6t97fZQ8CLW/KavCySrx4 qVDmeeE0MICUZiZxte4RWBGJCdPFRpjA/mrbE7pNbSjDSlt2rJQ0HffjUbONtMNKe1wx n7sKYUCJEDWRbomoM3nio5utLYFHnxzUTzrsvfZJAxr9HdLe0vVOEkipL05PI/4VxnMu it5DHCSVqM/3NN2zYcyIUNXiABmgBGIsIMhfjbr754G04kFW/1ixmI+Wx59zCesg8UHe hhMbjxUe/ju5oA6DcOGKxZ0kJJ26HDFryc02bPEZhFjIih8nuysDFnxKLLNDrNkoiNGs Q6Kw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w0nXjwsC; 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-37308200846si1507549f8f.443.2024.08.23.06.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:19 -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=w0nXjwsC; 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 7669A8890A; Fri, 23 Aug 2024 15:49:23 +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="w0nXjwsC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 86C6E88A39; Fri, 23 Aug 2024 15:49: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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 7CE9A88A10 for ; Fri, 23 Aug 2024 15:49:17 +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-wr1-x431.google.com with SMTP id ffacd0b85a97d-37196786139so1034916f8f.2 for ; Fri, 23 Aug 2024 06:49:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420957; x=1725025757; 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=RYA9NeMGf/EOsm4I8RC0qHiTNbH71LXUaESIJufafA0=; b=w0nXjwsCQSJVbMtPrM3+lmhuDgvSCDtwG2l3wvAFzXoY3Y5YlByirnQSGx8Dd59AQ6 0tIo3jSoNoZpbSAnhkG0XT+P5dGcnfJOU30pcEbPBGJHpT/+ssnwAy4+QTd+x0ZrlgOI 2gENZA159P0wBLZqb2qTuuWVBI1wE44FS/NFzFmFVFWzljcXUMAwmgvVtvAXaEPmSHjD 4zLmLs8aLZZYQj6Y6g0URdGipVK4ZYQxX1x9QHTlrgWYUV23qjJvweOvfDIApWrsXlg/ gTBYJArgp3YaocFjTudMbBoWTP+CeJ5Zjws6ZpsTba3Gx4i7LWlvN9mJBW0U/A5DCBeE oeMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420957; x=1725025757; 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=RYA9NeMGf/EOsm4I8RC0qHiTNbH71LXUaESIJufafA0=; b=cVUbnLan2cFMhGzrNz49gkVmxUwIVKZHWiFnLYggXXfzlIiTrJCrLs4auHmTn7nwSu DszkNHV1Tdjsvd8CVr5Hm/YbSe6PYhVOF/Ol3mmRaR1617NI1wdpcQVcCIje0nLFUSHj uf2HLRrcjc6HKF7qAoy2/Gqrql6AlTOMI+9g9Z5z9eq1iK5TpmCyxYkJNWr9MeINbU5C UDrqFmmpEnkG0YRUwv72cVAUTPv3ubAl43WKc+gTssI40VaJCRpZJl/0CCG67a7sfiyS 8Kr2uJfPTfybE4J524ojxZm/gXAe2+ZP7PIPpZxjOLgQDb7A09kYxIRHCmwLZsGVZ2IE FtYQ== X-Gm-Message-State: AOJu0YxgYKsz4sWDoxuxGjn5p1LdEa+pp2Ptz1IsfRBjII3UnqjlGjGu 1JfCq+xYcKx91cvG2hwTHQOBVmRpWrjc1RN0JAeQS1IP6CwsgK5mCNXEBwyNw/KzuXCHoIx+ppJ HKDu1v80S X-Received: by 2002:adf:ed08:0:b0:371:8c19:f5e6 with SMTP id ffacd0b85a97d-373118e3475mr1504548f8f.40.1724420956703; Fri, 23 Aug 2024 06:49:16 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:16 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Masahisa Kojima , Simon Glass , Yasuharu Shibata , Richard Weinberger , Marek Vasut Subject: [PATCH v9 06/37] net: wget: removed unused function wget_success() Date: Fri, 23 Aug 2024 15:48:10 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 wget_success() is used nowhere so remove it. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- net/wget.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/net/wget.c b/net/wget.c index f1dd7abeff6..0e4dc5159d0 100644 --- a/net/wget.c +++ b/net/wget.c @@ -199,13 +199,6 @@ void wget_fail(char *error_message, unsigned int tcp_seq_num, wget_send(action, tcp_seq_num, tcp_ack_num, 0); } -void wget_success(u8 action, unsigned int tcp_seq_num, - unsigned int tcp_ack_num, int len, int packets) -{ - printf("Packets received %d, Transfer Successful\n", packets); - wget_send(action, tcp_seq_num, tcp_ack_num, len); -} - /* * Interfaces of U-BOOT */ From patchwork Fri Aug 23 13:48:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821712 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386653wrh; Fri, 23 Aug 2024 06:50:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfK2hvnEzcekbzcInytRCY2f3kO0jQjW7Xd+fIALcOPZ6uGf8BCCuIebTkPfV0pAbbBL2MbA==@linaro.org X-Google-Smtp-Source: AGHT+IHJdN0lbn1HfRP8LcVFdIK7KWYxoA2OA3iO8LRMo4YAl7FS5hToJgNpXUsqfUmsRs5g+41E X-Received: by 2002:adf:f0cd:0:b0:368:7282:51d6 with SMTP id ffacd0b85a97d-37311856059mr1832059f8f.21.1724421031247; Fri, 23 Aug 2024 06:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421031; cv=none; d=google.com; s=arc-20160816; b=1K5EriTUCBlS/dSsJfzR7jpgrERmZa7FrOaB+qiBV5BDp30W8xCzn3x4N8k01lj4jK DIpGcC1sytCr/HHmP6+8KntUJON1e1z8C0qfV3gkXCv2VrK8EZXFxaZ+lH3K0aq3jMZV 2drxpGgpxOEG9UrdBqTmR/CMf/LJePV+SjatU6ZnuOeqi/aTh7sZnJAXpIIhlMcMcGRn F7HdSVLgHOoCtZ7XeOjllsMYjfvueTDo3KGkmuhmosGpzc9lOtrri9iiqzRMS9Jo+6qu qacXipiwjK2OYCLbYdJj8dP6xHwu5vLeFEwQY3fD3gFUZ/j1cMjsay0bsZvszlB+T+je GpVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=t6qIzHMrkEoZi8QUyqXpjxbu96j54T34fC2s8Z+8lnY=; fh=bVBS9g1Zst4pXNJdian7inmIZr0SErdKvSImo9Bp7j0=; b=aqdMenbCQ8oZooxUdS1P+78Pmj3Ir/RgCRutgjPUTOdb+XzGu6r22/c4ZuKv63GDLe CdI0YeuDQHGXhs/HmqgROI5V3KFo8Xr5SV0jWAxBzMbVLx+k+DP3uzPSNBmA1Wn3kefb AHoOSKUWQG8vpgyNqnhTx4m8AkizApEI9w6Da9LgyonPRkqiDT7+OvRtnvtvXMK8K3+y JyaKWWTsTzU3bdQMCI/ixQFcIC7OchUTwNCSa/nUkC4NiKqREKgUh/OJipcz7QMHmLzp 2R3rNisoVT6R4jZxkZ531bDaQrIQAsLFDUyEo9H+B627mqfQ2/89sPx5qEnbZo2Hw2Pm zSfg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XpJ74JWW; 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-37308292303si1517870f8f.931.2024.08.23.06.50.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:31 -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=XpJ74JWW; 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 CCC1688A39; Fri, 23 Aug 2024 15:49:23 +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="XpJ74JWW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 44A9B88915; Fri, 23 Aug 2024 15:49:20 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 5DC4A889EF for ; Fri, 23 Aug 2024 15:49:18 +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-x335.google.com with SMTP id 5b1f17b1804b1-428243f928fso20845935e9.0 for ; Fri, 23 Aug 2024 06:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420958; x=1725025758; 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=t6qIzHMrkEoZi8QUyqXpjxbu96j54T34fC2s8Z+8lnY=; b=XpJ74JWWM5vmkEfVEIq5H0O3Wq5nmAxZcaiteKqsLVWnFhuRKgX71Bwd2RxO2jVc8c VyFqeJHf67kLKFoz/wX4zuIdJzZyYFGaiVybIMWT4MO4J5k3N5vjHifwTUn46vzRBG9t xdJi3zYmw3wxJf9Gb/WnlGgTx45qIjzvugCsiJ4ZSdpryDObL8p9++34LMETd94gYFkw ospeYZAi4V11eU0V/N4yUyNdUnLBb0oKJSbT6z0hzOHaGKnK62CaqD8EqRPakk4yjmoS SnVKpLKZ/CCmP64xBkTaCzBnoT3nGrhexDJKegN4FIHam7k81feuI3DxvqTh+Jm8ljez 4G+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420958; x=1725025758; 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=t6qIzHMrkEoZi8QUyqXpjxbu96j54T34fC2s8Z+8lnY=; b=sRvwU/nfSFRBF8o9C1KYr0zIreBWDnLEPVJYiStqlHO7ii2BtFZAAq6vItCLxerv7V F/6X0Y1/dv4iAyXyoksbnObP+nR04VTxPE/eWA8bMMalGlz8OIW6fJnfYFhM6wzX8QXy RCdvUdRvGDdTLNKUzt7C/cIAfcIlVlf0YLQ5UKgbHTahA6RMwU+15xLdiZQ1piX70Ggt mGSK6tYa0MpWW02Euk299NAN0YZFY8ejcMlFjfSZbFit/hBPSYPwGroX0RHFyZUgealk ORgZNRyZ+v8IMg0M1k8nvQO5dWmQzJXit3Rub/i0Zm8xdkmK40525f+bdkw2IUgLz6I9 Vd9A== X-Gm-Message-State: AOJu0YyQoDbgRxQ8lt4DpP3oms67mHRvE6PZMFd3qhfx3NhdmHPlLcu+ BLWNvFi3uxBeJjgdV3647RKGo8TVm7r5m6yciYBOI3ppZ6t1JLCagLBR4GTucy5cNxA1fSFyq5A bgOmq5ffb X-Received: by 2002:a5d:648f:0:b0:371:8b49:f49c with SMTP id ffacd0b85a97d-3731184038fmr2504530f8f.5.1724420957615; Fri, 23 Aug 2024 06:49:17 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:17 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Marek Vasut , Nicolas Frattaroli Subject: [PATCH v9 07/37] net: phy: ncsi: depend on NET Date: Fri, 23 Aug 2024 15:48:11 +0200 Message-Id: <66dfc851661d3b5e9e3a09142190f2dd3ebb4b3e.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 PHY_NCSI enables drivers/net/phy/ncsi.c which calls net_loop() and net_set_timeout_handler(). That's the legacy NET stack (as opposed to NET_LWIP). Therefore add the dependency to Kconfig. Signed-off-by: Jerome Forissier --- drivers/net/phy/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 73064b2af68..a9efc509814 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -368,6 +368,7 @@ config PHY_FIXED config PHY_NCSI bool "NC-SI based PHY" + depends on NET endif #PHYLIB From patchwork Fri Aug 23 13:48:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821713 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386708wrh; Fri, 23 Aug 2024 06:50:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzm3CADYXnzqFhWBfhu2SMLZfXHGDkQT1pYh9qx7FrgZHMyoaeML09nk/3WuHSKqAD9EXMMQ==@linaro.org X-Google-Smtp-Source: AGHT+IHufP1Og3XjU58TUqO4MYwiy1AMSssmJEqltXnCWtYg1xnuAHwIGOdysH4Vmxc/VxdKAL8+ X-Received: by 2002:a05:600c:1d90:b0:425:7c95:75d0 with SMTP id 5b1f17b1804b1-42acc8e1258mr19139055e9.18.1724421041173; Fri, 23 Aug 2024 06:50:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421041; cv=none; d=google.com; s=arc-20240605; b=dYJH1d0hEpGgiUTe866s22x4GQnOfF7L3JIxxRLTQeGDmXK70Hn8Kvba9D8+ol/mEE 4G1IMjzg0aJ9830Z1dawyqPAvOoz1S3ZRUsEMP8jWFfuVobUKMUOsVKNHCE1P1kJ10wP SWtZ7+rbzaYht8baJpHJS+yvF0Jlx0P0TXhZ/7YGbDV6Pj2CAF5qu/YEhhcT8lJfh/em uNdyyFaftb1h70LabF8OxqdTctA5LYrqj6W2hq6M7VoICMGIl4EQ2tVhux8/vzAqkL2T JriRm88GZheea2Q/J3cGq7Aiaqn1v87+4HS6IkncTgYLsVCOngQs8/h0SwJytbBNijL7 H3yg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JMKR9bGfM0t7gPRNHqzFhAKLlfcdWZvsACjtC+GS4O0=; fh=ekIOcMcp97lphPryExGJAXBOyJ+KiBgyCrC/n7edXts=; b=HD/osqHOeawIXKRa4Wm89j11SSITn96ZoELpPmPdZNKmmOj+eFKKBWQ7AP7q+PTFjB cDvVcDtEvqdAmxCY4QLJlse4p5WM1mJ944Vr0YA9yxepnDlIAYUz+kfySW0sATI2BUy3 Lf2ZOPZmuZE9LkAz8pgNk73nG836+mffdvtccLjmFzV4XJntX7xCA/2jqBoH5LR69gL2 gDUl4zV0RB4GqXgxPNItWYj8LFnkFd6/BloOpZIoKYXBKUE201/60ZjfyBf8tGAZHEHV kfzgtoD/zLMFwILSgObeX8gDfc6eoXF7WntMkE4AiV0oQ36eelWagOwdu88wij++upzb +Uqg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cW2w2u0j; 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 5b1f17b1804b1-42abefb92adsi29241745e9.122.2024.08.23.06.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:41 -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=cW2w2u0j; 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 2959988A99; Fri, 23 Aug 2024 15:49:24 +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="cW2w2u0j"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 683E6889ED; Fri, 23 Aug 2024 15:49: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 707AC88A29 for ; Fri, 23 Aug 2024 15:49:19 +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-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3730749ee7aso1111114f8f.2 for ; Fri, 23 Aug 2024 06:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420959; x=1725025759; 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=JMKR9bGfM0t7gPRNHqzFhAKLlfcdWZvsACjtC+GS4O0=; b=cW2w2u0jof9XesCghFIF6gnMmNf/rPtGU4jfDoE9UiOwtd6Hp+wiiy8Jm9oINn47NN fPn7PIAALtHiTJIHoTHFIjSeXuZWk2IJ1xCBxFlWW6/Uw3l86hbz3cyMgFgmLfUNAhNA i+GhvwUSjckG7rp3FRAy7xMgIWfStEr9AnjFXu3y4DsjCf0d0IoTCC0zqE6FYKhxHkp+ Tm0seB4mFGjWzWznE9f4k/5ehKZq5qBzH1nVYVPyxXsWnaT/ti0vim0jpfdoN7nGlNbV RpGDHRE7Ih6RMKZpsIEGPeV2wlwAzaxVuHLJRQJncMDquOPionGMIyc9v4PgA2IEEpDA 3FOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420959; x=1725025759; 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=JMKR9bGfM0t7gPRNHqzFhAKLlfcdWZvsACjtC+GS4O0=; b=tMe98bzaB7WATdpC9u75xnI/GWllPMJCbC9KvRTpzFENYVBOaNpZio1i/UDSzAABdx WlaMkCeAvhGWlzxOByXybMnTWuQ7xDlV2byiPNM6KrNkayXdT+irEtV06xw6qFbZQMEU eecpRgev3byUBFQSl4EUhClUksQS+Ag3QMv9ZxE3+ZeQfpUUYNVwB5nAVShusdDJUDTK U9JMzz4H1l9dwcf/DwzBFyWAOReY5a4lq2O+YLXAGRKed4faX5muBRTmpX79lb30FlzU 9RdELrSlHSCk0Mg3Aeno4UTHawgK6u8RBwMfnSvV7dWirBF8PSOEe9lJcWUO4KacJDe9 +66A== X-Gm-Message-State: AOJu0YwSWCAXa/uLduw/UwF/fB8l+FuHR3c4cEGwQrUID6QinNq1Jyrk en4GJP5q/YRSopMJ2CBln1w2CMDafdt5hb6jmCo5jnPVtwP9GETydzYJ0oKCZA9OBKX8eG2zAvq hQ1aR408z X-Received: by 2002:a05:6000:e52:b0:367:9d05:cf2a with SMTP id ffacd0b85a97d-373118d2295mr1537431f8f.42.1724420958621; Fri, 23 Aug 2024 06:49:18 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:18 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Yang Xiwen , Gabor Juhos , Jonas Karlman , Robert Marko , Boon Khai Ng Subject: [PATCH v9 08/37] net: ftgmac100: depend on NET Date: Fri, 23 Aug 2024 15:48:12 +0200 Message-Id: <48e475e43d3e10d1d59cf55a09066460db05b7aa.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 FTGMAC100 enables drivers/net/ftgmac100.c which uses PHY_INTERFACE_MODE_NCSI, which is defined only when PHY_NCSI is enabled. Therefore FTGMAC100 depends on PHY_NCSI. However adding such a dependency causes a "recursive dependency detected!" message, so add a dependency on NET instead (PHY_NCSI depends on NET). All in all, either the stack is NET and FTGMAC100 can be enabled, or it is NET_LWIP (or NO_NET) and it cannot. Signed-off-by: Jerome Forissier --- drivers/net/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 69ae7c07508..3382e533f42 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -461,6 +461,7 @@ config FTMAC100 config FTGMAC100 bool "Ftgmac100 Ethernet Support" select PHYLIB + depends on NET help This driver supports the Faraday's FTGMAC100 Gigabit SoC Ethernet controller that can be found on Aspeed SoCs (which From patchwork Fri Aug 23 13:48:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821714 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386774wrh; Fri, 23 Aug 2024 06:50:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVNdgJigDRI61oHlQWL18RPHyn6lmFecyETnC33ccD7IcVbaeg8dEQLSyik5LIKumo771ZEmA==@linaro.org X-Google-Smtp-Source: AGHT+IFPoX7TjNkLkAqDIuDVm6e+2ceCMNLYCEpopKCi4SkpDFoGbd2vAKQbdBTTECfAcbaFMsCf X-Received: by 2002:a5d:6b46:0:b0:368:6337:4220 with SMTP id ffacd0b85a97d-37311842f50mr1661853f8f.9.1724421051510; Fri, 23 Aug 2024 06:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421051; cv=none; d=google.com; s=arc-20160816; b=naL9JhbkFTdtll1fJnyPmwaEIDl8x7BgDNKhzvoh8dEc5NkLd37ieNJsdy1L1dznJg +KU5ZKN8o5+dogo1WUOfy15KAgCru6pWnwrFyHFwnCbHfGf/DAmFN80MUuwUlsQyFDYp Git4ouO2JmFl8AwMY9ElVmdb4E64exQOu0yAiUb0hY+jWDjETmV96IbCWgrBERSpr01m 1zDjzfcY/i9L4OafDdZRa750biTV62V7gZa/G2Q1okwYf6+MM1I6eGGjQopTx08QQH5U 4Rnu6mkD0Lrl+/O6BjVCE3X/0yngr0Qtn8F+jOKxBWznQFZafvi80kn4wTbOTIcZ3dGU m4Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ALJZhM9QCzxl8KYaUtyIpLCZizsdfn1cqW7h7h5CSXA=; fh=SXjg0dq4Gkc1nawO6uuco7KqcO44D63MfTCunW/ARls=; b=oLiRVFpeeRwjmKK11StVCtAOL3Jt+NrMUTjRUWC2+eCwpEqXoh8fh/m+NcVppsI2jl o5pvX1razRx+5/tFQMazsjjpfFwPL5ZoY+T8tmE4AT12dzmR3GrLhJN03BZQnBWvN4dM 5vR1YPJjNrv7guDTrZUNpugQ+XCQwhDRm/kMeDAFX/FF96Ew2xq9eC3oQeZoq7BkbzHt SYRlbZAYgxTcjTfaxMDmQcU6Nqc/XeW+7lXC6WcJWNAq0PA4/SUas4SOCYRixYqJ6iJq wdivX7qlypC1IHOd6EfLcsxn8n45GkBws+hgsppNj6TwrkF4a5oZgMC9d2LmsHdT3cA7 f3Uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uKAqkyAf; 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-37308121a1csi1523144f8f.213.2024.08.23.06.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:51 -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=uKAqkyAf; 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 7BD5888B23; Fri, 23 Aug 2024 15:49:24 +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="uKAqkyAf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 07D3788A1E; Fri, 23 Aug 2024 15:49:23 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 7336288A5A for ; Fri, 23 Aug 2024 15:49: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=jerome.forissier@linaro.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-428101fa30aso16366365e9.3 for ; Fri, 23 Aug 2024 06:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420960; x=1725025760; 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=ALJZhM9QCzxl8KYaUtyIpLCZizsdfn1cqW7h7h5CSXA=; b=uKAqkyAfH55CRkHLFaZmbf8sO5oeSbm4Nsta7XrueIADPq8Mokvvjhg0DBsv/sAv3y khg2NYUNaI9ueksrfl5JB3m88abehGpRQB0yceD/4QCJK/0VM6ViTA8GWQjbKthUhPV8 oJy9ANv6WC9ENx3r+XtptlrZCrilu/PPccSE1RRTGi/tD386W0ST/KEtb5agxrVXUlB7 vIByq6UUMaaEjFS++zOBbI7ZdspmVtu5rDVMKjwB1cY3iEUBgmc/V2hZtsyj3/OxKT08 /XVfPJ+rUxCiibE6Kl82G6oUOz3+18NlO31QMmBIxygWbMIpQJljDqk8FJ8J+pPNN1EC yekw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420960; x=1725025760; 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=ALJZhM9QCzxl8KYaUtyIpLCZizsdfn1cqW7h7h5CSXA=; b=iPyfYjvnYasIHuDr13yZe0lp/lZlpeBLrnysiPL54DiowAoJx6DtX20Zi42KhuAGxh NMj8U3ZCSPQuHtUd7HYMshEGWW8NHLIY/5zfwPQoLe9wCKTclQ/cIIBIt0Z62iITYH0k HcwWeBuW7VvDtuNJMC8oIt6s9IzcUG+WsgPasF+FP3UxMXY0HG02r2uWgulIexTVDZ2i 4HVeWrQW3jGPNfHXVyiSguhqImGWhgUJuwWJoZvlhZEGTde+M/jjeqwmADzMlwoGgfjV aiLNAA2zcqjrGIxIgB1D60Eo/JhSIZ9QifjZx+m3Ji9iBXa2VU40NfHRVICc8jzaaz4V fRmw== X-Gm-Message-State: AOJu0YymARZHIF5kZ2kwMluup9UMQxLdgC7X5TflqA/fuALe//xY3Xll hfMNfopv4a9ukKq1GeXTyUXAaigyJVpNv2Rs5N7SsCrPv4tDCEXPjhPo110cPYZaOgbOBb31XgL 9mgxfGJYJ X-Received: by 2002:a05:600c:3541:b0:426:60b8:d8ba with SMTP id 5b1f17b1804b1-42acc9fd9demr18357455e9.28.1724420959550; Fri, 23 Aug 2024 06:49:19 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:19 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Masahisa Kojima , Yasuharu Shibata , Richard Weinberger , Marek Vasut Subject: [PATCH v9 09/37] net: wget: allow EFI boot Date: Fri, 23 Aug 2024 15:48:13 +0200 Message-Id: <174c122a2953d503dfe1d69401ce6c618ca0e3d3.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 wget followed by bootefi currently fails as follows: U-Boot> wget 200000 192.168.0.30:helloworld.efi Waiting for Ethernet connection... done. HTTP/1.0 200 OK Packets received 13, Transfer Successful Bytes transferred = 12720 (31b0 hex) U-Boot> bootefi 200000 No UEFI binary known at 200000 U-Boot> Fix the problem by adding the missing efi_set_bootdev() call. Signed-off-by: Jerome Forissier --- net/wget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/wget.c b/net/wget.c index 0e4dc5159d0..cf7681a4e79 100644 --- a/net/wget.c +++ b/net/wget.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -429,6 +430,9 @@ static void wget_handler(uchar *pkt, u16 dport, case WGET_TRANSFERRED: printf("Packets received %d, Transfer Successful\n", packets); net_set_state(wget_loop_state); + efi_set_bootdev("Net", "", image_url, + map_sysmem(image_load_addr, 0), + net_boot_file_size); break; } } From patchwork Fri Aug 23 13:48:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821715 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386847wrh; Fri, 23 Aug 2024 06:51:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVhZ8l2DxC3oWpz+14vs2c03puewUm6RMGpCt/CPCWBE+OhdJmR2PS8P96JuT1lPCrV32mGmQ==@linaro.org X-Google-Smtp-Source: AGHT+IGQVvl50ttAzFp0wvoJFooymBtdgNeMJc+gwNZq/YZN6+neTe1NzDm2NOXbm/uzr+wB2CIP X-Received: by 2002:a05:6000:18d:b0:368:3f04:d5b with SMTP id ffacd0b85a97d-3731185ae8cmr1261351f8f.25.1724421060360; Fri, 23 Aug 2024 06:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421060; cv=none; d=google.com; s=arc-20160816; b=XpMF0e4hyCxuuVeREhYTNGzeyddm9b3PvtZWv8RxnsDnjMGJhHoY1Dr59slNmehx42 hiteqTG7E0W1XcjqwzhdEwh7oreQ53okQgV15k1BebksU2OYC5h8NHLHpMo3H1qicQBM +4syxjTySKib66gY9ZnLMQ6QrORzGWWp0giY4AgoZMoCZlqVvf9QrzVgpUqHf7+BhpuQ HN1MjYO+UpglbAj+e27Pa7K3oSatwWGp9xMgoJyFedTXhmTRGjCJD8VnjNGHpwoSPNDt NOGhz41kPLSJ2WaHs1OPNKutsIVxy893KP7fXzuteJiddVBKlN02POOq4Y0GiKRJtEGR u+Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Drt734jtNXjt1i15GA8hE9TCdNeg4g5UkVsQ668keI0=; fh=bDmf1hIB/fYfmYbF7FRerbBaeBT6RLqYlmYkTMiXYa0=; b=eAkJ8wesoa3c2TvmbntcrZTEyHh7ZTxepIi9a5YIe+DuqceT7UvK2s479fFkRmIdEa moPpUmM7Wql329iR8BQInNqUtBkGRtq2iu7rGGpU0sYy4bdAidrOTtiL3tO3COtrZVCa dHZdp8eWxpieRXYN8ntv4bPCpJ2iZYWX0Wpv1llAriGvyzo6ZG33wpB5Dq8F6vVlZ23P noEUw9HxKWOwQeBQV2Z+bt7ac4XRnrZ+TPo4kMHfvgDc9sxqVjeRbhyz7Fe/2ntA0fsT AWgEwR2/8nIXyFo21u3rdiRxvjF4a5zWj16qY8nn7SUBRWu2d6Q1QiiRrX+iEnFzEJv4 FP5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qCQfOrGN; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-3730811811esi1576208f8f.148.2024.08.23.06.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:51:00 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qCQfOrGN; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 D3FBF88ABF; Fri, 23 Aug 2024 15:49:27 +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="qCQfOrGN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4BE49889EF; Fri, 23 Aug 2024 15:49:23 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 526D4886E7 for ; Fri, 23 Aug 2024 15:49:21 +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-wr1-x434.google.com with SMTP id ffacd0b85a97d-3718706cf8aso1014585f8f.3 for ; Fri, 23 Aug 2024 06:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420960; x=1725025760; 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=Drt734jtNXjt1i15GA8hE9TCdNeg4g5UkVsQ668keI0=; b=qCQfOrGNufLPypM5XM1+per0euSg5Ln0VlqJoLkOTOUqvnfWnvhqCmgxNDYliSE9Yx UY2LslG1r8Xa683lTdHGYNooZQRu9rKBLPHMLs4rtKBeIrl6qvWD2edmxX70gJPXE1Mz jBmuL6cz5n+cmkwohqi4NNMVXnLI1cB9uInycl6789xF8XHs+cRKc74SzX2UUCUG07TC hmBHSw6Jv1MZQqEjUOgHJGS02lMX7pZCxkix5tWI0AnP1TYocq71Xn7p9UmmOI5XtAqG VdaCAtYM4sHLSmJqXyVMUdfYeX3bqtlzc3IzZ2E0vvLCRadBncsl62kSrh54tVdVP5ET tuYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420960; x=1725025760; 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=Drt734jtNXjt1i15GA8hE9TCdNeg4g5UkVsQ668keI0=; b=BNPpbs912aGtVbzLQaJuRFtBsbEti16ro71wadH/hmQvkNAC53PHcfPC1d/bZBH1Q0 qvv2LxLlULgAUWC6TxYZp5iwmhSlnGbk2n/SV2uLdn93zOErjzeh/itGIWmWk5dXB798 ebDvSr4tCrSrAVMhXYHntE9v4yk7lcuMhmTJaHGPSrTlcpbDDNg8H9EumUYEpvnr28TV vycAAsDgzhCahUaAawNny8IxGP36bnDg/C0F5NJ/xvxxT2gRaUm2+vrhleIVHOwKH1Y6 F7LjuhJ7ZKLTh7VlXLkqfWD4E2NGZoPfUpkx3XRyBh2ABhIHzZsNa0EjvOty3NQr4uYu FtXQ== X-Gm-Message-State: AOJu0YwApBsmiAa4fxTbM5v9wu4aWvT4pf5MFWA9MIS5pU3EEjFNGjLW H7UhSkgDUqwNMvZZRQcD+aTCYa/mWX62J3bxdshQX4vWRRleegX+Gy2VvNIBs5Le6G4mvgQiYaX FCApfxkre X-Received: by 2002:a5d:68cc:0:b0:371:8eea:24b4 with SMTP id ffacd0b85a97d-373118e4170mr1405025f8f.61.1724420960513; Fri, 23 Aug 2024 06:49:20 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:20 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Fabio Estevam , Joe Hershberger , Ramon Fried , Tom Rini , Ye Li Subject: [PATCH v9 10/37] net: fec_mxc_init(): do not ignore return status of fec_open() Date: Fri, 23 Aug 2024 15:48:14 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 fec_mxc_init() function currently always returns 0. This does not allow the callers to detect when for instance the PHY initialization failed due to the port being unconnected. Fix that by returning the status of fec_open(). Signed-off-by: Jerome Forissier Reviewed-by: Fabio Estevam --- drivers/net/fec_mxc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 0a0d92bc2cd..2dc1364beec 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -615,8 +615,7 @@ static int fecmxc_init(struct udevice *dev) if (fec->xcv_type != SEVENWIRE) miiphy_restart_aneg(dev); #endif - fec_open(dev); - return 0; + return fec_open(dev); } /** From patchwork Fri Aug 23 13:48:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821716 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386920wrh; Fri, 23 Aug 2024 06:51:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX++BaVphMoHjVIVblnKce8KXzNqZY5h2PY2dwWEE/GT6Kv9kga8ppZUMCOGyQJ9+i+75aaVA==@linaro.org X-Google-Smtp-Source: AGHT+IE3rBxoeUi53gDH63bIdaYam4GFg0Bq88h+zg2n3QXI4CdggmLMHtNZVugkomx6IqPNOBTS X-Received: by 2002:a05:600c:1546:b0:426:6b85:bafb with SMTP id 5b1f17b1804b1-42acd578731mr15736875e9.20.1724421069700; Fri, 23 Aug 2024 06:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421069; cv=none; d=google.com; s=arc-20160816; b=OrchG3O6K5DIjw0jaSiUjym9Hf6bFz6GRmaNYbeMHRgoBJvWSPm1ja0gUblGGZNBz+ 9nkAeEvvgWAlhK6EvpjWF+zmghgJhq3KezbbFSh0WFHTurnx+MCHUEpnLR9na95wzuTw V/JzUJmQtnN2MJLI6ex+MWn00kmKIf1zRLIkpUlIuvT0OjwwwUZ6s8cPZ8fHK3keeNUX fgwxePBBN+Et2PbaZFAS32nP1o8GWZbWUyJ+K1DrGDcs1tkyEqXfNYrquYzHD3YqW4BY BuDPHg4dVV93vNoGOwJtYl1pl1k39eDp5ydJA++ZTyEox55wCM6hy7v4BOL5eDOcOhEu jeXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g5c54Y/Z1u+SJekYUfgCqCf8R4TK+obXabSgR9vSpbY=; fh=1nBcgMFBZT4AoIR701rzG2HBQfUo/S1UZObWq/OzqWQ=; b=PW5OL/IXbZeSN68db5RrUvV9WUS7VLq06dv5ezQUiexlc6g/f8tO33qfa+o4Zjh/gC c5FBR6b/2qO3do2JoCYZvNreZeEE7OveRhcCNx4Mrn8iZEDtYpZxeu4aCC9BOrasIXdK UK5PSNm4DjRbUvpUMh35e7n5HoCCz5DstohHpxG5QhmvYJNfPece7Qz2Ptyr41zKFfl/ 2V6Gw/6jqKS+LOLUR/YrdMJSoaHBgHS2j5B5Q4aloBo29jP9JluGC0r/9/8W8NnQLtyv Bb944fa5GP3LMdDhWEJ4Sa6nMWNJu+EoRWzypI1ThDE3hC2FZFybcyrEYQgbOlYeISZD CNxQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UAlXL8nl; 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-3730821c832si1549798f8f.512.2024.08.23.06.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:51:09 -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=UAlXL8nl; 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 3140088B5D; Fri, 23 Aug 2024 15:49:28 +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="UAlXL8nl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6BB4E88B13; Fri, 23 Aug 2024 15:49:24 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 8CCF488915 for ; Fri, 23 Aug 2024 15:49:22 +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-wr1-x431.google.com with SMTP id ffacd0b85a97d-371afae614aso999816f8f.0 for ; Fri, 23 Aug 2024 06:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420962; x=1725025762; 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=g5c54Y/Z1u+SJekYUfgCqCf8R4TK+obXabSgR9vSpbY=; b=UAlXL8nlBpzpTSxbyHk3oZaOt8xGBMpGx22+6Rc602lcVFmGJecfNQ7o3EuGfh3Fok ykDpkdPJhBNWxIfOWX+UDpKBtMQa2C0Ov7oezdhDIUG2QfeKrYPIxBkrdLx0X8Gms+AS WXfqKWPzFRnautmg9CxlCn4IAnWoMTZkUHy55ZG+SUj5RYRLJ0Kil9dH/lF+QEbTAnRc QvUhmQfA8tc0i5zTszRgd7mJUZykhCpg1ewgZCiHcJnawpqDnLNQ50YtfwqELXBTTao1 bUqUVPsIsxJLYch3yqR8iMzlM7WGwMAJWsqE3yCmfGd7ODOOuQmVtmTGjyBTIXL6+BU1 qXAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420962; x=1725025762; 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=g5c54Y/Z1u+SJekYUfgCqCf8R4TK+obXabSgR9vSpbY=; b=ANZrTTrBWpAY2FHCdy/As7L1ZUK7VuMW40i0C1nNCjAq5yaKk2oPAYkzvip+GURHIm AET1uaU+6yfynb0a4tFcR2c8Ei0yQ2ugX7CTxIKhX52oUzHU15HtFp69/f5btdvFRMoe ef3+G3DgWjNYkEPQtfBVBy6IkReDp7gdubNKztfLZjHUGY+qkyf50Ht0Zh2h0cMbCyMd Pb/ZP2z5jRPB5W8ehx0pBqO0Up329seAQXaR+NiKNKPMMXdhaJb6jq/EtG7JD26crL+E XinLEQ/YYKNq2O+kZo1+8uv+g539hm/H+7L2+3srVKF6df9TruKLT6qxI/q0onP58REW pX9Q== X-Gm-Message-State: AOJu0YxUJ5p7t5P94S8lC4MBEO+dv0VOExWwGhW+h0Hl0ti0gLafnpz4 ZFrBvCoZWoauAiXVcmqKlG8G/byCs/Dr2/IvDq0gqKDZGXA1ClMi2s0q9ztRyu5WJfxsXqbJkJO HolKA3ZyT X-Received: by 2002:a05:6000:11ca:b0:368:4634:c419 with SMTP id ffacd0b85a97d-373118e40eemr1583879f8f.58.1724420961817; Fri, 23 Aug 2024 06:49:21 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:21 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Love Kumar Subject: [PATCH v9 11/37] test/py: net_boot: fix comment Date: Fri, 23 Aug 2024 15:48:15 +0200 Message-Id: <1c773c44fcb7c4e792fc23f1d0f5bd19dc4ca6a1.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 If env__pxe_boot_test_skip is not present, it defaults to True not False. Therefore fix the comment. Signed-off-by: Jerome Forissier --- test/py/tests/test_net_boot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/tests/test_net_boot.py b/test/py/tests/test_net_boot.py index 63309fe82e1..d7d74356928 100644 --- a/test/py/tests/test_net_boot.py +++ b/test/py/tests/test_net_boot.py @@ -75,7 +75,7 @@ env__net_pxe_bootable_file = { 'check_pattern': 'ERROR', } -# False or omitted if a PXE boot test should be tested. +# False if a PXE boot test should be tested. # If PXE boot testing is not possible or desired, set this variable to True. # For example: If pxe configuration file is not proper to boot env__pxe_boot_test_skip = False From patchwork Fri Aug 23 13:48:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821717 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp386991wrh; Fri, 23 Aug 2024 06:51:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVL6Uz+TIUxeOa5YWdSSBtWYX8ztwk5LHKVDVcEIseijlxaWDVa+Y1Ys2nyEdCpBlH+7iuK4Q==@linaro.org X-Google-Smtp-Source: AGHT+IFTEzuaZQVGiMfgtohflrALXCvPoUNmRYBdT/J8Brpx6jqGukfLlE7PgeO46dWBxpfJ4Ym1 X-Received: by 2002:adf:f707:0:b0:367:8a2b:7354 with SMTP id ffacd0b85a97d-37311852212mr1375438f8f.11.1724421079134; Fri, 23 Aug 2024 06:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421079; cv=none; d=google.com; s=arc-20160816; b=zedKJhUPKfaahiZr7FZ42bCQ91NAIG4yhUKUEnB/ehXHswgnYklqxByZszGdapyc2Q gy7iee290WdN8V2tU/X9BSxvPAEgOI0z7A0hCRD9v3gHKRw3LBtKoGTFk5Vk+d9zmSRA qIBK8BtGsKIpW7vOLbQEhq79nR1eoTB3pKb/eF2wi+BNb2MGgjgPt5uQSBa06FjlRMvA 1XOXqoOtYT8bIgv57C8+1BUYfP3sliM7lMla4RjT8yPCljYtYfABXV6/pC88msKPR4kG vR2+1UeWUkmVklyRVmzktSGIAXrjPeessivp7VApF9UJDsJCWN0et29kXoIItuXZlQfh B3zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uUf12qyXBpIPIp7vkWsoH30nB/Xckz+vhe6qcm5h04w=; fh=qIjE2ZQOwsHaLhmnxwBLf+kkJk4WcUy6Cvmh2QOspmY=; b=VSrKfBQI4OmQxDJ6KbFljmqZ0FlpqaoYi7buEKcHvIKuHcwGnRXHiL92/QAZm05h45 LQEQNv1fwS/zY2ciz9rvHL+YB/46X+Tunm8Cyl3UMKL1gNYpusMim3l0d7G/tAtodY6J I+X+5xlTuNtlhssbF95qrv7P9NHv8FDmgobgjnkFsOYJD2QzEMX2s691fQF+xzxa8OKG PhfMhgMc3WuM1O2z+42y+D8qrouphTyp8cwfn3tyH8Oierb2gZHJC0L9aH32DMJxGQKj RGEJgnT1HIsPPik8EIQfRygFu42R2fyOyja/Vr7mgiacGmWNE5ma+PRYdMO8UWO1JvPA sE8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cztrQrO7; 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-3730820073csi1535548f8f.300.2024.08.23.06.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:51:19 -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=cztrQrO7; 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 7D2E288B82; Fri, 23 Aug 2024 15:49:28 +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="cztrQrO7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 61311889EF; Fri, 23 Aug 2024 15:49:25 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 7C9FC889EF for ; Fri, 23 Aug 2024 15:49:23 +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-x331.google.com with SMTP id 5b1f17b1804b1-4281faefea9so15102965e9.2 for ; Fri, 23 Aug 2024 06:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420963; x=1725025763; 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=uUf12qyXBpIPIp7vkWsoH30nB/Xckz+vhe6qcm5h04w=; b=cztrQrO7sbumw8OB0ygJ9uSATVYNCsssvZHHPTbtClG9thaOyvxhE5f+Piy39lyFAP +INW/1WerJKPOpSdq3H/s8Im07rlyne+KEDkKp90+77OaT7AZdULI0jinsGtk9G1krUD 0L8jhJgNVXmVFVfIaU9V6y1+b+isZZXJPo8vnOUvNb/fVnhjdf81jTQuwo2gvlVkRUiu pWRiYqNwu499CKK/n8KVbGc5bTd6JmnVFL+/iCoEEKSwxooH4pvfmzf4CoCn69DwLk0Y MLuc/s3V7pfRhmSwV/fEHhvqFHHzrKs/W/8x6l+WtA4ZwFGmHyCrSg/3J0kB2zqRI+yo DwkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420963; x=1725025763; 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=uUf12qyXBpIPIp7vkWsoH30nB/Xckz+vhe6qcm5h04w=; b=LgkXtqftBnSzkRtLv5JRIkBjSmcp47Blfqvo7xqrtgqXo2M4ZiT0EOGPlGw6vxYNXm m/c1fxt4EnYenvR250SG+uL93uGU420VX8nUQLTIfaqxjm7QIHRiQiJ2J7Dc/+cMLr8G 2N3uh0Ri9WZ3X58uZy3ZJhboONHa0b5MdgL1oW1o4i7GzMmoYHyEGNjPzWN4xII5U9PU wQgyUmVf3bRw9QA4YU5Y5CpOEidObkVg3qh0RoAk9NXxW+D7OG9FzGRjdBD/Z8e2TbqA ArITJoZsvYXZCvNA0AK2uUkKRyD7+O2OC8f/KJlgykrkqtQ+bBUxotgZigGg/zYpNdOh 6rDw== X-Gm-Message-State: AOJu0YxUSpboGPMQ9EsBUEy0S+YYspeh5+y/89QAQ4KCVJW3hPjOQAd+ 20FoCe9Yj1LuHHCy/2fajC4PbJZjpQeFBFBFf0f9AquokuEhLqW0DM5amXgjsjoZsPSADA66Mg4 tyDtiFi/A X-Received: by 2002:a5d:58ea:0:b0:371:8ed7:49e9 with SMTP id ffacd0b85a97d-37311875227mr1457735f8f.26.1724420962651; Fri, 23 Aug 2024 06:49:22 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:22 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Heinrich Schuchardt Subject: [PATCH v9 12/37] test/py: test_efi_loader: add missing dependency on cmd_tftpboot Date: Fri, 23 Aug 2024 15:48:16 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 test_efi_helloworld_net() and test_efi_grub_net() depend on cmd_tftpboot so add the missing annotations. Reported-by: Tom Rini Signed-off-by: Jerome Forissier --- test/py/tests/test_efi_loader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py index 85473a9049b..7c1e0ffa594 100644 --- a/test/py/tests/test_efi_loader.py +++ b/test/py/tests/test_efi_loader.py @@ -149,6 +149,7 @@ def fetch_tftp_file(u_boot_console, env_conf): @pytest.mark.buildconfigspec('of_control') @pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') +@pytest.mark.buildconfigspec('cmd_tftpboot') def test_efi_helloworld_net(u_boot_console): """Run the helloworld.efi binary via TFTP. @@ -178,6 +179,7 @@ def test_efi_helloworld_builtin(u_boot_console): @pytest.mark.buildconfigspec('of_control') @pytest.mark.buildconfigspec('cmd_bootefi') +@pytest.mark.buildconfigspec('cmd_tftpboot') def test_efi_grub_net(u_boot_console): """Run the grub.efi binary via TFTP. From patchwork Fri Aug 23 13:48:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821718 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387071wrh; Fri, 23 Aug 2024 06:51:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwv6LWwXAZsSUNQlLVU6hhhj64/SbW2JUyaJ8+axrF1gZkG/u7vbcLKAHZ5W6cfMcnvO2kkw==@linaro.org X-Google-Smtp-Source: AGHT+IE6uwTNsDEJtrjpet60BqrJ9rQ8GcLyWGnkx8QvyxXaQXHZi190C/ddMe45gojTObJf2Fpi X-Received: by 2002:a05:600c:3152:b0:427:ee01:ebf0 with SMTP id 5b1f17b1804b1-42ac389b58cmr40151535e9.8.1724421088882; Fri, 23 Aug 2024 06:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421088; cv=none; d=google.com; s=arc-20240605; b=h9jPAgV6tKzpt9hD6GjONwmxo1XTZIXs5eEeWCPZ0LGOQtVvRk0WekbkZhL9yEJ6ZQ C7i5pQHVnmoqQkBq+4vGIFWOhlf731zzD/qqjbKLA9uOaCscMMHCqpm7v9cdyM27xwHZ 4DfdTFbaOy/xVx357H9kCRIHpFHziC/VxS0pY7Qq6IbFjNXFs8TnYJzwNSAozrueew5e bzNuQJeFi/5N5bZqhgxgYmsppBIWuoTWJW9ml3Zz32ZmfC0ynPRCQOfsrL3u9OcxZoPs JcAj7pTWJaX2H9YPb3Z09P0exMvA/AIP8AD9waySB4gO9iLhdefEfCUvVpKIedTTgPch G2Qg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RmknMyAEHfs1JMtP1FJ6M3yqq1Eqt8h9Sbcy1PINCR8=; fh=qIjE2ZQOwsHaLhmnxwBLf+kkJk4WcUy6Cvmh2QOspmY=; b=l3pAmXkS8uA0quXfujIxLL9T4LWRnnhZ0OQxPRQZS2nJrPop4kRlwI2g2wG6U3gWJd tuFr3JF3emMWJWan80JXHXehR1aZpz+pEIHF7Ww5y3Oojp6xI+24lJFYrL7RH2lmZ6ec IV7vTOAqgbMsGezGkMRjR62GU/M4W2ezRGg77CpmRYN1qlXW0njb/QybTJELm4qtQLU6 cch1kLzWA+XncXonD5pf+ZILpl8msVHfsiG/CyEUCaR5CDcknmSlyQEZrN50MDDLl/SU I51uZFJbOzumtm+5ftVw+xWas0TAUh959oJVJ97WrSXc726eXryU3qZZ5fQwIWY5igE6 TUNw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iXB6v/76"; 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 5b1f17b1804b1-42abefdba1csi29474235e9.171.2024.08.23.06.51.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:51:28 -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="iXB6v/76"; 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 D035488B9C; Fri, 23 Aug 2024 15:49:28 +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="iXB6v/76"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 622A7886E7; Fri, 23 Aug 2024 15:49:26 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 608C188ABF for ; Fri, 23 Aug 2024 15:49:24 +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-wr1-x42f.google.com with SMTP id ffacd0b85a97d-371a13c7c80so1738729f8f.0 for ; Fri, 23 Aug 2024 06:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420964; x=1725025764; 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=RmknMyAEHfs1JMtP1FJ6M3yqq1Eqt8h9Sbcy1PINCR8=; b=iXB6v/764QzMXbCDmNkR5IlwHnCXvFqFd6xV+Ryoqh/JezzUbh4U71TY5/GgG6XICi rVJ0LUHP7Rwj9jXOK2p6B3iK6HBArH9wo49LUu1ZMCfcbYDMsQ43hm2OocAqJBluhXo+ FUT1lOeLogROsAOzv5S76t7pO519+sLZx/2ra3NTFn32eGR34ct22ReVSsitFkCCyMct dkx4udxgbkV/UX0IJQXcxs3AHJH+9tu/OJo+99kYkizNMR4hoeHFEXYY9zvf/bynMhuH +TUdAhupXji7KScyCzp7osBBzxDdSTmoArddjCVhqeaJQEPA87LlEIfbmXSG+LC202+r bIDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420964; x=1725025764; 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=RmknMyAEHfs1JMtP1FJ6M3yqq1Eqt8h9Sbcy1PINCR8=; b=dDD6/Kh9XkVev4GMH/WpxZ8FjDH096KU7wQuBqHprkHMMCPELVWw0ijEftK7lLr04w 1LXBKB8TJ9M4rMRocZoAa2XiEXgmu7BSTMzV4XR45FbnMnqv7+Sa781Z3QqqySrFR987 4lccy0M0t64h1xjx5+1WETKfX0omfMhBRgz6qInJteeuvsX8ElWNIXuwWLn31SfrkXHs +o2wO3poO1Fpi80KuREtlHu5f2AklGM7DR+EXKMHt3M4xI7/bFjutRKyq79MjW8ZsC6m +4k69fV79FFdn1QJtW+9WXQvjmb1uIug2Em5V8yPDnm+focswQQ9aABO8U+vFZ/oOMNo f59Q== X-Gm-Message-State: AOJu0Yx4fmjfdRHWS+FDVBxM1KC+r+ix16Dhdl2XHyv9qIjFMkOOAZSm rTISLyJyXKDfypPjOhNDhTiOOEhQyu9MPYnMbbwOrdULqXIeKgiTIwePuihm1u/fcWlcWjzWksc h6tnVyOFC X-Received: by 2002:adf:f8ce:0:b0:368:6bb:f79e with SMTP id ffacd0b85a97d-37310eb3921mr1502688f8f.4.1724420963540; Fri, 23 Aug 2024 06:49:23 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:23 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Heinrich Schuchardt Subject: [PATCH v9 13/37] test/py: test_efi_loader: add HTTP (wget) test for the EFI loader Date: Fri, 23 Aug 2024 15:48:17 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 test to test_efi_loader.py similar to the TFTP test but for HTTP with the wget command. Suggested-by: Tom Rini Signed-off-by: Jerome Forissier Tested-by: Tom Rini --- test/py/tests/test_efi_loader.py | 62 +++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/test/py/tests/test_efi_loader.py b/test/py/tests/test_efi_loader.py index 7c1e0ffa594..5f3b448a066 100644 --- a/test/py/tests/test_efi_loader.py +++ b/test/py/tests/test_efi_loader.py @@ -45,11 +45,18 @@ env__efi_loader_helloworld_file = { 'crc32': 'c2244b26', # CRC32 check sum 'addr': 0x40400000, # load address } + +# False if the helloworld EFI over HTTP boot test should be performed. +# If HTTP boot testing is not possible or desired, set this variable to True or +# ommit it. +env__efi_helloworld_net_http_test_skip = True """ import pytest import u_boot_utils +PROTO_TFTP, PROTO_HTTP = range(0, 2) + net_set_up = False def test_efi_pre_commands(u_boot_console): @@ -110,10 +117,10 @@ def test_efi_setup_static(u_boot_console): global net_set_up net_set_up = True -def fetch_tftp_file(u_boot_console, env_conf): - """Grab an env described file via TFTP and return its address +def fetch_file(u_boot_console, env_conf, proto): + """Grab an env described file via TFTP or HTTP and return its address - A file as described by an env config is downloaded from the TFTP + A file as described by an env config is downloaded from the server. The address to that file is returned. """ if not net_set_up: @@ -128,7 +135,13 @@ def fetch_tftp_file(u_boot_console, env_conf): addr = u_boot_utils.find_ram_base(u_boot_console) fn = f['fn'] - output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn)) + if proto == PROTO_TFTP: + cmd = 'tftpboot' + elif proto == PROTO_HTTP: + cmd = 'wget' + else: + assert False + output = u_boot_console.run_command('%s %x %s' % (cmd, addr, fn)) expected_text = 'Bytes transferred = ' sz = f.get('size', None) if sz: @@ -147,17 +160,8 @@ def fetch_tftp_file(u_boot_console, env_conf): return addr -@pytest.mark.buildconfigspec('of_control') -@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') -@pytest.mark.buildconfigspec('cmd_tftpboot') -def test_efi_helloworld_net(u_boot_console): - """Run the helloworld.efi binary via TFTP. - - The helloworld.efi file is downloaded from the TFTP server and is executed - using the fallback device tree at $fdtcontroladdr. - """ - - addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_helloworld_file') +def do_test_efi_helloworld_net(u_boot_console, proto): + addr = fetch_file(u_boot_console, 'env__efi_loader_helloworld_file', proto) output = u_boot_console.run_command('bootefi %x' % addr) expected_text = 'Hello, world' @@ -165,6 +169,32 @@ def test_efi_helloworld_net(u_boot_console): expected_text = '## Application failed' assert expected_text not in output +@pytest.mark.buildconfigspec('of_control') +@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') +@pytest.mark.buildconfigspec('cmd_tftpboot') +def test_efi_helloworld_net_tftp(u_boot_console): + """Run the helloworld.efi binary via TFTP. + + The helloworld.efi file is downloaded from the TFTP server and is executed + using the fallback device tree at $fdtcontroladdr. + """ + + do_test_efi_helloworld_net(u_boot_console, PROTO_TFTP); + +@pytest.mark.buildconfigspec('of_control') +@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile') +@pytest.mark.buildconfigspec('cmd_wget') +def test_efi_helloworld_net_http(u_boot_console): + """Run the helloworld.efi binary via HTTP. + + The helloworld.efi file is downloaded from the HTTP server and is executed + using the fallback device tree at $fdtcontroladdr. + """ + if u_boot_console.config.env.get('env__efi_helloworld_net_http_test_skip', True): + pytest.skip('helloworld.efi HTTP test is not enabled!') + + do_test_efi_helloworld_net(u_boot_console, PROTO_HTTP); + @pytest.mark.buildconfigspec('cmd_bootefi_hello') def test_efi_helloworld_builtin(u_boot_console): """Run the builtin helloworld.efi binary. @@ -187,7 +217,7 @@ def test_efi_grub_net(u_boot_console): executed. """ - addr = fetch_tftp_file(u_boot_console, 'env__efi_loader_grub_file') + addr = fetch_file(u_boot_console, 'env__efi_loader_grub_file', PROTO_TFTP) u_boot_console.run_command('bootefi %x' % addr, wait_for_prompt=False) From patchwork Fri Aug 23 13:48:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821723 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387478wrh; Fri, 23 Aug 2024 06:52:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWZu4pG/Ti7DcYT8XQJx2pgQ9Tr/PJSG21gzGyed8KC9TuTa4PhoHghlHLHm/Xdu6SDxSf+WA==@linaro.org X-Google-Smtp-Source: AGHT+IFpcbKv4zyIEbjzqlmvVnART6eoxu0PDEbcDcLVhGhlBOrSajfkA0OsWnlDJ35iLhR8hwIK X-Received: by 2002:a5d:46cf:0:b0:371:8e85:c58e with SMTP id ffacd0b85a97d-37311863a3cmr1915970f8f.33.1724421143109; Fri, 23 Aug 2024 06:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421143; cv=none; d=google.com; s=arc-20240605; b=WV3T7HeYbrLdGLIbF2CT9mTTpsEvxGKGW8cu3G1pIEzQRegWonBcCPd+FoxfMXoDNw 12PR1uCFIfP2luXtifadOYb59QjngrmlgssuebrdzUI9bz8OehPDQSb/9Bh8C7RvrUyK w6lPx/0j1f6n1vRkPJomEnw/zVddOiOs/pfSCD7dpzHzzTt2wf/xL5TqA2mmi7YjR0Pi JqFLbw6oMjsOis3mA1aP4FKbV4CUUCMiaZy31Vz5/sG9DXJulkjlxLrDROUlA+tEAciJ 2nS4pswlkumg2rHHJ0icdTmL5dJVv/uzb2vxnrgSxYSJ9vqOowULK5V/fgtBX/kG6V2Y Ab6A== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8U8R46Kw30PmmmbrNRZRFkbbU6Nd+hxBamNjuNxIY4o=; fh=2iBeGKbRpnfiwYoDz9kxT9CWEw+m0OiCA50bdHYcPvc=; b=JZu9/6dQrwe8aNqadVz5fo5/oGNQIwLtZvzxUwD49LC6R2L/T7WmzJcT9KH8Lak0BD f9BgoSxTvw5wHMsl/oVETHDalLHtpIiwnYwWhT3IJSpg8rrJNMZCXMIA8QWH2d7/TST/ cnE/Vlib2s3enLAlT+sRBpj7J9nY8hXaNxpWEFfhh0cxczR+QNvNsZa3tDbS4gmQLESD jk5RdIHnlBlL9iuvAa6Zd2SWkEgpWXeql/M4HU45i4/MQr7QO436XSUn4F+4jIFe05Xg OMYs5qikPZxsIY+QZBgxY81nQnFigXrYt9B4/4ZysSGIMfPqLimMmR9SJuAKr0CZnmfN tUOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EcsPBLdl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42abefe26bdsi29694725e9.176.2024.08.23.06.52.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EcsPBLdl; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 E5F6E889D4; Fri, 23 Aug 2024 15:49:56 +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="EcsPBLdl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A447988915; Fri, 23 Aug 2024 15:49: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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 1734D88A29 for ; Fri, 23 Aug 2024 15:49:27 +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-x32f.google.com with SMTP id 5b1f17b1804b1-42ab99fb45dso20771285e9.1 for ; Fri, 23 Aug 2024 06:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420966; x=1725025766; 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=8U8R46Kw30PmmmbrNRZRFkbbU6Nd+hxBamNjuNxIY4o=; b=EcsPBLdl3VmrNGK/y9a7KaRw5LDrFiCOeOo7v+N87Z4cf7DgTg7huqWfyp56H6zw8i HqhTaUCnT7RJDDYAJn7yIffpDJdT/4l/8dtf8dN1S84RZicGKcpLF5oA+FfY2Dr7x4KM ntunYRQfjDEr1YUuUVrkNv2hp6G/ZGuJUb5AAWPt9N7dRWYcv2tryfey7UTuDVAVMky4 x/f1pdsOn322aumD+x9srjbBXmaHZqb36hbx6ZnE6P3iu/DPN94GYYGRVVjbXryWAiEK Ylxhp6Z66/5fC+zAAdix5KhQ8EAJpWUTxeJyB+cCFExinMVNR2VM1qib4KQ+7EEbXnEQ lyGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420966; x=1725025766; 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=8U8R46Kw30PmmmbrNRZRFkbbU6Nd+hxBamNjuNxIY4o=; b=PHJbs5+cOWzxVl6pZLAlfCJvQZB5rr78KKC45QyZ3MhV2vmbCpa8XQx33koNLL99wd IWgMx9usyTYL5r9Iai2+gUs3v9/lHqIFGZmg16VUGWfCyfdPhw6RHDRIxoGOV/VGNFos RS5H6m1wpYQt+4yh8gNdtGrvqgLeDBQqg2OFZd2d0c1IfHuskK1FoRh2JM/wq24p/w2W paQDGqIFl3/qm7OuhytZRrQt8mO9ToQObi7HVN1fH9xbtBa9r6ZX0unnOpajsZiIe/xu EYjGHzIJqR0MfQ4opw2MmzoY1HIHXWAKRcHpuKgfe8qeeUuK+dQMY+7m+A2uqa9ITma2 QrpA== X-Gm-Message-State: AOJu0YwzQi2Ig/iEBfxWmYqeNT4m9wS6xdsgBK9Z7LjtPGFlGujpeRFN RIAIbQ3qp9ByDTFpu0LqEhCzVayCFd/UBlPF+JRA12k4YXRzPTt0Qw0ZL7ATJJBo7lexOgXsXP4 RlaPEBsex X-Received: by 2002:a5d:4604:0:b0:368:4910:8f43 with SMTP id ffacd0b85a97d-37311840913mr1909136f8f.3.1724420966177; Fri, 23 Aug 2024 06:49:26 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:25 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Lukasz Majewski , Mattijs Korpershoek , Joe Hershberger , Ramon Fried , Marek Vasut , Simon Glass , Nathan Barrett-Morrison , Jesse Taube , Martyn Welch , Shengyu Qu , John Keeping , Jonas Karlman , Greg Malysa , Heinrich Schuchardt , Eddie James , AKASHI Takahiro , Stefan Roese , Jiaxun Yang , Jagan Teki , Rasmus Villemoes , Sean Anderson , Andre Przywara , Samuel Holland , Lukas Funke , Jaehoon Chung , Alexey Romanov , Ion Agorria , Yang Xiwen , Boon Khai Ng , Kever Yang , Neil Armstrong , Robert Marko , Nicolas Frattaroli , Miquel Raynal , Anand Moon , Baruch Siach Subject: [PATCH v9 14/37] net: introduce alternative implementation as net-lwip/ Date: Fri, 23 Aug 2024 15:48:18 +0200 Message-Id: <073e8210e2c55082d2d9866ffd5344925d9ed008.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 23 Aug 2024 15:49:55 +0200 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 Prepare the introduction of the lwIP (lightweight IP) TCP/IP stack by adding a new net/lwip/ directory and the NET_LWIP symbol. Network support is either NO_NET, NET (legacy stack) or NET_LWIP. Subsequent commits will introduce the lwIP code, re-work the NETDEVICE integration and port some of the NET commands and features to lwIP. SPL_NET cannot be enabled when NET_LWIP=y. SPL_NET pulls some symbols that are part of NET (such as arp_init(), arp_timeout_check(), arp_receive(), net_arp_wait_packet_ip()). lwIP support in SPL may be added later. Similarly, DFU_TFTP and FASTBOOT are not compatible with NET_LWIP because of dependencies on net_loop(), tftp_timeout_ms, tftp_timeout_count_max and other NET things. Let's add a dependency on !NET_LWIP for now. As for SANDBOX, NET_LWIP cannot be used either because of strong assumptions on the network stack. Make NET_LWIP depend on !SANDBOX so that the NET_LWIP alternative is not visible in make menuconfig when sandbox_defconfig is used. Other adjustments to Kconfig files are made to fix "unmet direct dependencies detected" for USB_FUNCTION_SDP and CMD_FASTBOOT when the default networking stack is set to NET_LWIP ("default NET_LWIP" instead of "default NET" in Kconfig). Signed-off-by: Jerome Forissier --- Kconfig | 30 +++++++++++++++++++ boot/Kconfig | 1 + cmd/Kconfig | 1 + common/Kconfig | 2 +- common/spl/Kconfig | 1 + drivers/dfu/Kconfig | 1 + drivers/fastboot/Kconfig | 1 + drivers/net/Kconfig | 1 + drivers/net/phy/Kconfig | 2 +- drivers/usb/gadget/Kconfig | 2 +- net/Kconfig | 61 +++++++++++++++++++------------------- net/Makefile | 4 +++ net/lwip/Kconfig | 34 +++++++++++++++++++++ 13 files changed, 108 insertions(+), 33 deletions(-) create mode 100644 net/lwip/Kconfig diff --git a/Kconfig b/Kconfig index 82df59f176e..6657b9e5e30 100644 --- a/Kconfig +++ b/Kconfig @@ -745,8 +745,38 @@ source "dts/Kconfig" source "env/Kconfig" +menu Networking + +choice + prompt "Networking stack" + default NET + +config NO_NET + bool "No networking support" + +config NET + bool "Legacy U-Boot networking stack" + imply NETDEVICES + +config NET_LWIP + bool "Use lwIP for networking stack" + imply NETDEVICES + depends on !SANDBOX + help + Include networking support based on the lwIP (lightweight IP) + TCP/IP stack (https://nongnu.org/lwip). This is a replacement for + the default U-Boot network stack and applications located in net/ + and enabled via CONFIG_NET as well as other pieces of code that + depend on CONFIG_NET (such as cmd/net.c enabled via CONFIG_CMD_NET). + Therefore the two symbols CONFIG_NET and CONFIG_NET_LWIP are mutually + exclusive. + +endchoice + source "net/Kconfig" +endmenu + source "drivers/Kconfig" source "fs/Kconfig" diff --git a/boot/Kconfig b/boot/Kconfig index 940389d4882..5762de87b21 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -502,6 +502,7 @@ config BOOTMETH_ANDROID select ANDROID_BOOT_IMAGE select CMD_BCB select CMD_FASTBOOT + select FASTBOOT select PARTITION_TYPE_GUID select PARTITION_UUIDS help diff --git a/cmd/Kconfig b/cmd/Kconfig index 978f44eda42..de56c497005 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1644,6 +1644,7 @@ config CMD_USB config CMD_USB_SDP bool "sdp" + depends on USB_GADGET_DOWNLOAD select USB_FUNCTION_SDP help Enables the command "sdp" which is used to have U-Boot emulating the diff --git a/common/Kconfig b/common/Kconfig index 83c81edac20..1fbe4e0812f 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -424,7 +424,7 @@ config LOGF_FUNC_PAD config LOG_SYSLOG bool "Log output to syslog server" - depends on NET + depends on NET || NET_LWIP help Enables a log driver which broadcasts log records via UDP port 514 to syslog servers. diff --git a/common/spl/Kconfig b/common/spl/Kconfig index c08ff064493..962ad11102b 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1063,6 +1063,7 @@ config SPL_DM_SPI_FLASH config SPL_NET bool "Support networking" + depends on !NET_LWIP help Enable support for network devices (such as Ethernet) in SPL. This permits SPL to load U-Boot over a network link rather than diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index 971204758aa..d034b501360 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -20,6 +20,7 @@ config DFU_WRITE_ALT config DFU_TFTP bool "DFU via TFTP" depends on NETDEVICES + depends on !NET_LWIP select UPDATE_COMMON select DFU_OVER_TFTP help diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig index 70207573de2..1eb460f5a02 100644 --- a/drivers/fastboot/Kconfig +++ b/drivers/fastboot/Kconfig @@ -1,5 +1,6 @@ menu "Fastboot support" depends on CMDLINE + depends on !NET_LWIP config FASTBOOT bool diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 3382e533f42..eba0bf8b1f1 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -48,6 +48,7 @@ config DM_DSA bool "Enable Driver Model for DSA switches" depends on DM_MDIO depends on PHY_FIXED + depends on !NET_LWIP help Enable driver model for DSA switches diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index a9efc509814..13e73810ad6 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -11,7 +11,7 @@ config MV88E6352_SWITCH menuconfig PHYLIB bool "Ethernet PHY (physical media interface) support" - depends on NET + depends on NET || NET_LWIP help Enable Ethernet PHY (physical media interface) support. diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 4621a6fd5e6..03fe3bca197 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -224,7 +224,7 @@ endif # USB_GADGET_DOWNLOAD config USB_ETHER bool "USB Ethernet Gadget" - depends on NET + depends on NET || NET_LWIP default y if ARCH_SUNXI && USB_MUSB_GADGET help Creates an Ethernet network device through a USB peripheral diff --git a/net/Kconfig b/net/Kconfig index 7cb80b880a9..16a9de47e94 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -2,11 +2,6 @@ # Network configuration # -menuconfig NET - bool "Networking support" - default y - imply NETDEVICES - if NET config ARP_TIMEOUT @@ -26,15 +21,6 @@ config PROT_UDP Enable a generic udp framework that allows defining a custom handler for udp protocol. -config BOOTDEV_ETH - bool "Enable bootdev for ethernet" - depends on BOOTSTD - default y - help - Provide a bootdev for ethernet so that is it possible to boot - an operationg system over the network, using the PXE (Preboot - Execution Environment) protocol. - config BOOTP_SEND_HOSTNAME bool "Send hostname to DNS server" help @@ -45,15 +31,6 @@ config BOOTP_SEND_HOSTNAME of the "hostname" environment variable is passed as option 12 to the DHCP server. -config NET_RANDOM_ETHADDR - bool "Random ethaddr if unset" - help - Selecting this will allow the Ethernet interface to function even - when the ethaddr variable for that interface is unset. In this case, - a random MAC address in the locally administered address space is - generated. It will be saved to the appropriate environment variable, - too. - config NETCONSOLE bool "NetConsole support" help @@ -255,11 +232,35 @@ config IPV6 endif # if NET +source "net/lwip/Kconfig" + +if NET || NET_LWIP + +config BOOTDEV_ETH + bool "Enable bootdev for ethernet" + depends on BOOTSTD + default y + help + Provide a bootdev for ethernet so that is it possible to boot + an operating system over the network, using the PXE (Preboot + Execution Environment) protocol. + +config NET_RANDOM_ETHADDR + bool "Random ethaddr if unset" + help + Selecting this will allow the Ethernet interface to function even + when the ethaddr variable for that interface is unset. In this case, + a random MAC address in the locally administered address space is + generated. It will be saved to the appropriate environment variable, + too. + +endif # if NET || NET_LWIP + config SYS_RX_ETH_BUFFER - int "Number of receive packet buffers" - default 4 - help - Defines the number of Ethernet receive buffers. On some Ethernet - controllers it is recommended to set this value to 8 or even higher, - since all buffers can be full shortly after enabling the interface on - high Ethernet traffic. + int "Number of receive packet buffers" + default 4 + help + Defines the number of Ethernet receive buffers. On some Ethernet + controllers it is recommended to set this value to 8 or even higher, + since all buffers can be full shortly after enabling the interface on + high Ethernet traffic. diff --git a/net/Makefile b/net/Makefile index 64ab7ec740a..70eec8caf0d 100644 --- a/net/Makefile +++ b/net/Makefile @@ -5,6 +5,8 @@ #ccflags-y += -DDEBUG +ifeq ($(CONFIG_NET),y) + obj-$(CONFIG_NET) += arp.o obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o @@ -38,3 +40,5 @@ obj-$(CONFIG_CMD_WGET) += wget.o # sprintf(buf, index ? "foo%d" : "foo", index) # and this is intentional usage. CFLAGS_eth_common.o += -Wno-format-extra-args + +endif diff --git a/net/lwip/Kconfig b/net/lwip/Kconfig new file mode 100644 index 00000000000..eb31d044197 --- /dev/null +++ b/net/lwip/Kconfig @@ -0,0 +1,34 @@ +# +# Network configuration (with lwIP stack) +# + +config LWIP_DEBUG + bool "Enable debug traces in the lwIP library" + +config LWIP_ASSERT + bool "Enable assertions in the lwIP library" + +config PROT_DHCP_LWIP + bool + select PROT_UDP_LWIP + +config PROT_DNS_LWIP + bool + select PROT_UDP_LWIP + +config PROT_RAW_LWIP + bool + +config PROT_TCP_LWIP + bool + +config PROT_TCP_SACK_LWIP + bool "TCP SACK support" + depends on PROT_TCP_LWIP + default y + help + TCP protocol with selective acknowledgements. Improves + file transfer speed in wget. + +config PROT_UDP_LWIP + bool From patchwork Fri Aug 23 13:48:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821724 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387528wrh; Fri, 23 Aug 2024 06:52:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVrnVctxTzjDIVNnLjOAfzuTOmrMPeF8K0LJ7W/Vt3P2tnp1mBRJRyqqA9El4B0ulvq34iwVw==@linaro.org X-Google-Smtp-Source: AGHT+IEIooA1SeUru8kOMaVQaVoyXI6RBpSgYtf/KWCsCr1xC2DnqFcWkxjhB/3o1u5e2UbREKtz X-Received: by 2002:a05:600c:4e94:b0:429:c771:f32f with SMTP id 5b1f17b1804b1-42acd5e41d9mr12008355e9.36.1724421153178; Fri, 23 Aug 2024 06:52:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421153; cv=none; d=google.com; s=arc-20240605; b=C6ptCyJpX2jcEVbGAToff5z79uSNsgIuCmM717HOHgLLB7oyumjwP6s17ROEvH+yVx ceKxvZRW+11HX4Km0ceMVce1PP3bMW0qxBZXSjHwRCCbzzTr+pRjW5PcnS+svgaCTMZK ReetSANt+xmOPQ4ZEgFVATwUa+GlgwAfP8OFjWv/29UoOQ2bjZz5B7DThtKnhN/379r7 EP8g+SX3QxBXqwsrYI6EWZjIGPE1WOuY5ThuYSqZ+bQaXYDPf9eb/B4txoLzhA/LsJvg La86H+on4UeQaJ7F/Ag6kYxEu5TvDOXfrr3T2y+eQOFuu+6vto+AydWW1AKcbfbfH5Zt jXyA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=H/JPmu3PiPHsXcQ0dmL3VpsHFWldLZzgyKea5LfgeAI=; fh=rDlifqK+36WcjsUWqbu5y52tDN0BWbaTcTj5xghugv0=; b=fCJ39fKW2jWOx/+9zTW1Nxysca2xvSWz+zoeeFF8lsn7NrpGHv1DJKvJabBCoCHL9M Mw86uaG7M3kusytYYvETbMZm8fojXbV34yU0Ut1NIlrULWB9UVWPCClA6gtoO/aCzB64 udy4YmNAXQ9kI1q55zTNZm9SCIhU5gptL7qzguJtB14eUF+B53GLZx4b2Qjr36Cuei8k zezS9xc8tgtzvefNXGaPA/XCJQa9XqHtVmmkhEB2iyi8UJ+9X3lWd7hMInE5JwQrLQds 8hbmJdvJ3kDWuxLVy9MewwGbW/BcVZgbriJxUf4Laovlh9YVOD+x3dSW+5t0zGPBnErt 0qJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hAdT7V+o; 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 5b1f17b1804b1-42abed892e0si28966295e9.47.2024.08.23.06.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:52:33 -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=hAdT7V+o; 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 4AB4988B70; Fri, 23 Aug 2024 15:49:57 +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="hAdT7V+o"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 48D2E88A0E; Fri, 23 Aug 2024 15:49:46 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (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 44BA2886E7 for ; Fri, 23 Aug 2024 15:49:43 +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-wr1-x430.google.com with SMTP id ffacd0b85a97d-371afae614aso1000042f8f.0 for ; Fri, 23 Aug 2024 06:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420982; x=1725025782; 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=H/JPmu3PiPHsXcQ0dmL3VpsHFWldLZzgyKea5LfgeAI=; b=hAdT7V+oeXH49DPbRBIRAbzSTI7DY5NTvHAUZVe1QSFuUQgOh4tSnr6lcFM9wpumzN Pf+7JGe0vAcisH9F7Mv+kiYZLpSXovvPPEfmsAyEJ7oZApaYA+lQKIz9OWNQ/aXRqwfM VRkCScjedbisKl6Nr9lTub7VHXSCLCJJl91KLjPpKorv2IGEHBI1R3aqHhftgcA5q7EZ Za08isCesEIX/cgG1NhItUyL2kEEN2tqOHfPAUfH/1mV3RYyn3pXYUsz5jEpWd/BIYkB ZFH6JrB/t3jmbaIkg43sxHtmVX1I3C9b9Opsv72mFL623eXSDHJZ4xK/lDHPejcH1bxa TcGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420982; x=1725025782; 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=H/JPmu3PiPHsXcQ0dmL3VpsHFWldLZzgyKea5LfgeAI=; b=hyXhDBilpJD3I99D2WgO7Ypb+mhqoykgfSz2/axh2zNmjrWx0GfLpnIVhsfmRvGvbC ySxOsehiF+LV1B2/dlD81so6uC0xrR5DiaTpDdz1z88Fc952oYHbS22BgV4qzs4kX15w ge/5fWyKkL/0LmH5PRdITpIQSTdtXU4xuvDS78qUJv0nnsZtGOcOcu32K2uWWhxqcbUG 758a/yrxThp48AcfqxcDT2Gtn3EDjjmHv5lOcUSrd0wryfOxvF7Mh9St4lwJM9jSnogF NQUooyC9+8vzBAT70ILrTKdlvdaW7LiVRGP3O6js8MoZZmssAYMAckazs6Ok1Hlviwc6 MrhQ== X-Gm-Message-State: AOJu0Yz9Xw0TS9lPzYSmDnZUSEoOZWc0ZnHJLcgcGODIpkWjQ60FwGf5 wIDXB57t9adeTJky1WhENk1y873FUYzVTTaYrIwXDJzeBR89UgRxFS5H/8otXmscCIch3OzDT9z GzmkSbV2p X-Received: by 2002:a5d:47af:0:b0:371:93d3:3419 with SMTP id ffacd0b85a97d-37311841a66mr1611810f8f.12.1724420981954; Fri, 23 Aug 2024 06:49:41 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:41 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Felix Brack , Icenowy Zheng , Tom Rini , Angelo Dureghello , Vignesh Raghavendra , Bryan Brattlof , Nishanth Menon , Robert Nelson , Chris Morgan , Wills Wang , Rosy Song , Mark Kettenis , Wolfgang Wegner , Stelian Pop , Thomas Fitzsimmons , Philippe Reynes , Linus Walleij , Simon Glass , Alex Nemirovsky , liuhao , shuyiqi , Sam Protsenko , Trevor Woerner , Heinrich Schuchardt , Alexey Brodkin , Andy Yan , Jonas Karlman , Yang Xiwen , Enric Balletbo i Serra , Matthias Winker , Philip Oberfichtner , Michael Trimarchi , David Lechner , Johan Jonker , Fabio Estevam , Otavio Salvador , Eric Nelson , Peng Fan , =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= , Tianrui Wei , Minkyu Kang , lixinde , weichangzheng , Ilko Iliev , Stefan Bosch , Jaehoon Chung , Greg Gallagher , Mihai Sain , Sean Anderson , Stephan Gerhold , Kamil Lulko , Patrick Delaunay , Patrice Chotard , Dillon Min , Wei Fu , Yixun Lan , Sergey Temerkhanov , Mike Looijmans , Usama Arif , Anastasiia Lukianenko , Oleksandr Andrushchenko , Michal Simek , Svyatoslav Ryhel , Martyn Welch , Marcel Ziswiler , Andrew Davis , Wadim Egorov , Kever Yang , Quentin Schulz , Dragan Simic , Janne Grunau , Neal Gompa , Hector Martin , Bin Meng , Sumit Garg , Javier Martinez Canillas , Patrick Barsanti , Marek Vasut , TracyMg_Li , Dario Binacchi , Andrii Chepurnyi , Venkatesh Yadav Abbarapu Subject: [PATCH v9 15/37] configs: replace '# CONFIG_NET is not set' with CONFIG_NO_NET=y Date: Fri, 23 Aug 2024 15:48:19 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 23 Aug 2024 15:49:55 +0200 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 parent patch has made the networking stack a choice between NO_NET, NET and NET_LWIP. Therefore '# CONFIG_NET is not set' is now 'CONFIG_NO_NET=y'. Adjust the defconfigs accordingly. Note that this patch is intended to be folded in but is kept separate separate for now to make review easier. Signed-off-by: Jerome Forissier Tested-by: Felix Brack --- configs/LicheePi_Zero_defconfig | 2 +- configs/M5249EVB_defconfig | 2 +- configs/am335x_pdu001_defconfig | 2 +- configs/am62ax_evm_r5_defconfig | 2 +- configs/am62px_evm_r5_defconfig | 2 +- configs/am62x_beagleplay_r5_defconfig | 2 +- configs/amcore_defconfig | 2 +- configs/anbernic-rgxx3-rk3566_defconfig | 2 +- configs/ap143_defconfig | 2 +- configs/ap152_defconfig | 2 +- configs/apple_m1_defconfig | 2 +- configs/astro_mcf5373l_defconfig | 2 +- configs/at91sam9rlek_dataflash_defconfig | 2 +- configs/at91sam9rlek_mmc_defconfig | 2 +- configs/at91sam9rlek_nandflash_defconfig | 2 +- configs/bcm7260_defconfig | 2 +- configs/bcm7445_defconfig | 2 +- configs/bcm968380gerg_ram_defconfig | 2 +- configs/bcmns_defconfig | 2 +- configs/chromebook_samus_tpl_defconfig | 2 +- configs/cortina_presidio-asic-base_defconfig | 2 +- configs/cortina_presidio-asic-pnand_defconfig | 2 +- configs/durian_defconfig | 2 +- configs/e850-96_defconfig | 2 +- configs/ea-lpc3250devkitv2_defconfig | 2 +- configs/efi-x86_app32_defconfig | 2 +- configs/efi-x86_app64_defconfig | 2 +- configs/emsdp_defconfig | 2 +- configs/evb-px5_defconfig | 2 +- configs/generic-rk3568_defconfig | 2 +- configs/generic-rk3588_defconfig | 2 +- configs/hc2910_2aghd05_defconfig | 2 +- configs/igep00x0_defconfig | 2 +- configs/imx6q_bosch_acc_defconfig | 2 +- configs/imx6ulz_smm_m2_defconfig | 2 +- configs/iot_devkit_defconfig | 2 +- configs/legoev3_defconfig | 2 +- configs/mk808_defconfig | 2 +- configs/mx23evk_defconfig | 2 +- configs/mx28evk_defconfig | 2 +- configs/mx6memcal_defconfig | 2 +- configs/mx6ulz_14x14_evk_defconfig | 2 +- configs/mx7ulp_com_defconfig | 2 +- configs/mx7ulp_evk_defconfig | 2 +- configs/mx7ulp_evk_plugin_defconfig | 2 +- configs/netgear_cg3100d_ram_defconfig | 2 +- configs/nsim_700_defconfig | 2 +- configs/nsim_700be_defconfig | 2 +- configs/nsim_hs38be_defconfig | 2 +- configs/openpiton_riscv64_defconfig | 2 +- configs/openpiton_riscv64_spl_defconfig | 2 +- configs/origen_defconfig | 2 +- configs/pe2201_defconfig | 2 +- configs/pinecube_defconfig | 2 +- configs/pm9261_defconfig | 2 +- configs/s5p4418_nanopi2_defconfig | 2 +- configs/s5p_goni_defconfig | 2 +- configs/s5pc210_universal_defconfig | 2 +- configs/sama5d27_giantboard_defconfig | 2 +- configs/sama5d29_curiosity_mmc1_defconfig | 2 +- configs/sama5d29_curiosity_mmc_defconfig | 2 +- configs/sama5d29_curiosity_qspiflash_defconfig | 2 +- configs/sama7g54_curiosity_mmc_defconfig | 2 +- configs/sama7g54_curiosity_nandflash_defconfig | 2 +- configs/sama7g54_curiosity_qspiflash_defconfig | 2 +- configs/sipeed_maix_bitm_defconfig | 2 +- configs/sipeed_maix_smode_defconfig | 2 +- configs/stemmy_defconfig | 2 +- configs/stm32f429-discovery_defconfig | 2 +- configs/stm32f429-evaluation_defconfig | 2 +- configs/stm32f469-discovery_defconfig | 2 +- configs/stm32h743-disco_defconfig | 2 +- configs/stm32h743-eval_defconfig | 2 +- configs/stm32h750-art-pi_defconfig | 2 +- configs/stm32mp25_defconfig | 2 +- configs/stmark2_defconfig | 2 +- configs/th1520_lpi4a_defconfig | 2 +- configs/thunderx_88xx_defconfig | 2 +- configs/tools-only_defconfig | 2 +- configs/topic_miami_defconfig | 2 +- configs/topic_miamilite_defconfig | 2 +- configs/topic_miamiplus_defconfig | 2 +- configs/total_compute_defconfig | 2 +- configs/trats2_defconfig | 2 +- configs/trats_defconfig | 2 +- configs/xenguest_arm64_defconfig | 2 +- configs/xenguest_arm64_virtio_defconfig | 2 +- configs/xilinx_versal_mini_defconfig | 2 +- configs/xilinx_versal_mini_emmc0_defconfig | 2 +- configs/xilinx_versal_mini_emmc1_defconfig | 2 +- configs/xilinx_versal_mini_ospi_defconfig | 2 +- configs/xilinx_versal_mini_qspi_defconfig | 2 +- configs/xilinx_versal_net_mini_defconfig | 2 +- configs/xilinx_versal_net_mini_emmc_defconfig | 2 +- configs/xilinx_versal_net_mini_ospi_defconfig | 2 +- configs/xilinx_versal_net_mini_qspi_defconfig | 2 +- configs/xilinx_zynqmp_mini_defconfig | 2 +- configs/xilinx_zynqmp_mini_emmc0_defconfig | 2 +- configs/xilinx_zynqmp_mini_emmc1_defconfig | 2 +- configs/xilinx_zynqmp_mini_nand_defconfig | 2 +- configs/xilinx_zynqmp_mini_nand_single_defconfig | 2 +- configs/xilinx_zynqmp_mini_qspi_defconfig | 2 +- configs/zynq_cse_nand_defconfig | 2 +- configs/zynq_cse_nor_defconfig | 2 +- configs/zynq_cse_qspi_defconfig | 2 +- 105 files changed, 105 insertions(+), 105 deletions(-) diff --git a/configs/LicheePi_Zero_defconfig b/configs/LicheePi_Zero_defconfig index 009384eaf1b..c37c49ccbb1 100644 --- a/configs/LicheePi_Zero_defconfig +++ b/configs/LicheePi_Zero_defconfig @@ -5,4 +5,4 @@ CONFIG_SPL=y CONFIG_MACH_SUN8I_V3S=y CONFIG_DRAM_CLK=360 # CONFIG_HAS_ARMV7_SECURE_BASE is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y diff --git a/configs/M5249EVB_defconfig b/configs/M5249EVB_defconfig index eac85b9c2d5..ed1446d81cb 100644 --- a/configs/M5249EVB_defconfig +++ b/configs/M5249EVB_defconfig @@ -22,7 +22,7 @@ CONFIG_CMD_MX_CYCLIC=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y diff --git a/configs/am335x_pdu001_defconfig b/configs/am335x_pdu001_defconfig index febe5ebaabb..508caef8adb 100644 --- a/configs/am335x_pdu001_defconfig +++ b/configs/am335x_pdu001_defconfig @@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_OF_TRANSLATE=y diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig index 44ccb6baa90..1fba779dd0a 100644 --- a/configs/am62ax_evm_r5_defconfig +++ b/configs/am62ax_evm_r5_defconfig @@ -67,7 +67,7 @@ CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_PART=1 -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y diff --git a/configs/am62px_evm_r5_defconfig b/configs/am62px_evm_r5_defconfig index ace55696737..53925bdbfcb 100644 --- a/configs/am62px_evm_r5_defconfig +++ b/configs/am62px_evm_r5_defconfig @@ -71,7 +71,7 @@ CONFIG_ENV_IS_NOWHERE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_PART=1 -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_DEVICE_REMOVE=y CONFIG_SPL_DM_SEQ_ALIAS=y diff --git a/configs/am62x_beagleplay_r5_defconfig b/configs/am62x_beagleplay_r5_defconfig index d0cc4f5b405..2179b016134 100644 --- a/configs/am62x_beagleplay_r5_defconfig +++ b/configs/am62x_beagleplay_r5_defconfig @@ -68,7 +68,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y diff --git a/configs/amcore_defconfig b/configs/amcore_defconfig index f1f5201b30a..94c5379590d 100644 --- a/configs/amcore_defconfig +++ b/configs/amcore_defconfig @@ -33,7 +33,7 @@ CONFIG_CMD_DIAG=y CONFIG_ENV_IS_IN_FLASH=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="AMCORE" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y CONFIG_FLASH_CFI_DRIVER=y diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig index a03509bf467..937c27a947e 100644 --- a/configs/anbernic-rgxx3-rk3566_defconfig +++ b/configs/anbernic-rgxx3-rk3566_defconfig @@ -41,7 +41,7 @@ CONFIG_OF_LIVE=y # CONFIG_OF_UPSTREAM is not set CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_REGMAP=y CONFIG_SPL_SYSCON=y diff --git a/configs/ap143_defconfig b/configs/ap143_defconfig index c22048c1b53..13842e6c0f8 100644 --- a/configs/ap143_defconfig +++ b/configs/ap143_defconfig @@ -46,7 +46,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:256k(u-boot),64k(u-boot-env),6336k CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SPI_MAX_HZ=25000000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_ATMEL=y diff --git a/configs/ap152_defconfig b/configs/ap152_defconfig index ec700a5b3f0..5cc0ad2e682 100644 --- a/configs/ap152_defconfig +++ b/configs/ap152_defconfig @@ -46,7 +46,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:256k(u-boot),64k(u-boot-env),6336k CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SPI_MAX_HZ=25000000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_BAR=y diff --git a/configs/apple_m1_defconfig b/configs/apple_m1_defconfig index 20d2cff93f7..e425f114791 100644 --- a/configs/apple_m1_defconfig +++ b/configs/apple_m1_defconfig @@ -11,7 +11,7 @@ CONFIG_SYS_PBSIZE=276 CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_BOARD_LATE_INIT=y CONFIG_CMD_SELECT_FONT=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SYS_64BIT_LBA=y CONFIG_APPLE_SPI_KEYB=y # CONFIG_MMC is not set diff --git a/configs/astro_mcf5373l_defconfig b/configs/astro_mcf5373l_defconfig index d1942c28971..8dd369d68a1 100644 --- a/configs/astro_mcf5373l_defconfig +++ b/configs/astro_mcf5373l_defconfig @@ -27,7 +27,7 @@ CONFIG_CMD_I2C=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_CACHE=y CONFIG_CMD_JFFS2=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_FPGA_ALTERA=y CONFIG_FPGA_CYCLON2=y CONFIG_FPGA_XILINX=y diff --git a/configs/at91sam9rlek_dataflash_defconfig b/configs/at91sam9rlek_dataflash_defconfig index 931af2b2fda..01ac2cc8d1e 100644 --- a/configs/at91sam9rlek_dataflash_defconfig +++ b/configs/at91sam9rlek_dataflash_defconfig @@ -41,7 +41,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SPI_MAX_HZ=15000000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/at91sam9rlek_mmc_defconfig b/configs/at91sam9rlek_mmc_defconfig index 70d431c1f52..93f7d762109 100644 --- a/configs/at91sam9rlek_mmc_defconfig +++ b/configs/at91sam9rlek_mmc_defconfig @@ -39,7 +39,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_FAT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/at91sam9rlek_nandflash_defconfig b/configs/at91sam9rlek_nandflash_defconfig index 1277a357cd2..928ad9f4f70 100644 --- a/configs/at91sam9rlek_nandflash_defconfig +++ b/configs/at91sam9rlek_nandflash_defconfig @@ -40,7 +40,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig index 2bf3c0d7fbe..345e37bca7e 100644 --- a/configs/bcm7260_defconfig +++ b/configs/bcm7260_defconfig @@ -35,7 +35,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCMSTB=y CONFIG_MTD=y diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig index 07e3b57ac33..eb6629ba57a 100644 --- a/configs/bcm7445_defconfig +++ b/configs/bcm7445_defconfig @@ -37,7 +37,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_BCMSTB=y CONFIG_MTD=y diff --git a/configs/bcm968380gerg_ram_defconfig b/configs/bcm968380gerg_ram_defconfig index 6c119eb42a6..053c459e05c 100644 --- a/configs/bcm968380gerg_ram_defconfig +++ b/configs/bcm968380gerg_ram_defconfig @@ -41,7 +41,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_NAND=y # CONFIG_CMD_SLEEP is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_BCM6345_GPIO=y CONFIG_LED=y diff --git a/configs/bcmns_defconfig b/configs/bcmns_defconfig index 365284e94c3..f2719821656 100644 --- a/configs/bcmns_defconfig +++ b/configs/bcmns_defconfig @@ -28,7 +28,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="NS" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_MTD=y CONFIG_DM_MTD=y diff --git a/configs/chromebook_samus_tpl_defconfig b/configs/chromebook_samus_tpl_defconfig index 1be57560f89..075e3f192a3 100644 --- a/configs/chromebook_samus_tpl_defconfig +++ b/configs/chromebook_samus_tpl_defconfig @@ -74,7 +74,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_REGMAP=y CONFIG_SYSCON=y # CONFIG_ACPIGEN is not set diff --git a/configs/cortina_presidio-asic-base_defconfig b/configs/cortina_presidio-asic-base_defconfig index eb5743da64d..78167d56d83 100644 --- a/configs/cortina_presidio-asic-base_defconfig +++ b/configs/cortina_presidio-asic-base_defconfig @@ -31,7 +31,7 @@ CONFIG_CMD_TIMER=y CONFIG_CMD_SMC=y CONFIG_OF_CONTROL=y CONFIG_OF_LIVE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CORTINA_GPIO=y # CONFIG_MMC is not set CONFIG_DM_SERIAL=y diff --git a/configs/cortina_presidio-asic-pnand_defconfig b/configs/cortina_presidio-asic-pnand_defconfig index c7367d4d91c..f1526227d65 100644 --- a/configs/cortina_presidio-asic-pnand_defconfig +++ b/configs/cortina_presidio-asic-pnand_defconfig @@ -32,7 +32,7 @@ CONFIG_CMD_TIMER=y CONFIG_CMD_SMC=y CONFIG_OF_CONTROL=y CONFIG_OF_LIVE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CORTINA_GPIO=y # CONFIG_MMC is not set CONFIG_MTD=y diff --git a/configs/durian_defconfig b/configs/durian_defconfig index f1d45ca3064..ae7a05edee1 100644 --- a/configs/durian_defconfig +++ b/configs/durian_defconfig @@ -28,7 +28,7 @@ CONFIG_SYS_PROMPT="durian#" CONFIG_CMD_PCI=y CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y # CONFIG_MMC is not set diff --git a/configs/e850-96_defconfig b/configs/e850-96_defconfig index 2949da24267..6b1a3fb3098 100644 --- a/configs/e850-96_defconfig +++ b/configs/e850-96_defconfig @@ -12,7 +12,7 @@ CONFIG_SYS_LOAD_ADDR=0x80000000 # CONFIG_AUTOBOOT is not set # CONFIG_DISPLAY_CPUINFO is not set CONFIG_CMD_RNG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK_EXYNOS850=y # CONFIG_MMC is not set CONFIG_SOC_SAMSUNG=y diff --git a/configs/ea-lpc3250devkitv2_defconfig b/configs/ea-lpc3250devkitv2_defconfig index af9fc5f2f5c..c3af7afced1 100644 --- a/configs/ea-lpc3250devkitv2_defconfig +++ b/configs/ea-lpc3250devkitv2_defconfig @@ -25,7 +25,7 @@ CONFIG_SYS_PROMPT="EA-LPC3250v2=> " CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_OF_CONTROL=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_LPC32XX_GPIO=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_LPC32XX=y diff --git a/configs/efi-x86_app32_defconfig b/configs/efi-x86_app32_defconfig index 53ec63461d5..c2856b4000f 100644 --- a/configs/efi-x86_app32_defconfig +++ b/configs/efi-x86_app32_defconfig @@ -35,7 +35,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_REGMAP=y CONFIG_SYSCON=y # CONFIG_GZIP is not set diff --git a/configs/efi-x86_app64_defconfig b/configs/efi-x86_app64_defconfig index 3d021483dd0..0b709cf4dad 100644 --- a/configs/efi-x86_app64_defconfig +++ b/configs/efi-x86_app64_defconfig @@ -38,7 +38,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_REGMAP=y CONFIG_SYSCON=y CONFIG_CONSOLE_SCROLL_LINES=5 diff --git a/configs/emsdp_defconfig b/configs/emsdp_defconfig index 07bed2b5623..26efa794058 100644 --- a/configs/emsdp_defconfig +++ b/configs/emsdp_defconfig @@ -30,7 +30,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="app.bin" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_DW_SNPS=y diff --git a/configs/evb-px5_defconfig b/configs/evb-px5_defconfig index ccd38831533..8efab0c2fc0 100644 --- a/configs/evb-px5_defconfig +++ b/configs/evb-px5_defconfig @@ -57,7 +57,7 @@ CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent" CONFIG_TPL_OF_PLATDATA=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_TPL_DM=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y diff --git a/configs/generic-rk3568_defconfig b/configs/generic-rk3568_defconfig index 66a33afbbaf..383dad3087b 100644 --- a/configs/generic-rk3568_defconfig +++ b/configs/generic-rk3568_defconfig @@ -40,7 +40,7 @@ CONFIG_OF_LIVE=y # CONFIG_OF_UPSTREAM is not set CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_REGMAP=y CONFIG_SPL_SYSCON=y diff --git a/configs/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig index 42bc2c9a765..3c81401968d 100644 --- a/configs/generic-rk3588_defconfig +++ b/configs/generic-rk3588_defconfig @@ -35,7 +35,7 @@ CONFIG_OF_LIVE=y # CONFIG_OF_UPSTREAM is not set CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_REGMAP=y CONFIG_SPL_SYSCON=y diff --git a/configs/hc2910_2aghd05_defconfig b/configs/hc2910_2aghd05_defconfig index e68b44478a9..4302436d2e6 100644 --- a/configs/hc2910_2aghd05_defconfig +++ b/configs/hc2910_2aghd05_defconfig @@ -36,7 +36,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_PARTITION_TYPE_GUID=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_GPIO is not set # CONFIG_I2C is not set # CONFIG_INPUT is not set diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig index 473891607b0..b33db8d7f5d 100644 --- a/configs/igep00x0_defconfig +++ b/configs/igep00x0_defconfig @@ -66,7 +66,7 @@ CONFIG_ENV_UBI_VOLUME="config" CONFIG_ENV_UBI_VOLUME_REDUND="config_r" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_DM_I2C=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y diff --git a/configs/imx6q_bosch_acc_defconfig b/configs/imx6q_bosch_acc_defconfig index dce1b64bf69..3fca5d5139d 100644 --- a/configs/imx6q_bosch_acc_defconfig +++ b/configs/imx6q_bosch_acc_defconfig @@ -81,7 +81,7 @@ CONFIG_SYS_MMC_ENV_PART=1 CONFIG_ENV_WRITEABLE_LIST=y CONFIG_ENV_ACCESS_IGNORE_FORCE=y CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_DM_BOOTCOUNT=y diff --git a/configs/imx6ulz_smm_m2_defconfig b/configs/imx6ulz_smm_m2_defconfig index 93ead4c373b..c2adff17abf 100644 --- a/configs/imx6ulz_smm_m2_defconfig +++ b/configs/imx6ulz_smm_m2_defconfig @@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x82000000 diff --git a/configs/iot_devkit_defconfig b/configs/iot_devkit_defconfig index c4920052f82..3dda897f765 100644 --- a/configs/iot_devkit_defconfig +++ b/configs/iot_devkit_defconfig @@ -34,7 +34,7 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="app.bin" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_DW_SNPS=y diff --git a/configs/legoev3_defconfig b/configs/legoev3_defconfig index 34ef3493cac..60b7a84205c 100644 --- a/configs/legoev3_defconfig +++ b/configs/legoev3_defconfig @@ -44,7 +44,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_DM_I2C=y CONFIG_SYS_I2C_DAVINCI=y diff --git a/configs/mk808_defconfig b/configs/mk808_defconfig index 9a342d3a33a..36ab4b03401 100644 --- a/configs/mk808_defconfig +++ b/configs/mk808_defconfig @@ -68,7 +68,7 @@ CONFIG_OF_DTB_PROPS_REMOVE=y CONFIG_SPL_OF_PLATDATA=y CONFIG_TPL_OF_PLATDATA=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_TPL_DM=y CONFIG_REGMAP=y CONFIG_SPL_REGMAP=y diff --git a/configs/mx23evk_defconfig b/configs/mx23evk_defconfig index 7d0e7cc1e00..59ab64ec97a 100644 --- a/configs/mx23evk_defconfig +++ b/configs/mx23evk_defconfig @@ -41,7 +41,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_MXS_GPIO=y CONFIG_MMC_MXS=y CONFIG_PINCTRL=y diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig index 1fe68ef93f9..868d870cb68 100644 --- a/configs/mx28evk_defconfig +++ b/configs/mx28evk_defconfig @@ -48,7 +48,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_MXS_GPIO=y CONFIG_MMC_MXS=y diff --git a/configs/mx6memcal_defconfig b/configs/mx6memcal_defconfig index 4c8a5960d38..5cc8236feb9 100644 --- a/configs/mx6memcal_defconfig +++ b/configs/mx6memcal_defconfig @@ -38,7 +38,7 @@ CONFIG_CMD_MEMTEST=y CONFIG_CMD_CACHE=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y # CONFIG_MMC is not set CONFIG_FSL_USDHC=y diff --git a/configs/mx6ulz_14x14_evk_defconfig b/configs/mx6ulz_14x14_evk_defconfig index d57b47ef47a..2c13dd4dbc3 100644 --- a/configs/mx6ulz_14x14_evk_defconfig +++ b/configs/mx6ulz_14x14_evk_defconfig @@ -36,7 +36,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_DM_74X164=y CONFIG_DM_I2C=y diff --git a/configs/mx7ulp_com_defconfig b/configs/mx7ulp_com_defconfig index f8dcc0abef5..6ea84c053ca 100644 --- a/configs/mx7ulp_com_defconfig +++ b/configs/mx7ulp_com_defconfig @@ -33,7 +33,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_IMX_RGPIO2P=y # CONFIG_MXC_GPIO is not set diff --git a/configs/mx7ulp_evk_defconfig b/configs/mx7ulp_evk_defconfig index 38e6b62df45..5aadb9e93f1 100644 --- a/configs/mx7ulp_evk_defconfig +++ b/configs/mx7ulp_evk_defconfig @@ -33,7 +33,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_IMX_RGPIO2P=y # CONFIG_MXC_GPIO is not set diff --git a/configs/mx7ulp_evk_plugin_defconfig b/configs/mx7ulp_evk_plugin_defconfig index d007d180969..2f45fac0a89 100644 --- a/configs/mx7ulp_evk_plugin_defconfig +++ b/configs/mx7ulp_evk_plugin_defconfig @@ -31,7 +31,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_BOUNCE_BUFFER=y CONFIG_IMX_RGPIO2P=y # CONFIG_MXC_GPIO is not set diff --git a/configs/netgear_cg3100d_ram_defconfig b/configs/netgear_cg3100d_ram_defconfig index 352b98fc0a5..377cc26f937 100644 --- a/configs/netgear_cg3100d_ram_defconfig +++ b/configs/netgear_cg3100d_ram_defconfig @@ -39,7 +39,7 @@ CONFIG_CMD_MEMINFO=y CONFIG_CMD_SPI=y # CONFIG_CMD_SLEEP is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_BCM6345_GPIO=y CONFIG_LED=y diff --git a/configs/nsim_700_defconfig b/configs/nsim_700_defconfig index be2539e8cd7..e8400c2dc30 100644 --- a/configs/nsim_700_defconfig +++ b/configs/nsim_700_defconfig @@ -25,7 +25,7 @@ CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y diff --git a/configs/nsim_700be_defconfig b/configs/nsim_700be_defconfig index 1fcf36a28a5..9ce1a255227 100644 --- a/configs/nsim_700be_defconfig +++ b/configs/nsim_700be_defconfig @@ -26,7 +26,7 @@ CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y diff --git a/configs/nsim_hs38be_defconfig b/configs/nsim_hs38be_defconfig index 9c26e4da7d2..80d0e54192d 100644 --- a/configs/nsim_hs38be_defconfig +++ b/configs/nsim_hs38be_defconfig @@ -27,7 +27,7 @@ CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SHIFT=2 CONFIG_SYS_NS16550=y diff --git a/configs/openpiton_riscv64_defconfig b/configs/openpiton_riscv64_defconfig index cdb9e1c932e..9df92e5c318 100644 --- a/configs/openpiton_riscv64_defconfig +++ b/configs/openpiton_riscv64_defconfig @@ -61,7 +61,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set CONFIG_OF_EMBED=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CPU=y CONFIG_MMC=y # CONFIG_MMC_WRITE is not set diff --git a/configs/openpiton_riscv64_spl_defconfig b/configs/openpiton_riscv64_spl_defconfig index a08040d878d..29304cc50fe 100644 --- a/configs/openpiton_riscv64_spl_defconfig +++ b/configs/openpiton_riscv64_spl_defconfig @@ -77,7 +77,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y # CONFIG_DOS_PARTITION is not set # CONFIG_SPL_PARTITION_UUIDS is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CPU=y CONFIG_MMC=y # CONFIG_MMC_WRITE is not set diff --git a/configs/origen_defconfig b/configs/origen_defconfig index dc9285d4e99..26702d77079 100644 --- a/configs/origen_defconfig +++ b/configs/origen_defconfig @@ -41,7 +41,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_MMC_DW=y diff --git a/configs/pe2201_defconfig b/configs/pe2201_defconfig index 5d32cbf8bf1..91fe7ebf982 100644 --- a/configs/pe2201_defconfig +++ b/configs/pe2201_defconfig @@ -27,7 +27,7 @@ CONFIG_CMD_DM=y CONFIG_CMD_PCI=y CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SCSI_AHCI=y CONFIG_AHCI_PCI=y # CONFIG_MMC is not set diff --git a/configs/pinecube_defconfig b/configs/pinecube_defconfig index 7cc0a862949..7567a6aa739 100644 --- a/configs/pinecube_defconfig +++ b/configs/pinecube_defconfig @@ -9,7 +9,7 @@ CONFIG_DRAM_ODT_EN=y CONFIG_I2C0_ENABLE=y # CONFIG_HAS_ARMV7_SECURE_BASE is not set CONFIG_SPL_I2C=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_SYS_I2C_MVTWSI=y CONFIG_SYS_I2C_SLAVE=0x7f diff --git a/configs/pm9261_defconfig b/configs/pm9261_defconfig index 9f4d434f3e2..026c6de3109 100644 --- a/configs/pm9261_defconfig +++ b/configs/pm9261_defconfig @@ -37,7 +37,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=physmap-flash.0:256k(u-boot)ro,64k(u-boot-env) CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_FLASH=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_GPIO=y diff --git a/configs/s5p4418_nanopi2_defconfig b/configs/s5p4418_nanopi2_defconfig index ee72778995b..0bee0008294 100644 --- a/configs/s5p4418_nanopi2_defconfig +++ b/configs/s5p4418_nanopi2_defconfig @@ -49,7 +49,7 @@ CONFIG_CMD_FAT=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_MMC_ENV_DEV=2 -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_NEXELL=y CONFIG_MMC_DW=y diff --git a/configs/s5p_goni_defconfig b/configs/s5p_goni_defconfig index 4316510541c..084e19e1258 100644 --- a/configs/s5p_goni_defconfig +++ b/configs/s5p_goni_defconfig @@ -44,7 +44,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_DM_I2C_GPIO=y diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig index 67959ad79cd..99e873ff427 100644 --- a/configs/s5pc210_universal_defconfig +++ b/configs/s5pc210_universal_defconfig @@ -41,7 +41,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_SYS_I2C_S3C24X0=y diff --git a/configs/sama5d27_giantboard_defconfig b/configs/sama5d27_giantboard_defconfig index 283c9300c56..34274ca4a32 100644 --- a/configs/sama5d27_giantboard_defconfig +++ b/configs/sama5d27_giantboard_defconfig @@ -64,7 +64,7 @@ CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names" CONFIG_ENV_IS_IN_FAT=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_CLK=y diff --git a/configs/sama5d29_curiosity_mmc1_defconfig b/configs/sama5d29_curiosity_mmc1_defconfig index 61edb23b196..5d9173a0e57 100644 --- a/configs/sama5d29_curiosity_mmc1_defconfig +++ b/configs/sama5d29_curiosity_mmc1_defconfig @@ -70,7 +70,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA5D29" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_UTMI=y diff --git a/configs/sama5d29_curiosity_mmc_defconfig b/configs/sama5d29_curiosity_mmc_defconfig index 0b16f386735..2b765f56dda 100644 --- a/configs/sama5d29_curiosity_mmc_defconfig +++ b/configs/sama5d29_curiosity_mmc_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA5D29" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_UTMI=y diff --git a/configs/sama5d29_curiosity_qspiflash_defconfig b/configs/sama5d29_curiosity_qspiflash_defconfig index 9b522e81ef5..d840d0f3d6f 100644 --- a/configs/sama5d29_curiosity_qspiflash_defconfig +++ b/configs/sama5d29_curiosity_qspiflash_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA5D29" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_AT91=y CONFIG_AT91_UTMI=y diff --git a/configs/sama7g54_curiosity_mmc_defconfig b/configs/sama7g54_curiosity_mmc_defconfig index 00a091df0e5..ba8643c912c 100644 --- a/configs/sama7g54_curiosity_mmc_defconfig +++ b/configs/sama7g54_curiosity_mmc_defconfig @@ -74,7 +74,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA7G54" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_CCF=y CONFIG_CLK_AT91=y diff --git a/configs/sama7g54_curiosity_nandflash_defconfig b/configs/sama7g54_curiosity_nandflash_defconfig index 0b2116d0419..49b08d3fc2b 100644 --- a/configs/sama7g54_curiosity_nandflash_defconfig +++ b/configs/sama7g54_curiosity_nandflash_defconfig @@ -72,7 +72,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA7G54" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_CCF=y CONFIG_CLK_AT91=y diff --git a/configs/sama7g54_curiosity_qspiflash_defconfig b/configs/sama7g54_curiosity_qspiflash_defconfig index 00e5362a1fa..8fa5857e245 100644 --- a/configs/sama7g54_curiosity_qspiflash_defconfig +++ b/configs/sama7g54_curiosity_qspiflash_defconfig @@ -73,7 +73,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="SAMA7G54" CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y CONFIG_CLK_CCF=y CONFIG_CLK_AT91=y diff --git a/configs/sipeed_maix_bitm_defconfig b/configs/sipeed_maix_bitm_defconfig index 67d5a007a8e..8788eabf55a 100644 --- a/configs/sipeed_maix_bitm_defconfig +++ b/configs/sipeed_maix_bitm_defconfig @@ -17,7 +17,7 @@ CONFIG_BOARD_EARLY_INIT_F=y CONFIG_HUSH_PARSER=y CONFIG_MTDIDS_DEFAULT="nor0=spi3:0" CONFIG_MTDPARTS_DEFAULT="nor0:1M(u-boot),0x1000@0xfff000(env)" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK_K210_SET_RATE=y # CONFIG_INPUT is not set CONFIG_SF_DEFAULT_BUS=3 diff --git a/configs/sipeed_maix_smode_defconfig b/configs/sipeed_maix_smode_defconfig index 049fac02cac..c8d8b1ac9e1 100644 --- a/configs/sipeed_maix_smode_defconfig +++ b/configs/sipeed_maix_smode_defconfig @@ -18,7 +18,7 @@ CONFIG_SYS_PBSIZE=276 CONFIG_HUSH_PARSER=y CONFIG_MTDIDS_DEFAULT="nor0=spi3:0" CONFIG_MTDPARTS_DEFAULT="nor0:1M(u-boot),0x1000@0xfff000(env)" -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_INPUT is not set CONFIG_SF_DEFAULT_BUS=3 CONFIG_FS_EXT4=y diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig index ee8e6be6e2c..efa3b477a6e 100644 --- a/configs/stemmy_defconfig +++ b/configs/stemmy_defconfig @@ -28,7 +28,7 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PART=y CONFIG_CMD_GETTIME=y CONFIG_EFI_PARTITION=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_USB_FUNCTION_FASTBOOT=y CONFIG_FASTBOOT_BUF_ADDR=0x18100000 CONFIG_FASTBOOT_FLASH=y diff --git a/configs/stm32f429-discovery_defconfig b/configs/stm32f429-discovery_defconfig index 5d59edb7381..21a466572bd 100644 --- a/configs/stm32f429-discovery_defconfig +++ b/configs/stm32f429-discovery_defconfig @@ -27,7 +27,7 @@ CONFIG_CMD_IMLS=y CONFIG_CMD_TIMER=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_FLASH=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y diff --git a/configs/stm32f429-evaluation_defconfig b/configs/stm32f429-evaluation_defconfig index 3e220d73984..8f20d4ca3f5 100644 --- a/configs/stm32f429-evaluation_defconfig +++ b/configs/stm32f429-evaluation_defconfig @@ -25,7 +25,7 @@ CONFIG_CMD_TIMER=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_ARM_PL180_MMCI=y CONFIG_MTD=y CONFIG_MTD_NOR_FLASH=y diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig index 9b5f38b9efa..33292bfaf0c 100644 --- a/configs/stm32f469-discovery_defconfig +++ b/configs/stm32f469-discovery_defconfig @@ -26,7 +26,7 @@ CONFIG_CMD_TIMER=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_ARM_PL180_MMCI=y CONFIG_MTD=y CONFIG_DM_MTD=y diff --git a/configs/stm32h743-disco_defconfig b/configs/stm32h743-disco_defconfig index 89d79e98b6f..f098b8dd6da 100644 --- a/configs/stm32h743-disco_defconfig +++ b/configs/stm32h743-disco_defconfig @@ -30,6 +30,6 @@ CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set diff --git a/configs/stm32h743-eval_defconfig b/configs/stm32h743-eval_defconfig index 6b4ebd11691..82823e8631f 100644 --- a/configs/stm32h743-eval_defconfig +++ b/configs/stm32h743-eval_defconfig @@ -30,6 +30,6 @@ CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set diff --git a/configs/stm32h750-art-pi_defconfig b/configs/stm32h750-art-pi_defconfig index 319b3033a40..df3ff43f4a9 100644 --- a/configs/stm32h750-art-pi_defconfig +++ b/configs/stm32h750-art-pi_defconfig @@ -36,7 +36,7 @@ CONFIG_CMD_EXT4_WRITE=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_DMA=y CONFIG_STM32_SDMMC2=y # CONFIG_PINCTRL_FULL is not set diff --git a/configs/stm32mp25_defconfig b/configs/stm32mp25_defconfig index 87038cc773a..9885466f390 100644 --- a/configs/stm32mp25_defconfig +++ b/configs/stm32mp25_defconfig @@ -31,7 +31,7 @@ CONFIG_CMD_TIMER=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_LOG=y CONFIG_OF_LIVE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_GPIO_HOG=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_STM32F7=y diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig index f43a24c5b5e..79b21acd032 100644 --- a/configs/stmark2_defconfig +++ b/configs/stmark2_defconfig @@ -39,7 +39,7 @@ CONFIG_ENV_SPI_CS=1 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_HOSTNAME=y CONFIG_HOSTNAME="stmark2" -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DM_I2C=y CONFIG_SYS_I2C_FSL=y CONFIG_MTD=y diff --git a/configs/th1520_lpi4a_defconfig b/configs/th1520_lpi4a_defconfig index 49ff92f6de3..6893d7622fe 100644 --- a/configs/th1520_lpi4a_defconfig +++ b/configs/th1520_lpi4a_defconfig @@ -58,7 +58,7 @@ CONFIG_CMD_BOOTMENU=y CONFIG_PARTITION_TYPE_GUID=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_VERSION_VARIABLE=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_BLOCK_CACHE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/thunderx_88xx_defconfig b/configs/thunderx_88xx_defconfig index b754cc01cc8..107ad279e1b 100644 --- a/configs/thunderx_88xx_defconfig +++ b/configs/thunderx_88xx_defconfig @@ -32,7 +32,7 @@ CONFIG_SYS_PROMPT="ThunderX_88XX> " # CONFIG_CMD_SAVEENV is not set # CONFIG_CMD_ENV_EXISTS is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set CONFIG_DM_SERIAL=y CONFIG_DEBUG_UART_SKIP_INIT=y diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index b54d2cefa10..e00f2c48598 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -22,7 +22,7 @@ CONFIG_BOOTCOMMAND="run distro_bootcmd" # CONFIG_CMD_DATE is not set CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_ACPIGEN is not set CONFIG_AXI=y CONFIG_AXI_SANDBOX=y diff --git a/configs/topic_miami_defconfig b/configs/topic_miami_defconfig index 638d7306146..74b03d19ffb 100644 --- a/configs/topic_miami_defconfig +++ b/configs/topic_miami_defconfig @@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_RAM=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000 diff --git a/configs/topic_miamilite_defconfig b/configs/topic_miamilite_defconfig index af47fab83c0..46071399a4d 100644 --- a/configs/topic_miamilite_defconfig +++ b/configs/topic_miamilite_defconfig @@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_RAM=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000 diff --git a/configs/topic_miamiplus_defconfig b/configs/topic_miamiplus_defconfig index ad321749694..5562c738c5e 100644 --- a/configs/topic_miamiplus_defconfig +++ b/configs/topic_miamiplus_defconfig @@ -52,7 +52,7 @@ CONFIG_CMD_CACHE=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_DFU_RAM=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x600000 diff --git a/configs/total_compute_defconfig b/configs/total_compute_defconfig index 5f21d2e367a..b3d2e5c88a6 100644 --- a/configs/total_compute_defconfig +++ b/configs/total_compute_defconfig @@ -43,7 +43,7 @@ CONFIG_CMD_AVB=y CONFIG_CMD_UBI=y # CONFIG_ISO_PARTITION is not set CONFIG_OF_CONTROL=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_CLK=y # CONFIG_MMC_WRITE is not set CONFIG_ARM_PL180_MMCI=y diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig index 67561368128..acfc42842e3 100644 --- a/configs/trats2_defconfig +++ b/configs/trats2_defconfig @@ -43,7 +43,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_DM_I2C_GPIO=y diff --git a/configs/trats_defconfig b/configs/trats_defconfig index 98925243bf4..070ab268474 100644 --- a/configs/trats_defconfig +++ b/configs/trats_defconfig @@ -42,7 +42,7 @@ CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_NET is not set +CONFIG_NO_NET=y CONFIG_DFU_MMC=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x2000000 CONFIG_DM_I2C_GPIO=y diff --git a/configs/xenguest_arm64_defconfig b/configs/xenguest_arm64_defconfig index 6d040c2c15c..91657e0cd8b 100644 --- a/configs/xenguest_arm64_defconfig +++ b/configs/xenguest_arm64_defconfig @@ -37,7 +37,7 @@ CONFIG_CMD_PVBLOCK=y # CONFIG_CMD_SLEEP is not set CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set CONFIG_DM_SERIAL=y diff --git a/configs/xenguest_arm64_virtio_defconfig b/configs/xenguest_arm64_virtio_defconfig index d00a1ba0143..217b45a2c5e 100644 --- a/configs/xenguest_arm64_virtio_defconfig +++ b/configs/xenguest_arm64_virtio_defconfig @@ -42,7 +42,7 @@ CONFIG_CMD_PCI=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y CONFIG_PARTITION_TYPE_GUID=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_MMC is not set CONFIG_DM_PCI_COMPAT=y CONFIG_PCI_REGION_MULTI_ENTRY=y diff --git a/configs/xilinx_versal_mini_defconfig b/configs/xilinx_versal_mini_defconfig index b97bf5e60a9..e9183bc8071 100644 --- a/configs/xilinx_versal_mini_defconfig +++ b/configs/xilinx_versal_mini_defconfig @@ -57,7 +57,7 @@ CONFIG_SYS_ALT_MEMTEST=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_SLEEP is not set CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_MMC is not set CONFIG_ARM_DCC=y diff --git a/configs/xilinx_versal_mini_emmc0_defconfig b/configs/xilinx_versal_mini_emmc0_defconfig index 5c949e34442..7ba7e65597a 100644 --- a/configs/xilinx_versal_mini_emmc0_defconfig +++ b/configs/xilinx_versal_mini_emmc0_defconfig @@ -55,7 +55,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ZYNQ=y diff --git a/configs/xilinx_versal_mini_emmc1_defconfig b/configs/xilinx_versal_mini_emmc1_defconfig index 04cba5bc72d..54cc51ee7f3 100644 --- a/configs/xilinx_versal_mini_emmc1_defconfig +++ b/configs/xilinx_versal_mini_emmc1_defconfig @@ -55,7 +55,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ZYNQ=y diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig index 8f162597603..5ffb2cd5bfb 100644 --- a/configs/xilinx_versal_mini_ospi_defconfig +++ b/configs/xilinx_versal_mini_ospi_defconfig @@ -51,7 +51,7 @@ CONFIG_SYS_PROMPT="Versal> " # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_MMC is not set CONFIG_MTD=y diff --git a/configs/xilinx_versal_mini_qspi_defconfig b/configs/xilinx_versal_mini_qspi_defconfig index 8fbde1c7d3c..552cbdd740b 100644 --- a/configs/xilinx_versal_mini_qspi_defconfig +++ b/configs/xilinx_versal_mini_qspi_defconfig @@ -53,7 +53,7 @@ CONFIG_SYS_PROMPT="Versal> " # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/xilinx_versal_net_mini_defconfig b/configs/xilinx_versal_net_mini_defconfig index d6ebd080463..c4b1a5d5416 100644 --- a/configs/xilinx_versal_net_mini_defconfig +++ b/configs/xilinx_versal_net_mini_defconfig @@ -61,7 +61,7 @@ CONFIG_CMD_CACHE=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/xilinx_versal_net_mini_emmc_defconfig b/configs/xilinx_versal_net_mini_emmc_defconfig index fc88eee10af..c64ab92533b 100644 --- a/configs/xilinx_versal_net_mini_emmc_defconfig +++ b/configs/xilinx_versal_net_mini_emmc_defconfig @@ -50,7 +50,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_MMC_HS200_SUPPORT=y CONFIG_MMC_SDHCI=y diff --git a/configs/xilinx_versal_net_mini_ospi_defconfig b/configs/xilinx_versal_net_mini_ospi_defconfig index 872a4a55952..f1a136fe52c 100644 --- a/configs/xilinx_versal_net_mini_ospi_defconfig +++ b/configs/xilinx_versal_net_mini_ospi_defconfig @@ -50,7 +50,7 @@ CONFIG_SYS_PROMPT="Versal NET> " # CONFIG_CMD_ITEST is not set # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_MMC is not set CONFIG_MTD=y diff --git a/configs/xilinx_versal_net_mini_qspi_defconfig b/configs/xilinx_versal_net_mini_qspi_defconfig index 00319e06102..75589c478d8 100644 --- a/configs/xilinx_versal_net_mini_qspi_defconfig +++ b/configs/xilinx_versal_net_mini_qspi_defconfig @@ -52,7 +52,7 @@ CONFIG_SYS_PROMPT="Versal NET> " # CONFIG_CMD_SOURCE is not set # CONFIG_CMD_SETEXPR is not set # CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_GPIO is not set # CONFIG_I2C is not set diff --git a/configs/xilinx_zynqmp_mini_defconfig b/configs/xilinx_zynqmp_mini_defconfig index 4b45074efc4..09d73b0617f 100644 --- a/configs/xilinx_zynqmp_mini_defconfig +++ b/configs/xilinx_zynqmp_mini_defconfig @@ -53,7 +53,7 @@ CONFIG_CMD_CACHE=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_DM_MAILBOX is not set # CONFIG_MMC is not set diff --git a/configs/xilinx_zynqmp_mini_emmc0_defconfig b/configs/xilinx_zynqmp_mini_emmc0_defconfig index 49c7235fb8c..0e0242d8aac 100644 --- a/configs/xilinx_zynqmp_mini_emmc0_defconfig +++ b/configs/xilinx_zynqmp_mini_emmc0_defconfig @@ -64,7 +64,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_DM_MAILBOX is not set diff --git a/configs/xilinx_zynqmp_mini_emmc1_defconfig b/configs/xilinx_zynqmp_mini_emmc1_defconfig index 1ef89f50444..01297f615b8 100644 --- a/configs/xilinx_zynqmp_mini_emmc1_defconfig +++ b/configs/xilinx_zynqmp_mini_emmc1_defconfig @@ -64,7 +64,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_DM_MAILBOX is not set diff --git a/configs/xilinx_zynqmp_mini_nand_defconfig b/configs/xilinx_zynqmp_mini_nand_defconfig index b4719536be1..fd27f565b03 100644 --- a/configs/xilinx_zynqmp_mini_nand_defconfig +++ b/configs/xilinx_zynqmp_mini_nand_defconfig @@ -48,7 +48,7 @@ CONFIG_CLOCKS=y # CONFIG_CMD_SETEXPR is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_DM_MAILBOX is not set # CONFIG_MMC is not set diff --git a/configs/xilinx_zynqmp_mini_nand_single_defconfig b/configs/xilinx_zynqmp_mini_nand_single_defconfig index 7ede17654dd..480c00ed152 100644 --- a/configs/xilinx_zynqmp_mini_nand_single_defconfig +++ b/configs/xilinx_zynqmp_mini_nand_single_defconfig @@ -48,7 +48,7 @@ CONFIG_CLOCKS=y # CONFIG_CMD_SETEXPR is not set CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set # CONFIG_DM_MAILBOX is not set # CONFIG_MMC is not set diff --git a/configs/xilinx_zynqmp_mini_qspi_defconfig b/configs/xilinx_zynqmp_mini_qspi_defconfig index 0d79ecece71..d8830a6f247 100644 --- a/configs/xilinx_zynqmp_mini_qspi_defconfig +++ b/configs/xilinx_zynqmp_mini_qspi_defconfig @@ -67,7 +67,7 @@ CONFIG_SPL_SYS_MALLOC_SIZE=0x1000000 CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_FIRMWARE is not set diff --git a/configs/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig index 750ea0db2b2..e7414c78d1e 100644 --- a/configs/zynq_cse_nand_defconfig +++ b/configs/zynq_cse_nand_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_MAXARGS=32 CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_MMC is not set diff --git a/configs/zynq_cse_nor_defconfig b/configs/zynq_cse_nor_defconfig index 3155fe0b378..4f2186b2a51 100644 --- a/configs/zynq_cse_nor_defconfig +++ b/configs/zynq_cse_nor_defconfig @@ -69,7 +69,7 @@ CONFIG_SYS_MAXARGS=32 CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_MMC is not set diff --git a/configs/zynq_cse_qspi_defconfig b/configs/zynq_cse_qspi_defconfig index f2e1aa6d3ab..a372a13fe2d 100644 --- a/configs/zynq_cse_qspi_defconfig +++ b/configs/zynq_cse_qspi_defconfig @@ -78,7 +78,7 @@ CONFIG_SYS_MAXARGS=32 CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y -# CONFIG_NET is not set +CONFIG_NO_NET=y # CONFIG_DM_DEVICE_REMOVE is not set CONFIG_SPL_DM_SEQ_ALIAS=y # CONFIG_MMC is not set From patchwork Fri Aug 23 13:48:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821720 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387215wrh; Fri, 23 Aug 2024 06:51:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVIYJvksvQYnRLbCjkn6WlaT2LxfiDm0QMos+f92Ww76w2RlrZ8WME/hvj26rzNOVC1ZHC77w==@linaro.org X-Google-Smtp-Source: AGHT+IEde69cShNatnYYs1saG6eHDLaaK8dqFQH1RVWXPV6Tgfl77ZOiHHJjZits+0A8LJZCHqVv X-Received: by 2002:a05:6000:1802:b0:368:3562:7c76 with SMTP id ffacd0b85a97d-37310eb38d4mr1718686f8f.3.1724421110448; Fri, 23 Aug 2024 06:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421110; cv=none; d=google.com; s=arc-20160816; b=HjtsPuB/ajZ3a666sZdIiNRxHXgdDrtcFXa9PPv68cMYFRtfkoPnFrhrC/C0RApV9w whqleaoyswTxsLiIYmhjdxNqfEY8Y+tRkK+AtCdLYvjAwVft73g6FexWoaZ/CtEMLCRo A9hZMA3HJU16ij4C0cUMNzPXOjI5zmYVvywlDHYx/juXYaGTNLJlShwWZ2rwcEW/wZDD HGXTi8AIMPmoyz4DK4vbF/S/Gy+TEpWT9GX8LFOab4oVyBL3hCR1DB0Ey1QS43ncuR/p pOf3tenSKJ0eMfHYysEhWPSZmixe8UFWYeOe8zOy/Eb+YwXmGF5JyM/Jo1QGxu1n+hxk eStQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VUKk7SF2LW50Ag08eIjG9iiEvLdODsmP+AiQX85HSYs=; fh=vU68rU7MqtAvdnFPdSUzf4N3jfAJEZb33vd2DyN8YGc=; b=X1nDB5VX7mUldu5dgsjr76qrCMye6kR+ePN96YT1zsHg2UmyFAal1LasXap4FeBba1 SRhEdJoyuNILFQFp9Q5mcyLX9817rXLukQBkSelaQUqSqoVp1f5DzFYlKURVoy+xtXTu vpjLQjOfY7qaYHL+Z0lwzP9cnKhK/9D8dve8d330pec3ISImz2vsltjym5d6ZtaTFFOu KqjIRof0vt0LI0fx55kwPXYlzTiA9g9/EB4rJk7C8PfqO3HS8K6+NaYM/FHmtKTkH5+7 XlfahHkmAONLy/UNqqe8ZElyWxNIWRYgRP+TkEJk8KMSUtRywZIkcgOAocaLS/XNYXUG nqrA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=F2pu3Tyr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-37308200c05si1468245f8f.489.2024.08.23.06.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:51:50 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=F2pu3Tyr; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C42EB88BB0; Fri, 23 Aug 2024 15:49:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="F2pu3Tyr"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E305F88B47; Fri, 23 Aug 2024 15:49:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 5DE9A886E7 for ; Fri, 23 Aug 2024 15:49:46 +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-wr1-x42b.google.com with SMTP id ffacd0b85a97d-371a13c7c80so1739059f8f.0 for ; Fri, 23 Aug 2024 06:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420985; x=1725025785; 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=VUKk7SF2LW50Ag08eIjG9iiEvLdODsmP+AiQX85HSYs=; b=F2pu3TyrJxrwFmfaCzgQW7vekKlwdTLzojEgMscdEEE0TE37q3hCCl802WPHD3o7Xk +1tNodHAx4sZ3jvzPiKAj0VYtUFn8olj7ycKlc5BWmqXTN0EmfKkiIGOODHOIlZJXT3A Xqzl3FVbjnB/IjTot1C6byeO+RawfG63EdSPDwzMV9PY0zpzrpQVUbIWyxEra12yVqqb MvCbTJ6TN6DIN0qmkawD4S2LeyId30+XXXDzSMtk2NvF8wjyBNPcTzIU0Wy+W5kwt1oU EXM9DRyPVB/+sgBjPmOIYTBgK0T+L4KtSHLZKwRAUO32vhHA0CZY0X+1S6Amt3V8cg3A JUZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420986; x=1725025786; 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=VUKk7SF2LW50Ag08eIjG9iiEvLdODsmP+AiQX85HSYs=; b=DR5gfsRPGAFXpyfSAtTmgDwZe+iGzhf3QLGPLc2wf2SyXY3Yb9rRWcVMO7FPqokNhn +k/tVOuXts+WG58Lg3Zn+W8N4UO9YISVb5UknOft/EsIKee4bcogaf+w4uEYmO1SD8YL uvT9Nvk1CnYra4Q8Qq1HpcxuI0IQfyGUM2MGIsbEtxgmRzheVkyK2yHKIwFQVsI07eMF nhglwtt+C23nlPz8ddelBUMFXgedkaKdKlFDA2nhU4xOLHIgu0XDGn19Mm9x8XQpYNlQ 4JrpMIzQoMLnBOooSILNMV5z3HE+miouBsAyRWJk0Z/UzO8DRbhwZO5Fo0leCtb+WiVU zuQA== X-Gm-Message-State: AOJu0Yw2hETzvdkT8zmGVhHHT7pnXh7IN3nlN/o0vVuvdWjtGzQDW3Bk okS/G8QqrgHfovEwADiitIRDwLWzkBHZgR9FukeAPtQ8b0ztgfvaR9FFkB1iSlPk0ChqtF5kPNC Rw+BymJxy X-Received: by 2002:adf:e509:0:b0:367:9049:da2e with SMTP id ffacd0b85a97d-37310eb9d8amr1279142f8f.8.1724420984615; Fri, 23 Aug 2024 06:49:44 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:44 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Heinrich Schuchardt , Sumit Garg , Rasmus Villemoes , Andrew Davis , Bryan Brattlof , Jesse Taube , "Leon M. Busch-George" , Masahisa Kojima , Sean Anderson , Marek Vasut Subject: [PATCH v9 16/37] net: split include/net.h into net{, -common, -legacy, -lwip}.h Date: Fri, 23 Aug 2024 15:48:20 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Make net.h a wrapper which includes net-common.h and either net-legacy.h or net-lwip.h based on NET_LWIP. Signed-off-by: Jerome Forissier --- Makefile | 4 +- include/net-common.h | 485 ++++++++++++++++++++++ include/net-legacy.h | 560 +++++++++++++++++++++++++ include/net-lwip.h | 14 + include/net.h | 943 +------------------------------------------ 5 files changed, 1066 insertions(+), 940 deletions(-) create mode 100644 include/net-common.h create mode 100644 include/net-legacy.h create mode 100644 include/net-lwip.h diff --git a/Makefile b/Makefile index dc7bdd79420..4c2170b10f2 100644 --- a/Makefile +++ b/Makefile @@ -836,7 +836,9 @@ UBOOTINCLUDE := \ -I$(srctree)/arch/arm/thumb1/include)) \ -I$(srctree)/arch/$(ARCH)/include \ -include $(srctree)/include/linux/kconfig.h \ - -I$(srctree)/dts/upstream/include + -I$(srctree)/dts/upstream/include \ + $(if $(CONFIG_NET_LWIP), -I$(srctree)/lib/lwip/lwip/src/include \ + -I$(srctree)/lib/lwip/u-boot) NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) diff --git a/include/net-common.h b/include/net-common.h new file mode 100644 index 00000000000..26674ec7e90 --- /dev/null +++ b/include/net-common.h @@ -0,0 +1,485 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __NET_COMMON_H__ +#define __NET_COMMON_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */ + +/* + * The number of receive packet buffers, and the required packet buffer + * alignment in memory. + * + */ +#define PKTBUFSRX CONFIG_SYS_RX_ETH_BUFFER +#define PKTALIGN ARCH_DMA_MINALIGN + +/* IPv4 addresses are always 32 bits in size */ +struct in_addr { + __be32 s_addr; +}; + +#define PROT_IP 0x0800 /* IP protocol */ +#define PROT_ARP 0x0806 /* IP ARP protocol */ +#define PROT_WOL 0x0842 /* ether-wake WoL protocol */ +#define PROT_RARP 0x8035 /* IP ARP protocol */ +#define PROT_VLAN 0x8100 /* IEEE 802.1q protocol */ +#define PROT_IPV6 0x86dd /* IPv6 over bluebook */ +#define PROT_PPP_SES 0x8864 /* PPPoE session messages */ +#define PROT_NCSI 0x88f8 /* NC-SI control packets */ + +#define IPPROTO_ICMP 1 /* Internet Control Message Protocol */ +#define IPPROTO_TCP 6 /* Transmission Control Protocol */ +#define IPPROTO_UDP 17 /* User Datagram Protocol */ + +#define IP_OFFS 0x1fff /* ip offset *= 8 */ +#define IP_FLAGS 0xe000 /* first 3 bits */ +#define IP_FLAGS_RES 0x8000 /* reserved */ +#define IP_FLAGS_DFRAG 0x4000 /* don't fragments */ +#define IP_FLAGS_MFRAG 0x2000 /* more fragments */ + +#define IP_HDR_SIZE (sizeof(struct ip_hdr)) + +#define IP_MIN_FRAG_DATAGRAM_SIZE (IP_HDR_SIZE + 8) + +/* + * Internet Protocol (IP) + UDP header. + */ +struct ip_udp_hdr { + u8 ip_hl_v; /* header length and version */ + u8 ip_tos; /* type of service */ + u16 ip_len; /* total length */ + u16 ip_id; /* identification */ + u16 ip_off; /* fragment offset field */ + u8 ip_ttl; /* time to live */ + u8 ip_p; /* protocol */ + u16 ip_sum; /* checksum */ + struct in_addr ip_src; /* Source IP address */ + struct in_addr ip_dst; /* Destination IP address */ + u16 udp_src; /* UDP source port */ + u16 udp_dst; /* UDP destination port */ + u16 udp_len; /* Length of UDP packet */ + u16 udp_xsum; /* Checksum */ +} __attribute__((packed)); + +#define IP_UDP_HDR_SIZE (sizeof(struct ip_udp_hdr)) +#define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE) + +/* Number of packets processed together */ +#define ETH_PACKETS_BATCH_RECV 32 + +/* ARP hardware address length */ +#define ARP_HLEN 6 +/* + * The size of a MAC address in string form, each digit requires two chars + * and five separator characters to form '00:00:00:00:00:00'. + */ +#define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) + +#define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */ + +# define ARP_ETHER 1 /* Ethernet hardware address */ + +/* + * Maximum packet size; used to allocate packet storage. Use + * the maxium Ethernet frame size as specified by the Ethernet + * standard including the 802.1Q tag (VLAN tagging). + * maximum packet size = 1522 + * maximum packet size and multiple of 32 bytes = 1536 + */ +#define PKTSIZE 1522 +#ifndef CONFIG_DM_DSA +#define PKTSIZE_ALIGN 1536 +#else +/* Maximum DSA tagging overhead (headroom and/or tailroom) */ +#define DSA_MAX_OVR 256 +#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR) +#endif + +/* + * Maximum receive ring size; that is, the number of packets + * we can buffer before overflow happens. Basically, this just + * needs to be enough to prevent a packet being discarded while + * we are processing the previous one. + * Used only in drivers/net/mvgbe.c. + */ +#define RINGSZ 4 +#define RINGSZ_LOG2 2 + +extern int net_restart_wrap; /* Tried all network devices */ +extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ +extern const u8 net_bcast_ethaddr[ARP_HLEN]; /* Ethernet broadcast address */ +extern char net_boot_file_name[1024];/* Boot File name */ + +/** + * compute_ip_checksum() - Compute IP checksum + * + * @addr: Address to check (must be 16-bit aligned) + * @nbytes: Number of bytes to check (normally a multiple of 2) + * Return: 16-bit IP checksum + */ +unsigned compute_ip_checksum(const void *addr, unsigned nbytes); + +/** + * ip_checksum_ok() - check if a checksum is correct + * + * This works by making sure the checksum sums to 0 + * + * @addr: Address to check (must be 16-bit aligned) + * @nbytes: Number of bytes to check (normally a multiple of 2) + * Return: true if the checksum matches, false if not + */ +int ip_checksum_ok(const void *addr, unsigned nbytes); + +/** + * add_ip_checksums() - add two IP checksums + * + * @offset: Offset of first sum (if odd we do a byte-swap) + * @sum: First checksum + * @new_sum: New checksum to add + * Return: updated 16-bit IP checksum + */ +unsigned add_ip_checksums(unsigned offset, unsigned sum, unsigned new_sum); + +/* + * The devname can be either an exact name given by the driver or device tree + * or it can be an alias of the form "eth%d" + */ +struct udevice *eth_get_dev_by_name(const char *devname); +int eth_is_active(struct udevice *dev); /* Test device for active state */ + +/* + * Get the hardware address for an ethernet interface . + * Args: + * base_name - base name for device (normally "eth") + * index - device index number (0 for first) + * enetaddr - returns 6 byte hardware address + * Returns: + * Return true if the address is valid. + */ +int eth_env_get_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +/** + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable + * + * This sets up an environment variable with the given MAC address (@enetaddr). + * The environment variable to be set is defined by <@base_name><@index>addr. + * If @index is 0 it is omitted. For common Ethernet this means ethaddr, + * eth1addr, etc. + * + * @base_name: Base name for variable, typically "eth" + * @index: Index of interface being updated (>=0) + * @enetaddr: Pointer to MAC address to put into the variable + * Return: 0 if OK, other value on error + */ +int eth_env_set_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +/* + * Initialize USB ethernet device with CONFIG_DM_ETH + * Returns: + * 0 is success, non-zero is error status. + */ +int usb_ether_init(void); + +int eth_init(void); /* Initialize the device */ +int eth_send(void *packet, int length); /* Send a packet */ +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) +int eth_receive(void *packet, int length); /* Receive a packet*/ +extern void (*push_packet)(void *packet, int length); +#endif +int eth_rx(void); /* Check for received packets */ + +/** + * reset_phy() - Reset the Ethernet PHY + * + * This should be implemented by boards if CONFIG_RESET_PHY_R is enabled + */ +void reset_phy(void); + +static inline void net_send_packet(uchar *pkt, int len) +{ + if (DEBUG_NET_PKT_TRACE) + print_hex_dump_bytes("tx: ", DUMP_PREFIX_OFFSET, pkt, len); + /* Currently no way to return errors from eth_send() */ + (void) eth_send(pkt, len); +} + +enum eth_recv_flags { + /* + * Check hardware device for new packets (otherwise only return those + * which are already in the memory buffer ready to process) + */ + ETH_RECV_CHECK_DEVICE = 1 << 0, +}; + +/** + * struct eth_ops - functions of Ethernet MAC controllers + * + * start: Prepare the hardware to send and receive packets + * send: Send the bytes passed in "packet" as a packet on the wire + * recv: Check if the hardware received a packet. If so, set the pointer to the + * packet buffer in the packetp parameter. If not, return an error or 0 to + * indicate that the hardware receive FIFO is empty. If 0 is returned, the + * network stack will not process the empty packet, but free_pkt() will be + * called if supplied + * free_pkt: Give the driver an opportunity to manage its packet buffer memory + * when the network stack is finished processing it. This will only be + * called when no error was returned from recv - optional + * stop: Stop the hardware from looking for packets - may be called even if + * state == PASSIVE + * mcast: Join or leave a multicast group (for TFTP) - optional + * write_hwaddr: Write a MAC address to the hardware (used to pass it to Linux + * on some platforms like ARM). This function expects the + * eth_pdata::enetaddr field to be populated. The method can + * return -ENOSYS to indicate that this is not implemented for + this hardware - optional. + * read_rom_hwaddr: Some devices have a backup of the MAC address stored in a + * ROM on the board. This is how the driver should expose it + * to the network stack. This function should fill in the + * eth_pdata::enetaddr field - optional + * set_promisc: Enable or Disable promiscuous mode + * get_sset_count: Number of statistics counters + * get_string: Names of the statistic counters + * get_stats: The values of the statistic counters + */ +struct eth_ops { + int (*start)(struct udevice *dev); + int (*send)(struct udevice *dev, void *packet, int length); + int (*recv)(struct udevice *dev, int flags, uchar **packetp); + int (*free_pkt)(struct udevice *dev, uchar *packet, int length); + void (*stop)(struct udevice *dev); + int (*mcast)(struct udevice *dev, const u8 *enetaddr, int join); + int (*write_hwaddr)(struct udevice *dev); + int (*read_rom_hwaddr)(struct udevice *dev); + int (*set_promisc)(struct udevice *dev, bool enable); + int (*get_sset_count)(struct udevice *dev); + void (*get_strings)(struct udevice *dev, u8 *data); + void (*get_stats)(struct udevice *dev, u64 *data); +}; + +#define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops) + +struct udevice *eth_get_dev(void); /* get the current device */ +unsigned char *eth_get_ethaddr(void); /* get the current device MAC */ +int eth_rx(void); /* Check for received packets */ +void eth_halt(void); /* stop SCC */ +const char *eth_get_name(void); /* get name of current device */ +int eth_get_dev_index(void); + +int eth_initialize(void); /* Initialize network subsystem */ +void eth_try_another(int first_restart); /* Change the device */ +void eth_set_current(void); /* set nterface to ethcur var */ + +enum eth_state_t { + ETH_STATE_INIT, + ETH_STATE_PASSIVE, + ETH_STATE_ACTIVE +}; + +/** + * struct eth_pdata - Platform data for Ethernet MAC controllers + * + * @iobase: The base address of the hardware registers + * @enetaddr: The Ethernet MAC address that is loaded from EEPROM or env + * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_... + * @max_speed: Maximum speed of Ethernet connection supported by MAC + * @priv_pdata: device specific plat + */ +struct eth_pdata { + phys_addr_t iobase; + unsigned char enetaddr[ARP_HLEN]; + int phy_interface; + int max_speed; + void *priv_pdata; +}; + +struct ethernet_hdr { + u8 et_dest[ARP_HLEN]; /* Destination node */ + u8 et_src[ARP_HLEN]; /* Source node */ + u16 et_protlen; /* Protocol or length */ +} __attribute__((packed)); + +/* Ethernet header size */ +#define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr)) + +/** + * net_random_ethaddr - Generate software assigned random Ethernet address + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Generate a random Ethernet address (MAC) that is not multicast + * and has the local assigned bit set. + */ +static inline void net_random_ethaddr(uchar *addr) +{ + int i; + unsigned int seed = get_ticks(); + + for (i = 0; i < 6; i++) + addr[i] = rand_r(&seed); + + addr[0] &= 0xfe; /* clear multicast bit */ + addr[0] |= 0x02; /* set local assignment bit (IEEE802) */ +} + +/** + * is_zero_ethaddr - Determine if give Ethernet address is all zeros. + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Return true if the address is all zeroes. + */ +static inline int is_zero_ethaddr(const u8 *addr) +{ + return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); +} + +/** + * is_multicast_ethaddr - Determine if the Ethernet address is a multicast. + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Return true if the address is a multicast address. + * By definition the broadcast address is also a multicast address. + */ +static inline int is_multicast_ethaddr(const u8 *addr) +{ + return 0x01 & addr[0]; +} + +/* + * is_broadcast_ethaddr - Determine if the Ethernet address is broadcast + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Return true if the address is the broadcast address. + */ +static inline int is_broadcast_ethaddr(const u8 *addr) +{ + return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == + 0xff; +} + +/* + * is_valid_ethaddr - Determine if the given Ethernet address is valid + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not + * a multicast address, and is not FF:FF:FF:FF:FF:FF. + * + * Return true if the address is valid. + */ +static inline int is_valid_ethaddr(const u8 *addr) +{ + /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to + * explicitly check for it here. */ + return !is_multicast_ethaddr(addr) && !is_zero_ethaddr(addr); +} + +/** + * string_to_enetaddr() - Parse a MAC address + * + * Convert a string MAC address + * + * Implemented in lib/net_utils.c (built unconditionally) + * + * @addr: MAC address in aa:bb:cc:dd:ee:ff format, where each part is a 2-digit + * hex value + * @enetaddr: Place to put MAC address (6 bytes) + */ +void string_to_enetaddr(const char *addr, uint8_t *enetaddr); + +/** + * string_to_ip() - Convert a string to ip address + * + * Implemented in lib/net_utils.c (built unconditionally) + * + * @s: Input string to parse + * @return: in_addr struct containing the parsed IP address + */ +struct in_addr string_to_ip(const char *s); + +/* copy a filename (allow for "..." notation, limit length) */ +void copy_filename(char *dst, const char *src, int size); + +/* Processes a received packet */ +void net_process_received_packet(uchar *in_packet, int len); + +/** + * update_tftp - Update firmware over TFTP (via DFU) + * + * This function updates board's firmware via TFTP + * + * @param addr - memory address where data is stored + * @param interface - the DFU medium name - e.g. "mmc" + * @param devstring - the DFU medium number - e.g. "1" + * + * Return: - 0 on success, other value on failure + */ +int update_tftp(ulong addr, char *interface, char *devstring); + +/** + * env_get_ip() - Convert an environment value to to an ip address + * + * @var: Environment variable to convert. The value of this variable must be + * in the format format a.b.c.d, where each value is a decimal number from + * 0 to 255 + * Return: IP address, or 0 if invalid + */ +static inline struct in_addr env_get_ip(char *var) +{ + return string_to_ip(env_get(var)); +} + +int net_init(void); + +/** + * dhcp_run() - Run DHCP on the current ethernet device + * + * This sets the autoload variable, then puts it back to similar to its original + * state (y, n or unset). + * + * @addr: Address to load the file into (0 if @autoload is false) + * @fname: Filename of file to load (NULL if @autoload is false or to use the + * default filename) + * @autoload: true to load the file, false to just get the network IP + * @return 0 if OK, -EINVAL if the environment failed, -ENOENT if ant file was + * not found + */ +int dhcp_run(ulong addr, const char *fname, bool autoload); + +/** + * do_tftpb - Run the tftpboot command + * + * @cmdtp: Command information for tftpboot + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * Return: result (see enum command_ret_t) + */ +int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); + +/** + * wget_with_dns() - runs dns host IP address resulution before wget + * + * @dst_addr: destination address to download the file + * @uri: uri string of target file of wget + * Return: downloaded file size, negative if failed + */ +int wget_with_dns(ulong dst_addr, char *uri); +/** + * wget_validate_uri() - varidate the uri + * + * @uri: uri string of target file of wget + * Return: true if uri is valid, false if uri is invalid + */ +bool wget_validate_uri(char *uri); +//int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); + +#endif /* __NET_COMMON_H__ */ diff --git a/include/net-legacy.h b/include/net-legacy.h new file mode 100644 index 00000000000..b5972deee31 --- /dev/null +++ b/include/net-legacy.h @@ -0,0 +1,560 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * LiMon Monitor (LiMon) - Network. + * + * Copyright 1994 - 2000 Neil Russell. + * (See License) + * + * History + * 9/16/00 bor adapted to TQM823L/STK8xxL board, RARP/TFTP boot added + */ + +#ifndef __NET_LEGACY_H__ +#define __NET_LEGACY_H__ + +#include +#include /* for nton* / ntoh* stuff */ +#include +#include +#include + +struct bd_info; +struct cmd_tbl; +struct udevice; + +#define DEBUG_LL_STATE 0 /* Link local state machine changes */ +#define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ +#define DEBUG_NET_PKT 0 /* Packets on info on the network at large */ +#define DEBUG_INT_STATE 0 /* Internal network state changes */ + +/* ARP hardware address length */ +#define ARP_HLEN 6 +/* + * The size of a MAC address in string form, each digit requires two chars + * and five separator characters to form '00:00:00:00:00:00'. + */ +#define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) + +/** + * An incoming packet handler. + * @param pkt pointer to the application packet + * @param dport destination UDP port + * @param sip source IP address + * @param sport source UDP port + * @param len packet length + */ +typedef void rxhand_f(uchar *pkt, unsigned dport, + struct in_addr sip, unsigned sport, + unsigned len); + +/** + * An incoming ICMP packet handler. + * @param type ICMP type + * @param code ICMP code + * @param dport destination UDP port + * @param sip source IP address + * @param sport source UDP port + * @param pkt pointer to the ICMP packet data + * @param len packet length + */ +typedef void rxhand_icmp_f(unsigned type, unsigned code, unsigned dport, + struct in_addr sip, unsigned sport, uchar *pkt, unsigned len); + +/* + * A timeout handler. Called after time interval has expired. + */ +typedef void thand_f(void); + +/* + * The devname can be either an exact name given by the driver or device tree + * or it can be an alias of the form "eth%d" + */ +struct udevice *eth_get_dev_by_name(const char *devname); +int eth_init_state_only(void); /* Set active state */ +void eth_halt_state_only(void); /* Set passive state */ + +/** + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable + * + * This sets up an environment variable with the given MAC address (@enetaddr). + * The environment variable to be set is defined by <@base_name><@index>addr. + * If @index is 0 it is omitted. For common Ethernet this means ethaddr, + * eth1addr, etc. + * + * @base_name: Base name for variable, typically "eth" + * @index: Index of interface being updated (>=0) + * @enetaddr: Pointer to MAC address to put into the variable + * Return: 0 if OK, other value on error + */ +int eth_env_set_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +/* + * Get the hardware address for an ethernet interface . + * Args: + * base_name - base name for device (normally "eth") + * index - device index number (0 for first) + * enetaddr - returns 6 byte hardware address + * Returns: + * Return true if the address is valid. + */ +int eth_env_get_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +int eth_send(void *packet, int length); /* Send a packet */ + +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) +int eth_receive(void *packet, int length); /* Receive a packet*/ +extern void (*push_packet)(void *packet, int length); +#endif +int eth_mcast_join(struct in_addr mcast_addr, int join); + +/**********************************************************************/ +/* + * Protocol headers. + */ + +#define ETH_FCS_LEN 4 /* Octets in the FCS */ + +struct e802_hdr { + u8 et_dest[ARP_HLEN]; /* Destination node */ + u8 et_src[ARP_HLEN]; /* Source node */ + u16 et_protlen; /* Protocol or length */ + u8 et_dsap; /* 802 DSAP */ + u8 et_ssap; /* 802 SSAP */ + u8 et_ctl; /* 802 control */ + u8 et_snap1; /* SNAP */ + u8 et_snap2; + u8 et_snap3; + u16 et_prot; /* 802 protocol */ +} __attribute__((packed)); + +/* 802 + SNAP + ethernet header size */ +#define E802_HDR_SIZE (sizeof(struct e802_hdr)) + +/* + * Virtual LAN Ethernet header + */ +struct vlan_ethernet_hdr { + u8 vet_dest[ARP_HLEN]; /* Destination node */ + u8 vet_src[ARP_HLEN]; /* Source node */ + u16 vet_vlan_type; /* PROT_VLAN */ + u16 vet_tag; /* TAG of VLAN */ + u16 vet_type; /* protocol type */ +} __attribute__((packed)); + +/* VLAN Ethernet header size */ +#define VLAN_ETHER_HDR_SIZE (sizeof(struct vlan_ethernet_hdr)) + +/* + * Internet Protocol (IP) header. + */ +struct ip_hdr { + u8 ip_hl_v; /* header length and version */ + u8 ip_tos; /* type of service */ + u16 ip_len; /* total length */ + u16 ip_id; /* identification */ + u16 ip_off; /* fragment offset field */ + u8 ip_ttl; /* time to live */ + u8 ip_p; /* protocol */ + u16 ip_sum; /* checksum */ + struct in_addr ip_src; /* Source IP address */ + struct in_addr ip_dst; /* Destination IP address */ +} __attribute__((packed)); + +#define IP_OFFS 0x1fff /* ip offset *= 8 */ +#define IP_FLAGS 0xe000 /* first 3 bits */ +#define IP_FLAGS_RES 0x8000 /* reserved */ +#define IP_FLAGS_DFRAG 0x4000 /* don't fragments */ +#define IP_FLAGS_MFRAG 0x2000 /* more fragments */ + +#define IP_HDR_SIZE (sizeof(struct ip_hdr)) + +#define IP_MIN_FRAG_DATAGRAM_SIZE (IP_HDR_SIZE + 8) + +/* + * Address Resolution Protocol (ARP) header. + */ +struct arp_hdr { + u16 ar_hrd; /* Format of hardware address */ +# define ARP_ETHER 1 /* Ethernet hardware address */ + u16 ar_pro; /* Format of protocol address */ + u8 ar_hln; /* Length of hardware address */ + u8 ar_pln; /* Length of protocol address */ +# define ARP_PLEN 4 + u16 ar_op; /* Operation */ +# define ARPOP_REQUEST 1 /* Request to resolve address */ +# define ARPOP_REPLY 2 /* Response to previous request */ + +# define RARPOP_REQUEST 3 /* Request to resolve address */ +# define RARPOP_REPLY 4 /* Response to previous request */ + + /* + * The remaining fields are variable in size, according to + * the sizes above, and are defined as appropriate for + * specific hardware/protocol combinations. + */ + u8 ar_data[0]; +#define ar_sha ar_data[0] +#define ar_spa ar_data[ARP_HLEN] +#define ar_tha ar_data[ARP_HLEN + ARP_PLEN] +#define ar_tpa ar_data[ARP_HLEN + ARP_PLEN + ARP_HLEN] +#if 0 + u8 ar_sha[]; /* Sender hardware address */ + u8 ar_spa[]; /* Sender protocol address */ + u8 ar_tha[]; /* Target hardware address */ + u8 ar_tpa[]; /* Target protocol address */ +#endif /* 0 */ +} __attribute__((packed)); + + +/* + * ICMP stuff (just enough to handle (host) redirect messages) + */ +#define ICMP_ECHO_REPLY 0 /* Echo reply */ +#define ICMP_NOT_REACH 3 /* Detination unreachable */ +#define ICMP_REDIRECT 5 /* Redirect (change route) */ +#define ICMP_ECHO_REQUEST 8 /* Echo request */ + +/* Codes for REDIRECT. */ +#define ICMP_REDIR_NET 0 /* Redirect Net */ +#define ICMP_REDIR_HOST 1 /* Redirect Host */ + +/* Codes for NOT_REACH */ +#define ICMP_NOT_REACH_PORT 3 /* Port unreachable */ + +struct icmp_hdr { + u8 type; + u8 code; + u16 checksum; + union { + struct { + u16 id; + u16 sequence; + } echo; + u32 gateway; + struct { + u16 unused; + u16 mtu; + } frag; + u8 data[0]; + } un; +} __attribute__((packed)); + +#define ICMP_HDR_SIZE (sizeof(struct icmp_hdr)) +#define IP_ICMP_HDR_SIZE (IP_HDR_SIZE + ICMP_HDR_SIZE) + +/* + * Maximum packet size; used to allocate packet storage. Use + * the maxium Ethernet frame size as specified by the Ethernet + * standard including the 802.1Q tag (VLAN tagging). + * maximum packet size = 1522 + * maximum packet size and multiple of 32 bytes = 1536 + */ +#define PKTSIZE 1522 +#ifndef CONFIG_DM_DSA +#define PKTSIZE_ALIGN 1536 +#else +/* Maximum DSA tagging overhead (headroom and/or tailroom) */ +#define DSA_MAX_OVR 256 +#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR) +#endif + +/**********************************************************************/ +/* + * Globals. + * + * Note: + * + * All variables of type struct in_addr are stored in NETWORK byte order + * (big endian). + */ + +/* net.c */ +/** BOOTP EXTENTIONS **/ +extern struct in_addr net_gateway; /* Our gateway IP address */ +extern struct in_addr net_netmask; /* Our subnet mask (0 = unknown) */ +/* Our Domain Name Server (0 = unknown) */ +extern struct in_addr net_dns_server; +#if defined(CONFIG_BOOTP_DNS2) +/* Our 2nd Domain Name Server (0 = unknown) */ +extern struct in_addr net_dns_server2; +#endif +extern char net_nis_domain[32]; /* Our IS domain */ +extern char net_hostname[32]; /* Our hostname */ +#ifdef CONFIG_NET +extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */ +#endif +/* Indicates whether the pxe path prefix / config file was specified in dhcp option */ +extern char *pxelinux_configfile; +/** END OF BOOTP EXTENTIONS **/ +extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */ +extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */ +extern struct in_addr net_ip; /* Our IP addr (0 = unknown) */ +extern struct in_addr net_server_ip; /* Server IP addr (0 = unknown) */ +extern uchar *net_tx_packet; /* THE transmit packet */ +extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ +extern uchar *net_rx_packet; /* Current receive packet */ +extern int net_rx_packet_len; /* Current rx packet length */ +extern const u8 net_null_ethaddr[ARP_HLEN]; + +#define VLAN_NONE 4095 /* untagged */ +#define VLAN_IDMASK 0x0fff /* mask of valid vlan id */ +extern ushort net_our_vlan; /* Our VLAN */ +extern ushort net_native_vlan; /* Our Native VLAN */ + +extern int net_restart_wrap; /* Tried all network devices */ + +enum proto_t { + BOOTP, RARP, ARP, TFTPGET, DHCP, DHCP6, PING, PING6, DNS, NFS, CDP, + NETCONS, SNTP, TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT_UDP, FASTBOOT_TCP, + WOL, UDP, NCSI, WGET, RS +}; +/* Indicates whether the file name was specified on the command line */ +extern bool net_boot_file_name_explicit; +/* The actual transferred size of the bootfile (in bytes) */ +extern u32 net_boot_file_size; +/* Boot file size in blocks as reported by the DHCP server */ +extern u32 net_boot_file_expected_size_in_blocks; + +#if defined(CONFIG_CMD_DNS) +extern char *net_dns_resolve; /* The host to resolve */ +extern char *net_dns_env_var; /* the env var to put the ip into */ +#endif + +#if defined(CONFIG_CMD_PING) +extern struct in_addr net_ping_ip; /* the ip address to ping */ +#endif + +#if defined(CONFIG_CMD_CDP) +/* when CDP completes these hold the return values */ +extern ushort cdp_native_vlan; /* CDP returned native VLAN */ +extern ushort cdp_appliance_vlan; /* CDP returned appliance VLAN */ + +/* + * Check for a CDP packet by examining the received MAC address field + */ +static inline int is_cdp_packet(const uchar *ethaddr) +{ + extern const u8 net_cdp_ethaddr[ARP_HLEN]; + + return memcmp(ethaddr, net_cdp_ethaddr, ARP_HLEN) == 0; +} +#endif + +#if defined(CONFIG_CMD_SNTP) +extern struct in_addr net_ntp_server; /* the ip address to NTP */ +extern int net_ntp_time_offset; /* offset time from UTC */ +#endif + +int net_loop(enum proto_t); + +/* Load failed. Start again. */ +int net_start_again(void); + +/* Get size of the ethernet header when we send */ +int net_eth_hdr_size(void); + +/* Set ethernet header; returns the size of the header */ +int net_set_ether(uchar *xet, const uchar *dest_ethaddr, uint prot); +int net_update_ether(struct ethernet_hdr *et, uchar *addr, uint prot); + +/* Set IP header */ +void net_set_ip_header(uchar *pkt, struct in_addr dest, struct in_addr source, + u16 pkt_len, u8 proto); +void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, + int sport, int len); + +/* Callbacks */ +rxhand_f *net_get_udp_handler(void); /* Get UDP RX packet handler */ +void net_set_udp_handler(rxhand_f *); /* Set UDP RX packet handler */ +rxhand_f *net_get_arp_handler(void); /* Get ARP RX packet handler */ +void net_set_arp_handler(rxhand_f *); /* Set ARP RX packet handler */ +bool arp_is_waiting(void); /* Waiting for ARP reply? */ +void net_set_icmp_handler(rxhand_icmp_f *f); /* Set ICMP RX handler */ +void net_set_timeout_handler(ulong, thand_f *);/* Set timeout handler */ + +/* Network loop state */ +enum net_loop_state { + NETLOOP_CONTINUE, + NETLOOP_RESTART, + NETLOOP_SUCCESS, + NETLOOP_FAIL +}; +extern enum net_loop_state net_state; + +static inline void net_set_state(enum net_loop_state state) +{ + debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); + net_state = state; +} + +/* + * net_get_async_tx_pkt_buf - Get a packet buffer that is not in use for + * sending an asynchronous reply + * + * returns - ptr to packet buffer + */ +uchar * net_get_async_tx_pkt_buf(void); + +/** + * net_send_ip_packet() - Transmit "net_tx_packet" as UDP or TCP packet, + * send ARP request if needed (ether will be populated) + * @ether: Raw packet buffer + * @dest: IP address to send the datagram to + * @dport: Destination UDP port + * @sport: Source UDP port + * @payload_len: Length of data after the UDP header + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure + */ +int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport, + int payload_len, int proto, u8 action, u32 tcp_seq_num, + u32 tcp_ack_num); +/** + * net_send_tcp_packet() - Transmit TCP packet. + * @payload_len: length of payload + * @dport: Destination TCP port + * @sport: Source TCP port + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure + */ +int net_send_tcp_packet(int payload_len, int dport, int sport, u8 action, + u32 tcp_seq_num, u32 tcp_ack_num); +int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, + int sport, int payload_len); + +#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) +void nc_start(void); +int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port, + unsigned src_port, unsigned len); +#endif + +static __always_inline int eth_is_on_demand_init(void) +{ +#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) + extern enum proto_t net_loop_last_protocol; + + return net_loop_last_protocol != NETCONS; +#else + return 1; +#endif +} + +static inline void eth_set_last_protocol(int protocol) +{ +#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) + extern enum proto_t net_loop_last_protocol; + + net_loop_last_protocol = protocol; +#endif +} + +/* + * Check if autoload is enabled. If so, use either NFS or TFTP to download + * the boot file. + */ +void net_auto_load(void); + +/* + * The following functions are a bit ugly, but necessary to deal with + * alignment restrictions on ARM. + * + * We're using inline functions, which had the smallest memory + * footprint in our tests. + */ +/* return IP *in network byteorder* */ +static inline struct in_addr net_read_ip(void *from) +{ + struct in_addr ip; + + memcpy((void *)&ip, (void *)from, sizeof(ip)); + return ip; +} + +/* return ulong *in network byteorder* */ +static inline u32 net_read_u32(void *from) +{ + u32 l; + + memcpy((void *)&l, (void *)from, sizeof(l)); + return l; +} + +/* write IP *in network byteorder* */ +static inline void net_write_ip(void *to, struct in_addr ip) +{ + memcpy(to, (void *)&ip, sizeof(ip)); +} + +/* copy IP */ +static inline void net_copy_ip(void *to, void *from) +{ + memcpy((void *)to, from, sizeof(struct in_addr)); +} + +/* copy ulong */ +static inline void net_copy_u32(void *to, void *from) +{ + memcpy((void *)to, (void *)from, sizeof(u32)); +} + +/* Convert an IP address to a string */ +void ip_to_string(struct in_addr x, char *s); + +/** + * string_to_ip() - Convert a string to ip address + * + * Implemented in lib/net_utils.c (built unconditionally) + * + * @s: Input string to parse + * @return: in_addr struct containing the parsed IP address + */ +struct in_addr string_to_ip(const char *s); + +/* Convert a VLAN id to a string */ +void vlan_to_string(ushort x, char *s); + +/* Convert a string to a vlan id */ +ushort string_to_vlan(const char *s); + +/* read a VLAN id from an environment variable */ +ushort env_get_vlan(char *); + +/* check if serverip is specified in filename from the command line */ +int is_serverip_in_cmd(void); + +/** + * net_parse_bootfile - Parse the bootfile env var / cmd line param + * + * @param ipaddr - a pointer to the ipaddr to populate if included in bootfile + * @param filename - a pointer to the string to save the filename part + * @param max_len - The longest - 1 that the filename part can be + * + * return 1 if parsed, 0 if bootfile is empty + */ +int net_parse_bootfile(struct in_addr *ipaddr, char *filename, int max_len); + +#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +/** + * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs + * + * These get in the way of bootstd testing, so are normally disabled by tests. + * This provide control of this setting. It only affects binding of Ethernet + * devices, so if that has already happened, this flag does nothing. + * + * @enable: true to enable binding of bootdevs when binding new Ethernet + * devices, false to disable it + */ +void eth_set_enable_bootdevs(bool enable); +#else +static inline void eth_set_enable_bootdevs(bool enable) {} +#endif + +#endif /* __NET_LEGACY_H__ */ diff --git a/include/net-lwip.h b/include/net-lwip.h new file mode 100644 index 00000000000..5c3f9e7e86c --- /dev/null +++ b/include/net-lwip.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __NET_LWIP_H__ +#define __NET_LWIP_H__ + +#include +#include + +struct netif *net_lwip_new_netif(struct udevice *udev); +struct netif *net_lwip_new_netif_noip(struct udevice *udev); +void net_lwip_remove_netif(struct netif *netif); +struct netif *net_lwip_get_netif(void); + +#endif /* __NET_LWIP_H__ */ diff --git a/include/net.h b/include/net.h index bb2ae20f52a..afa46f239ee 100644 --- a/include/net.h +++ b/include/net.h @@ -1,949 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/* - * LiMon Monitor (LiMon) - Network. - * - * Copyright 1994 - 2000 Neil Russell. - * (See License) - * - * History - * 9/16/00 bor adapted to TQM823L/STK8xxL board, RARP/TFTP boot added - */ #ifndef __NET_H__ #define __NET_H__ -#include -#include -#include /* for nton* / ntoh* stuff */ -#include -#include -#include -#include -#include -#include +#include -struct bd_info; -struct cmd_tbl; -struct udevice; - -#define DEBUG_LL_STATE 0 /* Link local state machine changes */ -#define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */ -#define DEBUG_NET_PKT 0 /* Packets on info on the network at large */ -#define DEBUG_INT_STATE 0 /* Internal network state changes */ -#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */ - -/* - * The number of receive packet buffers, and the required packet buffer - * alignment in memory. - * - */ -#define PKTBUFSRX CONFIG_SYS_RX_ETH_BUFFER -#define PKTALIGN ARCH_DMA_MINALIGN - -/* Number of packets processed together */ -#define ETH_PACKETS_BATCH_RECV 32 - -/* ARP hardware address length */ -#define ARP_HLEN 6 -/* - * The size of a MAC address in string form, each digit requires two chars - * and five separator characters to form '00:00:00:00:00:00'. - */ -#define ARP_HLEN_ASCII (ARP_HLEN * 2) + (ARP_HLEN - 1) - -/* IPv4 addresses are always 32 bits in size */ -struct in_addr { - __be32 s_addr; -}; - -/** - * do_tftpb - Run the tftpboot command - * - * @cmdtp: Command information for tftpboot - * @flag: Command flags (CMD_FLAG_...) - * @argc: Number of arguments - * @argv: List of arguments - * Return: result (see enum command_ret_t) - */ -int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); - -/** - * dhcp_run() - Run DHCP on the current ethernet device - * - * This sets the autoload variable, then puts it back to similar to its original - * state (y, n or unset). - * - * @addr: Address to load the file into (0 if @autoload is false) - * @fname: Filename of file to load (NULL if @autoload is false or to use the - * default filename) - * @autoload: true to load the file, false to just get the network IP - * @return 0 if OK, -EINVAL if the environment failed, -ENOENT if ant file was - * not found - */ -int dhcp_run(ulong addr, const char *fname, bool autoload); - -/** - * An incoming packet handler. - * @param pkt pointer to the application packet - * @param dport destination UDP port - * @param sip source IP address - * @param sport source UDP port - * @param len packet length - */ -typedef void rxhand_f(uchar *pkt, unsigned dport, - struct in_addr sip, unsigned sport, - unsigned len); - -/** - * An incoming ICMP packet handler. - * @param type ICMP type - * @param code ICMP code - * @param dport destination UDP port - * @param sip source IP address - * @param sport source UDP port - * @param pkt pointer to the ICMP packet data - * @param len packet length - */ -typedef void rxhand_icmp_f(unsigned type, unsigned code, unsigned dport, - struct in_addr sip, unsigned sport, uchar *pkt, unsigned len); - -/* - * A timeout handler. Called after time interval has expired. - */ -typedef void thand_f(void); - -enum eth_state_t { - ETH_STATE_INIT, - ETH_STATE_PASSIVE, - ETH_STATE_ACTIVE -}; - -/** - * struct eth_pdata - Platform data for Ethernet MAC controllers - * - * @iobase: The base address of the hardware registers - * @enetaddr: The Ethernet MAC address that is loaded from EEPROM or env - * @phy_interface: PHY interface to use - see PHY_INTERFACE_MODE_... - * @max_speed: Maximum speed of Ethernet connection supported by MAC - * @priv_pdata: device specific plat - */ -struct eth_pdata { - phys_addr_t iobase; - unsigned char enetaddr[ARP_HLEN]; - int phy_interface; - int max_speed; - void *priv_pdata; -}; - -enum eth_recv_flags { - /* - * Check hardware device for new packets (otherwise only return those - * which are already in the memory buffer ready to process) - */ - ETH_RECV_CHECK_DEVICE = 1 << 0, -}; - -/** - * struct eth_ops - functions of Ethernet MAC controllers - * - * start: Prepare the hardware to send and receive packets - * send: Send the bytes passed in "packet" as a packet on the wire - * recv: Check if the hardware received a packet. If so, set the pointer to the - * packet buffer in the packetp parameter. If not, return an error or 0 to - * indicate that the hardware receive FIFO is empty. If 0 is returned, the - * network stack will not process the empty packet, but free_pkt() will be - * called if supplied - * free_pkt: Give the driver an opportunity to manage its packet buffer memory - * when the network stack is finished processing it. This will only be - * called when no error was returned from recv - optional - * stop: Stop the hardware from looking for packets - may be called even if - * state == PASSIVE - * mcast: Join or leave a multicast group (for TFTP) - optional - * write_hwaddr: Write a MAC address to the hardware (used to pass it to Linux - * on some platforms like ARM). This function expects the - * eth_pdata::enetaddr field to be populated. The method can - * return -ENOSYS to indicate that this is not implemented for - this hardware - optional. - * read_rom_hwaddr: Some devices have a backup of the MAC address stored in a - * ROM on the board. This is how the driver should expose it - * to the network stack. This function should fill in the - * eth_pdata::enetaddr field - optional - * set_promisc: Enable or Disable promiscuous mode - * get_sset_count: Number of statistics counters - * get_string: Names of the statistic counters - * get_stats: The values of the statistic counters - */ -struct eth_ops { - int (*start)(struct udevice *dev); - int (*send)(struct udevice *dev, void *packet, int length); - int (*recv)(struct udevice *dev, int flags, uchar **packetp); - int (*free_pkt)(struct udevice *dev, uchar *packet, int length); - void (*stop)(struct udevice *dev); - int (*mcast)(struct udevice *dev, const u8 *enetaddr, int join); - int (*write_hwaddr)(struct udevice *dev); - int (*read_rom_hwaddr)(struct udevice *dev); - int (*set_promisc)(struct udevice *dev, bool enable); - int (*get_sset_count)(struct udevice *dev); - void (*get_strings)(struct udevice *dev, u8 *data); - void (*get_stats)(struct udevice *dev, u64 *data); -}; - -#define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops) - -struct udevice *eth_get_dev(void); /* get the current device */ -/* - * The devname can be either an exact name given by the driver or device tree - * or it can be an alias of the form "eth%d" - */ -struct udevice *eth_get_dev_by_name(const char *devname); -unsigned char *eth_get_ethaddr(void); /* get the current device MAC */ - -/* Used only when NetConsole is enabled */ -int eth_is_active(struct udevice *dev); /* Test device for active state */ -int eth_init_state_only(void); /* Set active state */ -void eth_halt_state_only(void); /* Set passive state */ - -int eth_initialize(void); /* Initialize network subsystem */ -void eth_try_another(int first_restart); /* Change the device */ -void eth_set_current(void); /* set nterface to ethcur var */ - -int eth_get_dev_index(void); /* get the device index */ - -/** - * eth_env_set_enetaddr_by_index() - set the MAC address environment variable - * - * This sets up an environment variable with the given MAC address (@enetaddr). - * The environment variable to be set is defined by <@base_name><@index>addr. - * If @index is 0 it is omitted. For common Ethernet this means ethaddr, - * eth1addr, etc. - * - * @base_name: Base name for variable, typically "eth" - * @index: Index of interface being updated (>=0) - * @enetaddr: Pointer to MAC address to put into the variable - * Return: 0 if OK, other value on error - */ -int eth_env_set_enetaddr_by_index(const char *base_name, int index, - uchar *enetaddr); - -/* - * Initialize USB ethernet device with CONFIG_DM_ETH - * Returns: - * 0 is success, non-zero is error status. - */ -int usb_ether_init(void); - -/* - * Get the hardware address for an ethernet interface . - * Args: - * base_name - base name for device (normally "eth") - * index - device index number (0 for first) - * enetaddr - returns 6 byte hardware address - * Returns: - * Return true if the address is valid. - */ -int eth_env_get_enetaddr_by_index(const char *base_name, int index, - uchar *enetaddr); - -int eth_init(void); /* Initialize the device */ -int eth_send(void *packet, int length); /* Send a packet */ - -#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) -int eth_receive(void *packet, int length); /* Receive a packet*/ -extern void (*push_packet)(void *packet, int length); -#endif -int eth_rx(void); /* Check for received packets */ -void eth_halt(void); /* stop SCC */ -const char *eth_get_name(void); /* get name of current device */ -int eth_mcast_join(struct in_addr mcast_addr, int join); - -/**********************************************************************/ -/* - * Protocol headers. - */ - -/* - * Ethernet header - */ - -struct ethernet_hdr { - u8 et_dest[ARP_HLEN]; /* Destination node */ - u8 et_src[ARP_HLEN]; /* Source node */ - u16 et_protlen; /* Protocol or length */ -} __attribute__((packed)); - -/* Ethernet header size */ -#define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr)) - -#define ETH_FCS_LEN 4 /* Octets in the FCS */ - -struct e802_hdr { - u8 et_dest[ARP_HLEN]; /* Destination node */ - u8 et_src[ARP_HLEN]; /* Source node */ - u16 et_protlen; /* Protocol or length */ - u8 et_dsap; /* 802 DSAP */ - u8 et_ssap; /* 802 SSAP */ - u8 et_ctl; /* 802 control */ - u8 et_snap1; /* SNAP */ - u8 et_snap2; - u8 et_snap3; - u16 et_prot; /* 802 protocol */ -} __attribute__((packed)); - -/* 802 + SNAP + ethernet header size */ -#define E802_HDR_SIZE (sizeof(struct e802_hdr)) - -/* - * Virtual LAN Ethernet header - */ -struct vlan_ethernet_hdr { - u8 vet_dest[ARP_HLEN]; /* Destination node */ - u8 vet_src[ARP_HLEN]; /* Source node */ - u16 vet_vlan_type; /* PROT_VLAN */ - u16 vet_tag; /* TAG of VLAN */ - u16 vet_type; /* protocol type */ -} __attribute__((packed)); - -/* VLAN Ethernet header size */ -#define VLAN_ETHER_HDR_SIZE (sizeof(struct vlan_ethernet_hdr)) - -#define PROT_IP 0x0800 /* IP protocol */ -#define PROT_ARP 0x0806 /* IP ARP protocol */ -#define PROT_WOL 0x0842 /* ether-wake WoL protocol */ -#define PROT_RARP 0x8035 /* IP ARP protocol */ -#define PROT_VLAN 0x8100 /* IEEE 802.1q protocol */ -#define PROT_IPV6 0x86dd /* IPv6 over bluebook */ -#define PROT_PPP_SES 0x8864 /* PPPoE session messages */ -#define PROT_NCSI 0x88f8 /* NC-SI control packets */ - -#define IPPROTO_ICMP 1 /* Internet Control Message Protocol */ -#define IPPROTO_TCP 6 /* Transmission Control Protocol */ -#define IPPROTO_UDP 17 /* User Datagram Protocol */ - -/* - * Internet Protocol (IP) header. - */ -struct ip_hdr { - u8 ip_hl_v; /* header length and version */ - u8 ip_tos; /* type of service */ - u16 ip_len; /* total length */ - u16 ip_id; /* identification */ - u16 ip_off; /* fragment offset field */ - u8 ip_ttl; /* time to live */ - u8 ip_p; /* protocol */ - u16 ip_sum; /* checksum */ - struct in_addr ip_src; /* Source IP address */ - struct in_addr ip_dst; /* Destination IP address */ -} __attribute__((packed)); - -#define IP_OFFS 0x1fff /* ip offset *= 8 */ -#define IP_FLAGS 0xe000 /* first 3 bits */ -#define IP_FLAGS_RES 0x8000 /* reserved */ -#define IP_FLAGS_DFRAG 0x4000 /* don't fragments */ -#define IP_FLAGS_MFRAG 0x2000 /* more fragments */ - -#define IP_HDR_SIZE (sizeof(struct ip_hdr)) - -#define IP_MIN_FRAG_DATAGRAM_SIZE (IP_HDR_SIZE + 8) - -/* - * Internet Protocol (IP) + UDP header. - */ -struct ip_udp_hdr { - u8 ip_hl_v; /* header length and version */ - u8 ip_tos; /* type of service */ - u16 ip_len; /* total length */ - u16 ip_id; /* identification */ - u16 ip_off; /* fragment offset field */ - u8 ip_ttl; /* time to live */ - u8 ip_p; /* protocol */ - u16 ip_sum; /* checksum */ - struct in_addr ip_src; /* Source IP address */ - struct in_addr ip_dst; /* Destination IP address */ - u16 udp_src; /* UDP source port */ - u16 udp_dst; /* UDP destination port */ - u16 udp_len; /* Length of UDP packet */ - u16 udp_xsum; /* Checksum */ -} __attribute__((packed)); - -#define IP_UDP_HDR_SIZE (sizeof(struct ip_udp_hdr)) -#define UDP_HDR_SIZE (IP_UDP_HDR_SIZE - IP_HDR_SIZE) - -/* - * Address Resolution Protocol (ARP) header. - */ -struct arp_hdr { - u16 ar_hrd; /* Format of hardware address */ -# define ARP_ETHER 1 /* Ethernet hardware address */ - u16 ar_pro; /* Format of protocol address */ - u8 ar_hln; /* Length of hardware address */ - u8 ar_pln; /* Length of protocol address */ -# define ARP_PLEN 4 - u16 ar_op; /* Operation */ -# define ARPOP_REQUEST 1 /* Request to resolve address */ -# define ARPOP_REPLY 2 /* Response to previous request */ - -# define RARPOP_REQUEST 3 /* Request to resolve address */ -# define RARPOP_REPLY 4 /* Response to previous request */ - - /* - * The remaining fields are variable in size, according to - * the sizes above, and are defined as appropriate for - * specific hardware/protocol combinations. - */ - u8 ar_data[0]; -#define ar_sha ar_data[0] -#define ar_spa ar_data[ARP_HLEN] -#define ar_tha ar_data[ARP_HLEN + ARP_PLEN] -#define ar_tpa ar_data[ARP_HLEN + ARP_PLEN + ARP_HLEN] -#if 0 - u8 ar_sha[]; /* Sender hardware address */ - u8 ar_spa[]; /* Sender protocol address */ - u8 ar_tha[]; /* Target hardware address */ - u8 ar_tpa[]; /* Target protocol address */ -#endif /* 0 */ -} __attribute__((packed)); - -#define ARP_HDR_SIZE (8+20) /* Size assuming ethernet */ - -/* - * ICMP stuff (just enough to handle (host) redirect messages) - */ -#define ICMP_ECHO_REPLY 0 /* Echo reply */ -#define ICMP_NOT_REACH 3 /* Detination unreachable */ -#define ICMP_REDIRECT 5 /* Redirect (change route) */ -#define ICMP_ECHO_REQUEST 8 /* Echo request */ - -/* Codes for REDIRECT. */ -#define ICMP_REDIR_NET 0 /* Redirect Net */ -#define ICMP_REDIR_HOST 1 /* Redirect Host */ - -/* Codes for NOT_REACH */ -#define ICMP_NOT_REACH_PORT 3 /* Port unreachable */ - -struct icmp_hdr { - u8 type; - u8 code; - u16 checksum; - union { - struct { - u16 id; - u16 sequence; - } echo; - u32 gateway; - struct { - u16 unused; - u16 mtu; - } frag; - u8 data[0]; - } un; -} __attribute__((packed)); - -#define ICMP_HDR_SIZE (sizeof(struct icmp_hdr)) -#define IP_ICMP_HDR_SIZE (IP_HDR_SIZE + ICMP_HDR_SIZE) - -/* - * Maximum packet size; used to allocate packet storage. Use - * the maxium Ethernet frame size as specified by the Ethernet - * standard including the 802.1Q tag (VLAN tagging). - * maximum packet size = 1522 - * maximum packet size and multiple of 32 bytes = 1536 - */ -#define PKTSIZE 1522 -#ifndef CONFIG_DM_DSA -#define PKTSIZE_ALIGN 1536 +#if defined(CONFIG_NET_LWIP) +#include #else -/* Maximum DSA tagging overhead (headroom and/or tailroom) */ -#define DSA_MAX_OVR 256 -#define PKTSIZE_ALIGN (1536 + DSA_MAX_OVR) -#endif - -/* - * Maximum receive ring size; that is, the number of packets - * we can buffer before overflow happens. Basically, this just - * needs to be enough to prevent a packet being discarded while - * we are processing the previous one. - */ -#define RINGSZ 4 -#define RINGSZ_LOG2 2 - -/**********************************************************************/ -/* - * Globals. - * - * Note: - * - * All variables of type struct in_addr are stored in NETWORK byte order - * (big endian). - */ - -/* net.c */ -/** BOOTP EXTENTIONS **/ -extern struct in_addr net_gateway; /* Our gateway IP address */ -extern struct in_addr net_netmask; /* Our subnet mask (0 = unknown) */ -/* Our Domain Name Server (0 = unknown) */ -extern struct in_addr net_dns_server; -#if defined(CONFIG_BOOTP_DNS2) -/* Our 2nd Domain Name Server (0 = unknown) */ -extern struct in_addr net_dns_server2; +#include #endif -extern char net_nis_domain[32]; /* Our IS domain */ -extern char net_hostname[32]; /* Our hostname */ -#ifdef CONFIG_NET -extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */ -#endif -/* Indicates whether the pxe path prefix / config file was specified in dhcp option */ -extern char *pxelinux_configfile; -/** END OF BOOTP EXTENTIONS **/ -extern u8 net_ethaddr[ARP_HLEN]; /* Our ethernet address */ -extern u8 net_server_ethaddr[ARP_HLEN]; /* Boot server enet address */ -extern struct in_addr net_ip; /* Our IP addr (0 = unknown) */ -extern struct in_addr net_server_ip; /* Server IP addr (0 = unknown) */ -extern uchar *net_tx_packet; /* THE transmit packet */ -extern uchar *net_rx_packets[PKTBUFSRX]; /* Receive packets */ -extern uchar *net_rx_packet; /* Current receive packet */ -extern int net_rx_packet_len; /* Current rx packet length */ -extern const u8 net_bcast_ethaddr[ARP_HLEN]; /* Ethernet broadcast address */ -extern const u8 net_null_ethaddr[ARP_HLEN]; - -#define VLAN_NONE 4095 /* untagged */ -#define VLAN_IDMASK 0x0fff /* mask of valid vlan id */ -extern ushort net_our_vlan; /* Our VLAN */ -extern ushort net_native_vlan; /* Our Native VLAN */ - -extern int net_restart_wrap; /* Tried all network devices */ - -enum proto_t { - BOOTP, RARP, ARP, TFTPGET, DHCP, DHCP6, PING, PING6, DNS, NFS, CDP, - NETCONS, SNTP, TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT_UDP, FASTBOOT_TCP, - WOL, UDP, NCSI, WGET, RS -}; - -extern char net_boot_file_name[1024];/* Boot File name */ -/* Indicates whether the file name was specified on the command line */ -extern bool net_boot_file_name_explicit; -/* The actual transferred size of the bootfile (in bytes) */ -extern u32 net_boot_file_size; -/* Boot file size in blocks as reported by the DHCP server */ -extern u32 net_boot_file_expected_size_in_blocks; - -#if defined(CONFIG_CMD_DNS) -extern char *net_dns_resolve; /* The host to resolve */ -extern char *net_dns_env_var; /* the env var to put the ip into */ -#endif - -#if defined(CONFIG_CMD_PING) -extern struct in_addr net_ping_ip; /* the ip address to ping */ -#endif - -#if defined(CONFIG_CMD_CDP) -/* when CDP completes these hold the return values */ -extern ushort cdp_native_vlan; /* CDP returned native VLAN */ -extern ushort cdp_appliance_vlan; /* CDP returned appliance VLAN */ - -/* - * Check for a CDP packet by examining the received MAC address field - */ -static inline int is_cdp_packet(const uchar *ethaddr) -{ - extern const u8 net_cdp_ethaddr[ARP_HLEN]; - - return memcmp(ethaddr, net_cdp_ethaddr, ARP_HLEN) == 0; -} -#endif - -#if defined(CONFIG_CMD_SNTP) -extern struct in_addr net_ntp_server; /* the ip address to NTP */ -extern int net_ntp_time_offset; /* offset time from UTC */ -#endif - -/* Initialize the network adapter */ -int net_init(void); -int net_loop(enum proto_t); - -/* Load failed. Start again. */ -int net_start_again(void); - -/* Get size of the ethernet header when we send */ -int net_eth_hdr_size(void); - -/* Set ethernet header; returns the size of the header */ -int net_set_ether(uchar *xet, const uchar *dest_ethaddr, uint prot); -int net_update_ether(struct ethernet_hdr *et, uchar *addr, uint prot); - -/* Set IP header */ -void net_set_ip_header(uchar *pkt, struct in_addr dest, struct in_addr source, - u16 pkt_len, u8 proto); -void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, - int sport, int len); - -/** - * compute_ip_checksum() - Compute IP checksum - * - * @addr: Address to check (must be 16-bit aligned) - * @nbytes: Number of bytes to check (normally a multiple of 2) - * Return: 16-bit IP checksum - */ -unsigned compute_ip_checksum(const void *addr, unsigned nbytes); - -/** - * add_ip_checksums() - add two IP checksums - * - * @offset: Offset of first sum (if odd we do a byte-swap) - * @sum: First checksum - * @new_sum: New checksum to add - * Return: updated 16-bit IP checksum - */ -unsigned add_ip_checksums(unsigned offset, unsigned sum, unsigned new_sum); - -/** - * ip_checksum_ok() - check if a checksum is correct - * - * This works by making sure the checksum sums to 0 - * - * @addr: Address to check (must be 16-bit aligned) - * @nbytes: Number of bytes to check (normally a multiple of 2) - * Return: true if the checksum matches, false if not - */ -int ip_checksum_ok(const void *addr, unsigned nbytes); - -/* Callbacks */ -rxhand_f *net_get_udp_handler(void); /* Get UDP RX packet handler */ -void net_set_udp_handler(rxhand_f *); /* Set UDP RX packet handler */ -rxhand_f *net_get_arp_handler(void); /* Get ARP RX packet handler */ -void net_set_arp_handler(rxhand_f *); /* Set ARP RX packet handler */ -bool arp_is_waiting(void); /* Waiting for ARP reply? */ -void net_set_icmp_handler(rxhand_icmp_f *f); /* Set ICMP RX handler */ -void net_set_timeout_handler(ulong, thand_f *);/* Set timeout handler */ - -/* Network loop state */ -enum net_loop_state { - NETLOOP_CONTINUE, - NETLOOP_RESTART, - NETLOOP_SUCCESS, - NETLOOP_FAIL -}; -extern enum net_loop_state net_state; - -static inline void net_set_state(enum net_loop_state state) -{ - debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state); - net_state = state; -} - -/* - * net_get_async_tx_pkt_buf - Get a packet buffer that is not in use for - * sending an asynchronous reply - * - * returns - ptr to packet buffer - */ -uchar * net_get_async_tx_pkt_buf(void); - -/* Transmit a packet */ -static inline void net_send_packet(uchar *pkt, int len) -{ - if (DEBUG_NET_PKT_TRACE) - print_hex_dump_bytes("tx: ", DUMP_PREFIX_OFFSET, pkt, len); - /* Currently no way to return errors from eth_send() */ - (void) eth_send(pkt, len); -} - -/** - * net_send_ip_packet() - Transmit "net_tx_packet" as UDP or TCP packet, - * send ARP request if needed (ether will be populated) - * @ether: Raw packet buffer - * @dest: IP address to send the datagram to - * @dport: Destination UDP port - * @sport: Source UDP port - * @payload_len: Length of data after the UDP header - * @action: TCP action to be performed - * @tcp_seq_num: TCP sequence number of this transmission - * @tcp_ack_num: TCP stream acknolegement number - * - * Return: 0 on success, other value on failure - */ -int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport, - int payload_len, int proto, u8 action, u32 tcp_seq_num, - u32 tcp_ack_num); -/** - * net_send_tcp_packet() - Transmit TCP packet. - * @payload_len: length of payload - * @dport: Destination TCP port - * @sport: Source TCP port - * @action: TCP action to be performed - * @tcp_seq_num: TCP sequence number of this transmission - * @tcp_ack_num: TCP stream acknolegement number - * - * Return: 0 on success, other value on failure - */ -int net_send_tcp_packet(int payload_len, int dport, int sport, u8 action, - u32 tcp_seq_num, u32 tcp_ack_num); -int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, - int sport, int payload_len); - -/* Processes a received packet */ -void net_process_received_packet(uchar *in_packet, int len); - -#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) -void nc_start(void); -int nc_input_packet(uchar *pkt, struct in_addr src_ip, unsigned dest_port, - unsigned src_port, unsigned len); -#endif - -static __always_inline int eth_is_on_demand_init(void) -{ -#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) - extern enum proto_t net_loop_last_protocol; - - return net_loop_last_protocol != NETCONS; -#else - return 1; -#endif -} - -static inline void eth_set_last_protocol(int protocol) -{ -#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) - extern enum proto_t net_loop_last_protocol; - - net_loop_last_protocol = protocol; -#endif -} - -/* - * Check if autoload is enabled. If so, use either NFS or TFTP to download - * the boot file. - */ -void net_auto_load(void); - -/* - * The following functions are a bit ugly, but necessary to deal with - * alignment restrictions on ARM. - * - * We're using inline functions, which had the smallest memory - * footprint in our tests. - */ -/* return IP *in network byteorder* */ -static inline struct in_addr net_read_ip(void *from) -{ - struct in_addr ip; - - memcpy((void *)&ip, (void *)from, sizeof(ip)); - return ip; -} - -/* return ulong *in network byteorder* */ -static inline u32 net_read_u32(void *from) -{ - u32 l; - - memcpy((void *)&l, (void *)from, sizeof(l)); - return l; -} - -/* write IP *in network byteorder* */ -static inline void net_write_ip(void *to, struct in_addr ip) -{ - memcpy(to, (void *)&ip, sizeof(ip)); -} - -/* copy IP */ -static inline void net_copy_ip(void *to, void *from) -{ - memcpy((void *)to, from, sizeof(struct in_addr)); -} - -/* copy ulong */ -static inline void net_copy_u32(void *to, void *from) -{ - memcpy((void *)to, (void *)from, sizeof(u32)); -} - -/** - * is_zero_ethaddr - Determine if give Ethernet address is all zeros. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is all zeroes. - */ -static inline int is_zero_ethaddr(const u8 *addr) -{ - return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); -} - -/** - * is_multicast_ethaddr - Determine if the Ethernet address is a multicast. - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is a multicast address. - * By definition the broadcast address is also a multicast address. - */ -static inline int is_multicast_ethaddr(const u8 *addr) -{ - return 0x01 & addr[0]; -} - -/* - * is_broadcast_ethaddr - Determine if the Ethernet address is broadcast - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Return true if the address is the broadcast address. - */ -static inline int is_broadcast_ethaddr(const u8 *addr) -{ - return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == - 0xff; -} - -/* - * is_valid_ethaddr - Determine if the given Ethernet address is valid - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not - * a multicast address, and is not FF:FF:FF:FF:FF:FF. - * - * Return true if the address is valid. - */ -static inline int is_valid_ethaddr(const u8 *addr) -{ - /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to - * explicitly check for it here. */ - return !is_multicast_ethaddr(addr) && !is_zero_ethaddr(addr); -} - -/** - * net_random_ethaddr - Generate software assigned random Ethernet address - * @addr: Pointer to a six-byte array containing the Ethernet address - * - * Generate a random Ethernet address (MAC) that is not multicast - * and has the local assigned bit set. - */ -static inline void net_random_ethaddr(uchar *addr) -{ - int i; - unsigned int seed = get_ticks(); - - for (i = 0; i < 6; i++) - addr[i] = rand_r(&seed); - - addr[0] &= 0xfe; /* clear multicast bit */ - addr[0] |= 0x02; /* set local assignment bit (IEEE802) */ -} - -/** - * string_to_enetaddr() - Parse a MAC address - * - * Convert a string MAC address - * - * Implemented in lib/net_utils.c (built unconditionally) - * - * @addr: MAC address in aa:bb:cc:dd:ee:ff format, where each part is a 2-digit - * hex value - * @enetaddr: Place to put MAC address (6 bytes) - */ -void string_to_enetaddr(const char *addr, uint8_t *enetaddr); - -/* Convert an IP address to a string */ -void ip_to_string(struct in_addr x, char *s); - -/** - * string_to_ip() - Convert a string to ip address - * - * Implemented in lib/net_utils.c (built unconditionally) - * - * @s: Input string to parse - * @return: in_addr struct containing the parsed IP address - */ -struct in_addr string_to_ip(const char *s); - -/* Convert a VLAN id to a string */ -void vlan_to_string(ushort x, char *s); - -/* Convert a string to a vlan id */ -ushort string_to_vlan(const char *s); - -/* read a VLAN id from an environment variable */ -ushort env_get_vlan(char *); - -/* copy a filename (allow for "..." notation, limit length) */ -void copy_filename(char *dst, const char *src, int size); - -/* check if serverip is specified in filename from the command line */ -int is_serverip_in_cmd(void); - -/** - * net_parse_bootfile - Parse the bootfile env var / cmd line param - * - * @param ipaddr - a pointer to the ipaddr to populate if included in bootfile - * @param filename - a pointer to the string to save the filename part - * @param max_len - The longest - 1 that the filename part can be - * - * return 1 if parsed, 0 if bootfile is empty - */ -int net_parse_bootfile(struct in_addr *ipaddr, char *filename, int max_len); - -/** - * update_tftp - Update firmware over TFTP (via DFU) - * - * This function updates board's firmware via TFTP - * - * @param addr - memory address where data is stored - * @param interface - the DFU medium name - e.g. "mmc" - * @param devstring - the DFU medium number - e.g. "1" - * - * Return: - 0 on success, other value on failure - */ -int update_tftp(ulong addr, char *interface, char *devstring); - -/** - * env_get_ip() - Convert an environment value to to an ip address - * - * @var: Environment variable to convert. The value of this variable must be - * in the format format a.b.c.d, where each value is a decimal number from - * 0 to 255 - * Return: IP address, or 0 if invalid - */ -static inline struct in_addr env_get_ip(char *var) -{ - return string_to_ip(env_get(var)); -} - -/** - * reset_phy() - Reset the Ethernet PHY - * - * This should be implemented by boards if CONFIG_RESET_PHY_R is enabled - */ -void reset_phy(void); - -#if CONFIG_IS_ENABLED(NET) -/** - * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs - * - * These get in the way of bootstd testing, so are normally disabled by tests. - * This provide control of this setting. It only affects binding of Ethernet - * devices, so if that has already happened, this flag does nothing. - * - * @enable: true to enable binding of bootdevs when binding new Ethernet - * devices, false to disable it - */ -void eth_set_enable_bootdevs(bool enable); -#else -static inline void eth_set_enable_bootdevs(bool enable) {} -#endif - -/** - * wget_with_dns() - runs dns host IP address resulution before wget - * - * @dst_addr: destination address to download the file - * @uri: uri string of target file of wget - * Return: downloaded file size, negative if failed - */ -int wget_with_dns(ulong dst_addr, char *uri); - -/** - * wget_validate_uri() - varidate the uri - * - * @uri: uri string of target file of wget - * Return: true if uri is valid, false if uri is invalid - */ -bool wget_validate_uri(char *uri); #endif /* __NET_H__ */ From patchwork Fri Aug 23 13:48:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821719 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387135wrh; Fri, 23 Aug 2024 06:51:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWZOxJTt8MOjrxFkoDk4GPBdwcmpypR8tyq35Iyl6m6NR7u99K5AP9uB2hWEV3Eb76y0MPzWg==@linaro.org X-Google-Smtp-Source: AGHT+IGzbXfgZrwFdX1doZidMFWtzQtQps0swTNqQ53QFZIGCyOmjap//8zADQmFJaos9njS0T9E X-Received: by 2002:a05:600c:3b89:b0:426:614b:1a72 with SMTP id 5b1f17b1804b1-42acc8e1392mr18593005e9.17.1724421099585; Fri, 23 Aug 2024 06:51:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421099; cv=none; d=google.com; s=arc-20240605; b=e+n+HotX41icZKLEKqYEw2U1iUTBNk6baUxLw8GTxgIUMBiX+cUfY0T4KEomzxdB2W pBSg3GDrpBU5aCreCFdrzPmQARyiq3/X0Zc+8x7+FH3YXO+at5Bz0SjRjeKb1wjHVDHY yb/SySHbnZGSMgQff78C7cgVNw6pa9HnFayt3tTuCkH8wy6ofBOEG9jXFOGi7/44k50p 5qt1KCqMIEbDgxbUtxg8WVbDd0GhHRp5zfprPd6bncY5G8swXDeYOFE4HrJBdbGeKsUu LXd8955lMy0ESk24AKIBPe9TxGW4wRTzXMkXzpTKogtUZPv9EOGDOpbQFbnIUPB7RXgC aNeA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XGz4U07JuHZb2y5jdBfc47mDP3MalPOz9Wfd8t01x2U=; fh=fsulFODMEPEOSLpWO3BriWzWBQgd8jC14ZsfD2Wjjn4=; b=WadtWo2E/2HnTVGYMCtp3ozytbt4VoREfMlyzEKWKDojXrvubV051w5oUesRkJjGed rf9BVyFP1qDnrEQKiSGoVLs+sN8QMBvHBZV+GU0JX/tgg1PO+mMvsxJoh7JW4lVghD/f bx4g5X+umGtUZ2ARcjE/k0nQB/9iWv8IHSsyPI6HiBuDU7smm4kezzmdaYdfnEDGQN2G ieDJR4KH1tfKMg0H5vI0DS+ndGNynRlEXq83qM8JobhfhjvgIwrxxtgroI3Acyhj1yKm 8cp8kDIQwHbGuDDPQkSXrCEu8gqDbfhOliWSJLyMKeaXkopTnwdiuRqH18P+eCmi4Sgf hGlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xuGbDqVM; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42ac517ab27si18811935e9.141.2024.08.23.06.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:51:39 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xuGbDqVM; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 6EB5B888F0; Fri, 23 Aug 2024 15:49:49 +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="xuGbDqVM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6F77F88A0E; Fri, 23 Aug 2024 15:49:48 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 8D1D488A0E for ; Fri, 23 Aug 2024 15:49:46 +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-x332.google.com with SMTP id 5b1f17b1804b1-428101fa30aso16371885e9.3 for ; Fri, 23 Aug 2024 06:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420986; x=1725025786; 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=XGz4U07JuHZb2y5jdBfc47mDP3MalPOz9Wfd8t01x2U=; b=xuGbDqVMjThGDaTaMnb2VGE2x9hUZAvuTe/4zK56YAwipObO2UcZCqb/MFYcxtHQOZ p4BI+OR2oiVlniAQeYdnh0fQw5dOi8vYEc2VDHQPM0GxF1B5g13q7SXjeQ/ztJXhZAMJ TX8T9FHkBAV8lk3TzlluSRJdCzYwzP2Q7elMl5MahUPMMxWYycXYFUdkfToU0/rOhWrL TGQ4gBgSQHlHCov4PVS5U3eOWPZ96Rwv7gZ4nHNpiMsel1k4xqtd6pp5YFRYNxR6CHs0 Nr2HujsvOGpZSbgeyS3xeCqUPqDRdYNJVFMnWGrz9mObDB8jA66YekVFhN5Dff3r6Zl1 IFnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420986; x=1725025786; 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=XGz4U07JuHZb2y5jdBfc47mDP3MalPOz9Wfd8t01x2U=; b=UH8cZLCWxBCHUqKPxvAplweLqCuYoAk4LmJWZ0QioitqZX/WtSd5UC2sM+xsWNUKZZ mPQLHS5PiaHCzRQipt9lAePKzvmoznLCW7sw5RvbBeNpPMNppD2oGCZBNdrgu79X4L5u Bsy0BnI3kZ/yrsoSEmSYVtJ9vN3ZwcPL7Ng7Y4L7Q3pApNElpPj9jI7ZCaQgqfqrbd6C hlgX4nw9XcQWMgI9/MvwoITEFTvfzACTWJoCWppEOBDJkhdFqk4ihYKHjZSj4X8l6Bok q97sQDCoC9WjlnFNhwLkFRbVLXeM0JVqxVip1wgTI+sNe5Gjgt8iaWLd9R7Rl5XT79k5 yrsA== X-Gm-Message-State: AOJu0YxIXA83SnqVIhJDE//qJIe8yysaDamtI+4GPmpmp49zRzO5I9CG zquiKn24eLE0xcVp5C5gdkklPadIxMzezRf0r/TcbVFdez484gmBoR0bAv77dlhIoZVCNbxwZOa Y317Z4H8c X-Received: by 2002:adf:ec12:0:b0:368:2f01:3053 with SMTP id ffacd0b85a97d-373118eeea2mr1675629f8f.55.1724420985829; Fri, 23 Aug 2024 06:49:45 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:45 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Sean Anderson , Simon Glass , Marek Vasut Subject: [PATCH v9 17/37] net: move copy_filename() to new file net/net-common.c Date: Fri, 23 Aug 2024 15:48:21 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 copy_filename() can be useful when NET_LWIP is enabled, therefore move it out of net/net.c which is built only when networking choice is NET. Signed-off-by: Jerome Forissier --- net/Makefile | 2 ++ net/net-common.c | 13 +++++++++++++ net/net.c | 12 ------------ 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 net/net-common.c diff --git a/net/Makefile b/net/Makefile index 70eec8caf0d..a9cecee637a 100644 --- a/net/Makefile +++ b/net/Makefile @@ -42,3 +42,5 @@ obj-$(CONFIG_CMD_WGET) += wget.o CFLAGS_eth_common.o += -Wno-format-extra-args endif + +obj-y += net-common.o diff --git a/net/net-common.c b/net/net-common.c new file mode 100644 index 00000000000..a7f767d5e9c --- /dev/null +++ b/net/net-common.c @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0 + +void copy_filename(char *dst, const char *src, int size) +{ + if (src && *src && (*src == '"')) { + ++src; + --size; + } + + while ((--size > 0) && src && *src && (*src != '"')) + *dst++ = *src++; + *dst = '\0'; +} diff --git a/net/net.c b/net/net.c index d9bc9df643f..32629aa80ce 100644 --- a/net/net.c +++ b/net/net.c @@ -1684,18 +1684,6 @@ void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, int sport, ip->udp_xsum = 0; } -void copy_filename(char *dst, const char *src, int size) -{ - if (src && *src && (*src == '"')) { - ++src; - --size; - } - - while ((--size > 0) && src && *src && (*src != '"')) - *dst++ = *src++; - *dst = '\0'; -} - int is_serverip_in_cmd(void) { return !!strchr(net_boot_file_name, ':'); From patchwork Fri Aug 23 13:48:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821721 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387316wrh; Fri, 23 Aug 2024 06:52:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV0Xc8T/rD6ugM9lXrWqm4emYSjaW0LdNIWy+3nqDxHtiq7KmxkJil4cLIeR5PmwN/ptPFdDw==@linaro.org X-Google-Smtp-Source: AGHT+IE7QMmvCD7VYsyWvtayF64Unyl1ZHJp4dRfhaMC9HXHml7fevpUy6YoJclpVdTwWuVp6s/P X-Received: by 2002:adf:ce88:0:b0:368:7a04:7f5b with SMTP id ffacd0b85a97d-373118d12b0mr1631366f8f.40.1724421123015; Fri, 23 Aug 2024 06:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421122; cv=none; d=google.com; s=arc-20240605; b=F6fB5JxVhinD6Lcwr5XDGtlLfepRz36d//sz7BzKW+ATJVF0hrS/8TjsaUaofBmzvo e11dcV+QxNWZaqYsfQFS0m857FFGdmfXCxmQQjXx/eqVN4PjI+XqV8qHIw4PFX2VMtZS hOo12lLvKzC2RtQCJMrtRNut8gnLfbRo4q6PoQbjvtevNA9vTswzoy1qHt2ZEnZl4Gtg BHkcybW6t7EMy5nTHPLppraeL18dzzSNztE+yybtuprYYyECBYsPc2/izcHlgDoCHGc5 GGCNQYi2kjiU+JfcQ3Bqix3+1FO3TZUCbrHqtPoC7S4EAMUK7tbmJnFvHIYgg383UWhj /SpA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ErBWxkzTdbtyE92CQBPyiy1jniNtymtJyxMnRxGL814=; fh=qgOqd34t/NweNX2uPk83x9SQNB+C8laWCY3Tu60SH2U=; b=dJ6/hLVOKzNfHTJbIHW+3BARG1iRCMo8MoyATLgLjZC9CwA8p2pg+7fMBCnqIobaoL BZ1ZMeyYqQIxRYFb3RhNiZPq3tfQIQ9Jx5qt5pAa01FZ9Vq+CPWppCY4YQk4OMR5yrcd p9RO5sZpGOqrbuEDVJi8KSDna/YVL2Hzmzxf8uGRYcYpfKQF3RuJPyaBr2mFaTp3LRFP 8tRwOvDMtW0yluXkfGiIwAjLNpgBZijpCmLEd8/wySgd2Qy/LxerBFeEXTmU5kYkbXXJ B0NbDGLwQH/NgaxniH/FTTUWIPHHt/tKoAWIPbgt7yk7yIAmMV8XduQjHsB4siGGINMQ VA0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tuYwHJvC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42ac5158e92si18453325e9.75.2024.08.23.06.52.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:52:02 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tuYwHJvC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 2A40788BC4; Fri, 23 Aug 2024 15:49:52 +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="tuYwHJvC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 24674886E7; Fri, 23 Aug 2024 15:49:50 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 3CA4788A29 for ; Fri, 23 Aug 2024 15:49:48 +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-wr1-x42b.google.com with SMTP id ffacd0b85a97d-371936541caso910575f8f.0 for ; Fri, 23 Aug 2024 06:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420987; x=1725025787; 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=ErBWxkzTdbtyE92CQBPyiy1jniNtymtJyxMnRxGL814=; b=tuYwHJvCKa+I5oI0SkLE2Aa4NDlwvqJmBrjx+RTMqBuiNE4Kt+oiatfjE3AGIptFet w2izbm+/4jV3j/+lu3m0AcsFXnuH6WtSC06voF1tpqvrEyA4OsxOR+3myE671nmDiLKG W407CeYpntIsb04bwCoMfQqHyFSQ/G4yFrYAZWE//C/hbSYHg5njeME4qO4FL5WYEc6+ NtaEhwOj1NOeGcRUw1LGYLdjx/CqYKPhEtls0Fps/2BmOj1oPa5B1fYYMV35+amPvpZz I2B8kDzeqqHWkecswsyK2XBIEKavlVjzEC/akYNKahE7JycZLSZZdUfXHvXEJx92orAb jUug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420987; x=1725025787; 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=ErBWxkzTdbtyE92CQBPyiy1jniNtymtJyxMnRxGL814=; b=SDk+OthUVbSTQ0Gg2Yu+Qzzf/C4H5qijx1slIoJbq+60xChAW9V445CJAyOIGdgnY1 t+Rdp27DUeeyoIXbxzKLuDWL01gcRNVjA5cIu35jwtSCxzVq4PiYmrgEGNFKlvh5jeNz vC/f4zMRJGbR5Fzcns4j+wgHn/T3cYptUnrwD+VswbUP59+pHr3cFtT6/axj0ghvwg7n o6Zi87DJFPqGwsw2C7wQrtgq0OyCsT16nzggq5evAy8Dcks0eMSNYoqqx6zt+OG9ffnW kX9nWdSNp3pA0vlMNemFn//sbWfKi0RnDaCQWZy7DDP3ETzM2tG3o2DE5I6sR7FRb4rb fImQ== X-Gm-Message-State: AOJu0Yy/P85moA8fEMaR1dhtMkMooauA26ClaGh8ZJIhhnMg2sao2ylF XDbOgtIrzjDY06hU3HOO5NToUq4ixXBsof/P6fA8N2LMrepg6PDHlQdC/Q9MrdcNvC5mEMiI5nY eA7Wkw/0y X-Received: by 2002:a5d:6d0a:0:b0:367:95e8:3aef with SMTP id ffacd0b85a97d-373118cecb6mr1846006f8f.42.1724420987392; Fri, 23 Aug 2024 06:49:47 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:47 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , William Zhang , Simon Glass , Masahisa Kojima , Sean Anderson , Marek Vasut , Fabio Estevam , Matthias Schiffer , Michal Simek Subject: [PATCH v9 18/37] net: eth-uclass: add function eth_start_udev() Date: Fri, 23 Aug 2024 15:48:22 +0200 Message-Id: <64779fa9e2c5988a347fe7b9ee55fdf03b464fba.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 function to start a given network device, and update eth_init() to use it. Signed-off-by: Jerome Forissier Reviewed-by: Tom Rini --- drivers/mtd/altera_qspi.c | 4 ++-- include/net-common.h | 1 + net/eth-uclass.c | 38 +++++++++++++++++++++++++------------- 3 files changed, 28 insertions(+), 15 deletions(-) diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c index c26615821c8..e5c8df750b7 100644 --- a/drivers/mtd/altera_qspi.c +++ b/drivers/mtd/altera_qspi.c @@ -96,7 +96,7 @@ int flash_erase(flash_info_t *info, int s_first, int s_last) ret = mtd_erase(mtd, &instr); flash_set_verbose(0); if (ret) - return ERR_PROTECTED; + return FL_ERR_PROTECTED; puts(" done\n"); return 0; @@ -114,7 +114,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt) ret = mtd_write(mtd, to, cnt, &retlen, src); if (ret) - return ERR_PROTECTED; + return FL_ERR_PROTECTED; return 0; } diff --git a/include/net-common.h b/include/net-common.h index 26674ec7e90..43bc6b9a0d5 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -192,6 +192,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index, int usb_ether_init(void); int eth_init(void); /* Initialize the device */ +int eth_start_udev(struct udevice *dev); int eth_send(void *packet, int length); /* Send a packet */ #if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) int eth_receive(void *packet, int length); /* Receive a packet*/ diff --git a/net/eth-uclass.c b/net/eth-uclass.c index e34d7af0229..6dd9b9bb98e 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -284,6 +284,27 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op, } U_BOOT_ENV_CALLBACK(ethaddr, on_ethaddr); +int eth_start_udev(struct udevice *dev) +{ + struct eth_device_priv *priv = dev_get_uclass_priv(dev); + int ret; + + if (priv->running) + return 0; + + if (!device_active(dev)) + return -EINVAL; + + ret = eth_get_ops(dev)->start(dev); + if (ret >= 0) { + priv->state = ETH_STATE_ACTIVE; + priv->running = true; + ret = 0; + } + + return ret; +} + int eth_init(void) { struct udevice *current = NULL; @@ -328,20 +349,11 @@ int eth_init(void) if (current) { debug("Trying %s\n", current->name); - if (device_active(current)) { - ret = eth_get_ops(current)->start(current); - if (ret >= 0) { - struct eth_device_priv *priv = - dev_get_uclass_priv(current); - - priv->state = ETH_STATE_ACTIVE; - priv->running = true; - ret = 0; - goto end; - } - } else { + ret = eth_start_udev(current); + if (ret < 0) ret = eth_errno; - } + else + goto end; debug("FAIL\n"); } else { From patchwork Fri Aug 23 13:48:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821722 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387397wrh; Fri, 23 Aug 2024 06:52:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVN52u1W0ZVtCFGmpVHGlK5M4wPbmIsc0Dirndl3nHuraorXFHFF2rcn1OOkyYA7DznO9AN/w==@linaro.org X-Google-Smtp-Source: AGHT+IHslo6KXt7whdCeqdcsS9nbLIfZHkeKLNOd/UUgB9nBrqmt2kLJofopONHFhd39ZtVg98l6 X-Received: by 2002:a5d:598a:0:b0:368:7fd3:291c with SMTP id ffacd0b85a97d-373118e415amr1596630f8f.60.1724421134594; Fri, 23 Aug 2024 06:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421134; cv=none; d=google.com; s=arc-20240605; b=OVg92R5AC6q5QHi6HGfOP1VvBmUN1SZ0k+jVSiqZ8XC6AyZXrcdoKg2M0BzT55nszW Xe5QkDWrdGS6pfPpOOyhQqxBQwERcmoumiZsbyt075D90Tfjp0eiGjt+4dwqfRDSOREG se8D00LBcT4KkwqwikB+vKZjKMoBAv9BYAZWCdasYTSiiHrDbnyF3aDKUPIbEr5TA3wa ZaeWiyaulQ2fpBhyRUSQXnLc/hn56FHZZSeNJMK+oo8nPVtr0+9nXf6zYC3XJeewlPMr q9dgR+3p+vltePOmcc3MFd51wCj/yh57G0atFBe0RVeFwZEaaEqxJC9t2WGLTa4bk5sF gD9Q== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jN/vBBm6YP+NZdFlyfr3/XPN0pa+n102gLZEhWvACJU=; fh=CwfhqZDqBxd95mcv02gQfeopTsuZ7s2yfddj8rnvkzI=; b=ND+LTA/REKKyxaKUvSDr+VsgxAyhKe/Go2zVQbnTC/7K+qfFw/ZpnSaD3mlhpjIFwt Kn/dvLjmxgciig1Ny6/KISfzrtKel9kR/9NHFTpRVkXhEaJn1JK/EScDYAGUgU70VaJ4 dDAQGwjFYb3qJwJlApCMCmAus8hpQgZlCN898pnq+dX9rCG3+P8QVgAf1sdpqwvw95/e YVkUrk7J2uj/zA758Gy1JpSZpMVHcDaa92R66gEBruBuK+QU3wKLTTmsraHsGt9bPfT4 b1C3rRkdnFJQS2wX/o6Nn6i/PaS5+4LZ707wyZZA3YP3g2omvawIdxHxt2UlgG1PWsSX KyLA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iIZfUSXz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42ac517ac3asi18638845e9.110.2024.08.23.06.52.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iIZfUSXz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 8571C88BEF; Fri, 23 Aug 2024 15:49:53 +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="iIZfUSXz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AF08C88A37; Fri, 23 Aug 2024 15:49:52 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 90C82886E7 for ; Fri, 23 Aug 2024 15:49:50 +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-wr1-x42a.google.com with SMTP id ffacd0b85a97d-371a6fcd863so976507f8f.1 for ; Fri, 23 Aug 2024 06:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420990; x=1725025790; 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=jN/vBBm6YP+NZdFlyfr3/XPN0pa+n102gLZEhWvACJU=; b=iIZfUSXzCFJh4OMyhtFKbJFES15yJnKTXiuJy9BRG0Pw6QDxoSu1+pnPlKrUFPNnXI 4ArMFphqa6LoXt4y6tWAQslxuxQbWf6mUTJNPa8oPQE2vYyAB+yi35BMRrZn1CdAXXNs 7HnmfIw3343EPvxH70eWlU8NgQRNNd4YX5lSe9A/WP8ZPYt/VnW4VzRjAzjGpSaS4J6b 9A4fM0RpEYnyPQcaWl7KxzL35yzG8d8v+ESuOW7QD8qCvXtUsW8GBnfEfikTsdhlM4+n GG/DVcqcQrUI/e74ksL/J9JXyTnHWQ7sjgxYQtiV6kzC6J8K4kdllQrQAwwLlq6dhWjz KXFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420990; x=1725025790; 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=jN/vBBm6YP+NZdFlyfr3/XPN0pa+n102gLZEhWvACJU=; b=T3HevDThEHEhvyO0EThX920VNcw8rjTkVtPrKwn+r60iJZ+/BYa9RJCipBT5h9ycFO OazwgCMO1L4uANJjPSxL0O/gqPtT1kTj1UGMxEcYut0Y7yJNXBQopWPDslGb4SkTxBKS yh3oWA4t1pY+DSiougb6yAet9c6T9jCnWlckAtxTzbI41OwmECiTPjumvP6cKZ1Q36xY 4tYQyT60lAco7x39b39MGOjqZIKQQ0zkEAIKyQGFfd1j9kKfXTkpAS3XJGihHrPkbABX jR2kLNikttJqyUOjhNURFgHsbkycfAK0dn+kuCoo8ef86Du7TwHY55xGs2Uf+duzykHR b+3w== X-Gm-Message-State: AOJu0YwXPagP4O+SwXkJ40EjHDOJPmXcLW/8qhfggu2gaaRtDmG7vr7Q IzBKHf+22UZQLhfGvdfTgNVdbVkKRoRlzvYaIS3bdy7Tuh6MfJVvg/vrCV8Rz+HSvrMYbkaA0Z+ 9BvMw2fgS X-Received: by 2002:a05:6000:82:b0:373:591:14e4 with SMTP id ffacd0b85a97d-373118c86d4mr1494525f8f.49.1724420989757; Fri, 23 Aug 2024 06:49:49 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:49 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Sean Anderson , Oleksandr Suvorov Subject: [PATCH v9 19/37] net-lwip: build lwIP Date: Fri, 23 Aug 2024 15:48:23 +0200 Message-Id: <6928c1fca21f4a86142d86e919c1f908501dddca.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Build the lwIP library when NET_LWIP is enabled. The following files are adaptation layers written specially for U-Boot: lib/lwip/u-boot/arch/cc.h lib/lwip/u-boot/arch/sys_arch.h (empty) lib/lwip/u-boot/limits.h (empty) lib/lwip/u-boot/lwipopts.h They were initially contributed by Maxim in a previous RFC patch series. Signed-off-by: Jerome Forissier Co-developed-by: Maxim Uvarov Cc: Maxim Uvarov Acked-by: Ilias Apalodimas --- lib/Makefile | 2 + lib/lwip/Makefile | 55 +++++++++++ lib/lwip/u-boot/arch/cc.h | 45 +++++++++ lib/lwip/u-boot/arch/sys_arch.h | 0 lib/lwip/u-boot/limits.h | 0 lib/lwip/u-boot/lwipopts.h | 157 ++++++++++++++++++++++++++++++++ net/lwip/Kconfig | 10 ++ 7 files changed, 269 insertions(+) create mode 100644 lib/lwip/Makefile create mode 100644 lib/lwip/u-boot/arch/cc.h create mode 100644 lib/lwip/u-boot/arch/sys_arch.h create mode 100644 lib/lwip/u-boot/limits.h create mode 100644 lib/lwip/u-boot/lwipopts.h diff --git a/lib/Makefile b/lib/Makefile index e389ad014f8..7378d907258 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -96,6 +96,8 @@ obj-$(CONFIG_LIBAVB) += libavb/ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/ obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o +obj-$(CONFIG_NET_LWIP) += lwip/ + ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o diff --git a/lib/lwip/Makefile b/lib/lwip/Makefile new file mode 100644 index 00000000000..dfcd700ca47 --- /dev/null +++ b/lib/lwip/Makefile @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2024 Linaro Ltd. + +obj-y += \ + lwip/src/api/api_lib.o \ + lwip/src/api/api_msg.o \ + lwip/src/api/err.o \ + lwip/src/api/if_api.o \ + lwip/src/api/netbuf.o \ + lwip/src/api/netdb.o \ + lwip/src/api/netifapi.o \ + lwip/src/api/sockets.o \ + lwip/src/api/tcpip.o \ + lwip/src/apps/http/http_client.o \ + lwip/src/apps/tftp/tftp.o \ + lwip/src/core/altcp_alloc.o \ + lwip/src/core/altcp.o \ + lwip/src/core/altcp_tcp.o \ + lwip/src/core/def.o \ + lwip/src/core/dns.o \ + lwip/src/core/inet_chksum.o \ + lwip/src/core/init.o \ + lwip/src/core/ip.o \ + lwip/src/core/ipv4/acd.o \ + lwip/src/core/ipv4/autoip.o \ + lwip/src/core/ipv4/dhcp.o \ + lwip/src/core/ipv4/etharp.o \ + lwip/src/core/ipv4/icmp.o \ + lwip/src/core/ipv4/igmp.o \ + lwip/src/core/ipv4/ip4_addr.o \ + lwip/src/core/ipv4/ip4.o \ + lwip/src/core/ipv4/ip4_frag.o \ + lwip/src/core/ipv6/dhcp6.o \ + lwip/src/core/ipv6/ethip6.o \ + lwip/src/core/ipv6/icmp6.o \ + lwip/src/core/ipv6/inet6.o \ + lwip/src/core/ipv6/ip6_addr.o \ + lwip/src/core/ipv6/ip6.o \ + lwip/src/core/ipv6/ip6_frag.o \ + lwip/src/core/ipv6/mld6.o \ + lwip/src/core/ipv6/nd6.o \ + lwip/src/core/mem.o \ + lwip/src/core/memp.o \ + lwip/src/core/netif.o \ + lwip/src/core/pbuf.o \ + lwip/src/core/raw.o \ + lwip/src/core/stats.o \ + lwip/src/core/sys.o \ + lwip/src/core/tcp.o \ + lwip/src/core/tcp_in.o \ + lwip/src/core/tcp_out.o \ + lwip/src/core/timeouts.o \ + lwip/src/core/udp.o \ + lwip/src/netif/ethernet.o diff --git a/lib/lwip/u-boot/arch/cc.h b/lib/lwip/u-boot/arch/cc.h new file mode 100644 index 00000000000..563d3bfa98b --- /dev/null +++ b/lib/lwip/u-boot/arch/cc.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2023 Linaro Ltd. */ + +#ifndef LWIP_ARCH_CC_H +#define LWIP_ARCH_CC_H + +#include +#include +#include +#include + +#define LWIP_ERRNO_INCLUDE + +#define LWIP_ERRNO_STDINCLUDE 1 +#define LWIP_NO_UNISTD_H 1 +#define LWIP_TIMEVAL_PRIVATE 1 + +#ifdef CONFIG_LIB_RAND +#define LWIP_RAND() ((u32_t)rand()) +#else +#define LWIP_DNS_SECURE 0 +#endif + +/* different handling for unit test, normally not needed */ +#ifdef LWIP_NOASSERT_ON_ERROR +#define LWIP_ERROR(message, expression, handler) do { if (!(expression)) { \ + handler; }} while (0) +#endif + +#define LWIP_DONT_PROVIDE_BYTEORDER_FUNCTIONS + +#define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ + x, __LINE__, __FILE__); } while (0) + +#define atoi(str) (int)dectoul(str, NULL) +#define lwip_strnstr(a, b, c) strstr(a, b) + +#define LWIP_ERR_T int +#define LWIP_CONST_CAST(target_type, val) ((target_type)((uintptr_t)val)) + +#if defined(CONFIG_SYS_BIG_ENDIAN) +#define BYTE_ORDER BIG_ENDIAN +#endif + +#endif /* LWIP_ARCH_CC_H */ diff --git a/lib/lwip/u-boot/arch/sys_arch.h b/lib/lwip/u-boot/arch/sys_arch.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/lwip/u-boot/limits.h b/lib/lwip/u-boot/limits.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib/lwip/u-boot/lwipopts.h b/lib/lwip/u-boot/lwipopts.h new file mode 100644 index 00000000000..a0d3d2b364f --- /dev/null +++ b/lib/lwip/u-boot/lwipopts.h @@ -0,0 +1,157 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +/* Copyright (C) 2023 Linaro Ltd. */ + +#ifndef LWIP_UBOOT_LWIPOPTS_H +#define LWIP_UBOOT_LWIPOPTS_H + +#if defined(CONFIG_LWIP_DEBUG) +#define LWIP_DEBUG 1 +#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL +#define LWIP_DBG_TYPES_ON LWIP_DBG_ON +#define ETHARP_DEBUG LWIP_DBG_ON +#define NETIF_DEBUG LWIP_DBG_ON +#define PBUF_DEBUG LWIP_DBG_OFF +#define API_LIB_DEBUG LWIP_DBG_ON +#define API_MSG_DEBUG LWIP_DBG_OFF +#define SOCKETS_DEBUG LWIP_DBG_OFF +#define ICMP_DEBUG LWIP_DBG_OFF +#define IGMP_DEBUG LWIP_DBG_OFF +#define INET_DEBUG LWIP_DBG_OFF +#define IP_DEBUG LWIP_DBG_ON +#define IP_REASS_DEBUG LWIP_DBG_OFF +#define RAW_DEBUG LWIP_DBG_OFF +#define MEM_DEBUG LWIP_DBG_OFF +#define MEMP_DEBUG LWIP_DBG_OFF +#define SYS_DEBUG LWIP_DBG_OFF +#define TIMERS_DEBUG LWIP_DBG_ON +#define TCP_DEBUG LWIP_DBG_OFF +#define TCP_INPUT_DEBUG LWIP_DBG_OFF +#define TCP_FR_DEBUG LWIP_DBG_OFF +#define TCP_RTO_DEBUG LWIP_DBG_OFF +#define TCP_CWND_DEBUG LWIP_DBG_OFF +#define TCP_WND_DEBUG LWIP_DBG_OFF +#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF +#define TCP_RST_DEBUG LWIP_DBG_OFF +#define TCP_QLEN_DEBUG LWIP_DBG_OFF +#define UDP_DEBUG LWIP_DBG_OFF +#define TCPIP_DEBUG LWIP_DBG_OFF +#define SLIP_DEBUG LWIP_DBG_OFF +#define DHCP_DEBUG LWIP_DBG_ON +#define AUTOIP_DEBUG LWIP_DBG_ON +#define DNS_DEBUG LWIP_DBG_ON +#define IP6_DEBUG LWIP_DBG_OFF +#define DHCP6_DEBUG LWIP_DBG_OFF +#endif + +#define LWIP_TESTMODE 0 + +#if !defined(CONFIG_LWIP_ASSERT) +#define LWIP_NOASSERT 1 +#define LWIP_ASSERT(message, assertion) +#endif + +#include "lwip/debug.h" + +#define SYS_LIGHTWEIGHT_PROT 0 +#define NO_SYS 1 + +#define LWIP_IPV4 1 +#define LWIP_IPV6 0 + +#define MEM_ALIGNMENT 1 + +#define MEMP_NUM_TCP_SEG 16 +#define PBUF_POOL_SIZE 8 + +#define LWIP_ARP 1 +#define ARP_TABLE_SIZE 4 +#define ARP_QUEUEING 1 + +#define IP_FORWARD 0 +#define IP_OPTIONS_ALLOWED 1 +#define IP_REASSEMBLY 0 +#define IP_FRAG 0 +#define IP_REASS_MAXAGE 3 +#define IP_REASS_MAX_PBUFS 4 +#define IP_FRAG_USES_STATIC_BUF 0 + +#define IP_DEFAULT_TTL 255 + +#define LWIP_ICMP 0 + +#if defined(CONFIG_PROT_RAW_LWIP) +#define LWIP_RAW 1 +#else +#define LWIP_RAW 0 +#endif + +#if defined(CONFIG_PROT_DHCP_LWIP) +#define LWIP_DHCP 1 +#define LWIP_DHCP_BOOTP_FILE 1 +#else +#define LWIP_DHCP 0 +#endif + +#define LWIP_DHCP_DOES_ACD_CHECK 0 + +#define LWIP_AUTOIP 0 + +#define LWIP_SNMP 0 + +#define LWIP_IGMP 0 + +#if defined(CONFIG_PROT_DNS_LWIP) +#define LWIP_DNS 1 +#define DNS_TABLE_SIZE 1 +#else +#define LWIP_DNS 0 +#endif + +#if defined(CONFIG_PROT_UDP_LWIP) +#define LWIP_UDP 1 +#else +#define LWIP_UDP 0 +#endif + +#if defined(CONFIG_PROT_TCP_LWIP) +#define LWIP_TCP 1 +#define TCP_MSS 1460 +#define TCP_WND CONFIG_LWIP_TCP_WND +#define LWIP_WND_SCALE 1 +#define TCP_RCV_SCALE 0x7 +#define TCP_SND_BUF (2 * TCP_MSS) +#ifdef CONFIG_PROT_TCP_SACK_LWIP +#define LWIP_TCP_SACK_OUT 1 +#endif +#else +#define LWIP_TCP 0 +#endif + +#define LWIP_LISTEN_BACKLOG 0 + +#define PBUF_LINK_HLEN 14 +#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS + 40 + PBUF_LINK_HLEN) + +#define LWIP_HAVE_LOOPIF 0 + +#define LWIP_NETCONN 0 +#define LWIP_DISABLE_MEMP_SANITY_CHECKS 1 + +#define LWIP_SOCKET 0 +#define SO_REUSE 0 + +#define LWIP_STATS 0 + +#define PPP_SUPPORT 0 + +#define LWIP_TCPIP_CORE_LOCKING 0 + +#define LWIP_NETIF_LOOPBACK 0 + +/* use malloc instead of pool */ +#define MEMP_MEM_MALLOC 1 +#define MEMP_MEM_INIT 1 +#define MEM_LIBC_MALLOC 1 + +#endif /* LWIP_UBOOT_LWIPOPTS_H */ diff --git a/net/lwip/Kconfig b/net/lwip/Kconfig index eb31d044197..4e2f4885f7a 100644 --- a/net/lwip/Kconfig +++ b/net/lwip/Kconfig @@ -32,3 +32,13 @@ config PROT_TCP_SACK_LWIP config PROT_UDP_LWIP bool + +config LWIP_TCP_WND + int "Value of TCP_WND" + default 3000000 + help + Default value for TCP_WND in the lwIP configuration + Lower values result in slower wget transfer speeds in + general, especially when the latency on the network is high, + but QEMU with "-net user" needs no more than a few KB or the + transfer will stall and eventually time out. From patchwork Fri Aug 23 13:48:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821742 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp406010wrh; Fri, 23 Aug 2024 07:26:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXpQbMiNbt0yC+7mRXoczqD0pjBDZdZIZ2qEE0i4wcPA6p46i5oiL1IBghffVX+Lmr+rti5fA==@linaro.org X-Google-Smtp-Source: AGHT+IF1kmU97NWoEzgtpKnTbJS9gKdB++L8qvRE8PGEAm8c8dIsbbvi3VkAO5pQPDSs9LhIbKWd X-Received: by 2002:adf:ea0a:0:b0:366:ef03:a8a2 with SMTP id ffacd0b85a97d-373118e3daemr1484897f8f.54.1724423201074; Fri, 23 Aug 2024 07:26:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724423201; cv=none; d=google.com; s=arc-20160816; b=vh+NcsylWmL4XEQdFtgs4ZiHeJ/5Bcz/d2X2D9XUE3duyaoiD5zi/Ry8ix5PMJPR1G HX5CcxjZ31aRPq54SE7ikIco/tw8NXE8bF6dfq06eBoZKoAh7zPzpdLnVmU3y6TMPate Unpl+FuQNjDRPWgVh3HhtNh9tEHhzp4GBG7o4a4GsY1i0Vp8u6CM/d2CMJs4N7fzI8Gv /s02NxHx9xWm57LaF/MOfOir0O6u/zjDgjxV7/G+gTgwpD+73SeTkSPLjWh7dgGdRCU8 Y80t3wc3PU/EjB34yxmE/JU2zoAC/aN6BjpQ00CimwL1QZ9PgEhG2DS16tkahr3TzwnZ ILog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k6sXU24absOq3WHIpcue69FRF+eC8kMTxlDjmbm/RP4=; fh=Zaeaoxe3SqMH8bV9av6pSoHdZfWijC33QVeqNp+OTzM=; b=GQidihNj/rpV7o2B7ltVMWgRPE49/HELTTGowl3NHs97gF+W1oMXcEguWxy+UZZnkI c6NjAzKpUtTQNgub3x9BjXz4Bf3yNQB1pL2hnqIOT7AqgU1F5ZWWgnjLM//MKjKNBXkg mygXIrNfOwd3ZBn+hacGKoYMXxWShGP0kE1ipysUpoQ/fk3mufJaZYTKwF+mwX48p2Lw rbgjPOTBBZDKXuRxYR5eFyNtMlSsA2p4DWiiH25Mk2bXCfParDYtVESeZiRp77Blu+F3 S3VVJ7eEIl+E26M9vP1pl498ZPPXoopzyw3l2+1i6Sk3lQcVHHkKzINZsMWe0toxcwf5 Giyw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JwEVIotX; 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-3730826f9a1si1489812f8f.790.2024.08.23.07.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 07:26:41 -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=JwEVIotX; 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 4DE7E8870E; Fri, 23 Aug 2024 16:26:39 +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="JwEVIotX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 510B2889BE; Fri, 23 Aug 2024 15:49:58 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 D78E2889EF for ; Fri, 23 Aug 2024 15:49:55 +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-wr1-x42f.google.com with SMTP id ffacd0b85a97d-371a6fcd863so976569f8f.1 for ; Fri, 23 Aug 2024 06:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420995; x=1725025795; 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=k6sXU24absOq3WHIpcue69FRF+eC8kMTxlDjmbm/RP4=; b=JwEVIotXQvxHt5MeReGQSb0Y0/KYfE5gk4rHW51wzYIXwXFd05QwZ8Re2UJkLZKLax jY6PWLPmGRuy4ukY+G2JPAuupytlGE+ZkCnkayUfBP2fZgDEwUyJJuQ39NyoFfKeZ68A GbsorjIuTkTcnfcppdjK8hsD8kHPUazB1+I+qDtJTudUJL9GzIEE07p2psa/AVCiy8jU kJs09Q5ulY3xE/d3uGQo1zMV6vSp54QRMCb0TxiiNt13iQSqXOTivFpp392fTTLg0Mul OIgDLKFXs8MjSajAB+DyQfkIo6XLKMRZVKnomSBv4hCOfsfXQtWEi/GrIQRDe03rs0J8 3NDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420995; x=1725025795; 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=k6sXU24absOq3WHIpcue69FRF+eC8kMTxlDjmbm/RP4=; b=vqf04sTi5d8a/pbvoFJTligi068IJwNXx7vCYXgjjxdUGcuoZixNZTllbw9A5I1w+y 7OgBXqiroduVwzujAU4Leu/Y9hCaGMruxj11Kn0279F+hr5TUk2yBXI0U/M/smLvlEfp xgBEvQ92cIver2z1g20kyM2eFYVCMhXswn9KdhdWbmRoMAERE+NYl2mqTWSoDsC2SepL cY09CBL/JssL3qKQL+Opu5qmFzcd5VWMQWhThbpJ3GvORVPkeQfV+cd6hjlpCXTDkf18 IJbBSav0zEd/8euLGs3UI1zduaQLja7fgt4OZWPGKCXEZ+k9EBV6Z6056CXarvOtkx+6 ewyw== X-Gm-Message-State: AOJu0YwRFi4hFO8N4XNgKlyLZteZZ4n+X7yPP5rt7qM8B5sBYk79bLII pzRmlhu1f4d2KegFxlIInwGDzSSCV1CMrZsEbDM9h2gsw3HtFtM3pktXiKQFvbbLwBvXGE9rUHn te1ldUMyj X-Received: by 2002:adf:f0cf:0:b0:371:8e68:a6e1 with SMTP id ffacd0b85a97d-373118650b6mr1622098f8f.29.1724420994657; Fri, 23 Aug 2024 06:49:54 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:53 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Manoj Sai , Matteo Lisi , Tom Rini , Gilles Talis , Michal Simek , Marek Vasut , Joe Hershberger , Ramon Fried , Peng Fan , Nishanth Menon , Simon Glass , Algapally Santosh Sagar , James Hilliard , Venkatesh Yadav Abbarapu , Petr Zejdl , Heinrich Schuchardt , Mattijs Korpershoek , Eddie James , AKASHI Takahiro , Francis Laniel , Johan Jonker , Maxim Moskalets , Rasmus Villemoes , Sean Anderson , Artur Rojek , Janne Grunau , Neal Gompa , Yang Xiwen , Gabor Juhos , Kever Yang , Neil Armstrong , Jonas Karlman , Boon Khai Ng , Robert Marko Subject: [PATCH v9 20/37] net-lwip: add DHCP support and dhcp commmand Date: Fri, 23 Aug 2024 15:48:24 +0200 Message-Id: <36a13357261f734187444b48b74dec2540e73b86.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 23 Aug 2024 16:26:38 +0200 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 what it takes to enable NETDEVICES with NET_LWIP and enable DHCP as well as the dhcp command. CMD_TFTPBOOT is selected by BOOTMETH_EFI due to this code having an implicit dependency on do_tftpb(). Signed-off-by: Jerome Forissier --- board/engicam/imx8mp/icore_mx8mp.c | 2 +- .../imx8mp_debix_model_a.c | 2 +- board/ti/am335x/board.c | 3 +- board/xilinx/common/board.c | 3 +- boot/Kconfig | 3 +- cmd/Kconfig | 91 +++--- cmd/Makefile | 6 +- cmd/elf.c | 2 +- cmd/net-lwip.c | 13 + common/board_r.c | 4 +- common/usb_kbd.c | 2 +- drivers/net/Kconfig | 2 +- include/net-lwip.h | 3 + lib/tiny-printf.c | 3 +- net/Makefile | 14 +- net/lwip/Makefile | 5 + net/lwip/dhcp.c | 125 ++++++++ net/lwip/eth_internal.h | 35 +++ net/lwip/net-lwip.c | 286 ++++++++++++++++++ net/lwip/tftp.c | 11 + 20 files changed, 560 insertions(+), 55 deletions(-) create mode 100644 cmd/net-lwip.c create mode 100644 net/lwip/Makefile create mode 100644 net/lwip/dhcp.c create mode 100644 net/lwip/eth_internal.h create mode 100644 net/lwip/net-lwip.c create mode 100644 net/lwip/tftp.c diff --git a/board/engicam/imx8mp/icore_mx8mp.c b/board/engicam/imx8mp/icore_mx8mp.c index e2ed70caa43..bfdc447c478 100644 --- a/board/engicam/imx8mp/icore_mx8mp.c +++ b/board/engicam/imx8mp/icore_mx8mp.c @@ -33,7 +33,7 @@ static void setup_fec(void) setbits_le32(&gpr->gpr[1], BIT(22)); } -#if CONFIG_IS_ENABLED(NET) +#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) diff --git a/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c b/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c index 112770ba493..c709d017483 100644 --- a/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c +++ b/board/polyhex/imx8mp_debix_model_a/imx8mp_debix_model_a.c @@ -29,7 +29,7 @@ static void setup_fec(void) setbits_le32(&gpr->gpr[1], BIT(22)); } -#if CONFIG_IS_ENABLED(NET) +#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) int board_phy_config(struct phy_device *phydev) { if (phydev->drv->config) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 681002ba1da..249c9fd2e7e 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -900,7 +900,8 @@ int board_late_init(void) #endif /* CPSW plat */ -#if CONFIG_IS_ENABLED(NET) && !CONFIG_IS_ENABLED(OF_CONTROL) +#if (CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)) && \ + !CONFIG_IS_ENABLED(OF_CONTROL) struct cpsw_slave_data slave_data[] = { { .slave_reg_ofs = CPSW_SLAVE0_OFFSET, diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 0b43407b9e9..c2be31afa6b 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -495,7 +495,8 @@ int board_late_init_xilinx(void) ret |= env_set_by_index("uuid", id, uuid); } - if (!CONFIG_IS_ENABLED(NET)) + if (!(CONFIG_IS_ENABLED(NET) || + CONFIG_IS_ENABLED(NET_LWIP))) continue; for (i = 0; i < EEPROM_HDR_NO_OF_MAC_ADDR; i++) { diff --git a/boot/Kconfig b/boot/Kconfig index 5762de87b21..fc133fe0ffa 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -380,7 +380,7 @@ config BOOT_DEFAULTS_CMDS select CMD_PART if PARTITIONS select CMD_DHCP if CMD_NET select CMD_PING if CMD_NET - select CMD_PXE if CMD_NET + select CMD_PXE if (CMD_NET && !NET_LWIP) select CMD_BOOTI if ARM64 select CMD_BOOTZ if ARM && !ARM64 imply CMD_MII if NET @@ -558,6 +558,7 @@ config BOOTMETH_EXTLINUX_PXE config BOOTMETH_EFILOADER bool "Bootdev support for EFI boot" depends on EFI_BINARY_EXEC + select CMD_TFTPBOOT if CMD_NET default y help Enables support for EFI boot using bootdevs. This makes the diff --git a/cmd/Kconfig b/cmd/Kconfig index de56c497005..4084ecf0dfd 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1781,12 +1781,16 @@ config CMD_AB_SELECT endmenu -if NET +if NET || NET_LWIP menuconfig CMD_NET bool "Network commands" default y +endif + +if NET + if CMD_NET config CMD_BOOTP @@ -1795,12 +1799,6 @@ config CMD_BOOTP help bootp - boot image via network using BOOTP/TFTP protocol -config CMD_DHCP - bool "dhcp" - depends on CMD_BOOTP - help - Boot image via network using DHCP/TFTP protocol - config CMD_DHCP6 bool "dhcp6" depends on IPV6 @@ -1944,12 +1942,6 @@ config BOOTP_VCI_STRING default "U-Boot.arm" if ARM default "U-Boot" -config CMD_TFTPBOOT - bool "tftpboot" - default y - help - tftpboot - load file via network using TFTP protocol - config CMD_TFTPPUT bool "tftp put" depends on CMD_TFTPBOOT @@ -2008,29 +2000,6 @@ config CMD_WGET wget is a simple command to download kernel, or other files, from a http server over TCP. -config CMD_MII - bool "mii" - imply CMD_MDIO - help - If set, allows 802.3(clause 22) MII Management functions interface access - The management interface specified in Clause 22 provides - a simple, two signal, serial interface to connect a - Station Management entity and a managed PHY for providing access - to management parameters and services. - The interface is referred to as the MII management interface. - -config MII_INIT - bool "Call mii_init() in the mii command" - depends on CMD_MII && (MPC8XX_FEC || FSLDMAFE || MCFFEC) - -config CMD_MDIO - bool "mdio" - depends on PHYLIB - help - If set, allows Enable 802.3(clause 45) MDIO interface registers access - The MDIO interface is orthogonal to the MII interface and extends - it by adding access to more registers through indirect addressing. - config CMD_PING bool "ping" help @@ -2079,7 +2048,7 @@ config IPV6_ROUTER_DISCOVERY help Will automatically perform router solicitation on first IPv6 network operation -endif +endif # if CMD_NET config CMD_ETHSW bool "ethsw" @@ -2092,6 +2061,7 @@ config CMD_ETHSW config CMD_PXE bool "pxe" select PXE_UTILS + depends on !NET_LWIP help Boot image via network using PXE protocol @@ -2100,7 +2070,52 @@ config CMD_WOL help Wait for wake-on-lan Magic Packet -endif +endif # if NET + +if NET || NET_LWIP + +if CMD_NET + +config CMD_DHCP + bool "dhcp" + select PROT_DHCP_LWIP if NET_LWIP + help + Boot image via network using DHCP/TFTP protocol + +config CMD_MII + bool "mii" + imply CMD_MDIO + help + If set, allows 802.3(clause 22) MII Management functions interface access + The management interface specified in Clause 22 provides + a simple, two signal, serial interface to connect a + Station Management entity and a managed PHY for providing access + to management parameters and services. + The interface is referred to as the MII management interface. + +config MII_INIT + bool "Call mii_init() in the mii command" + depends on CMD_MII && (MPC8XX_FEC || FSLDMAFE || MCFFEC) + +config CMD_MDIO + bool "mdio" + depends on PHYLIB + help + If set, allows Enable 802.3(clause 45) MDIO interface registers access + The MDIO interface is orthogonal to the MII interface and extends + it by adding access to more registers through indirect addressing. + +config CMD_TFTPBOOT + bool "tftp" + select PROT_UDP_LWIP if NET_LWIP + default n + help + tftpboot - load file via network using TFTP protocol + Currently a placeholder (not implemented) when NET_LWIP=y. + +endif # if CMD_NET + +endif # if NET || NET_LWIP menu "Misc commands" diff --git a/cmd/Makefile b/cmd/Makefile index 87133cc27a8..fe733cf6ba9 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -127,7 +127,11 @@ obj-y += legacy-mtd-utils.o endif obj-$(CONFIG_CMD_MUX) += mux.o obj-$(CONFIG_CMD_NAND) += nand.o -obj-$(CONFIG_CMD_NET) += net.o +ifdef CONFIG_CMD_NET +obj-$(CONFIG_NET) += net.o +obj-$(CONFIG_NET_LWIP) += net-lwip.o +CFLAGS_net-lwip.o := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot +endif obj-$(CONFIG_ENV_SUPPORT) += nvedit.o obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o obj-$(CONFIG_CMD_ONENAND) += onenand.o diff --git a/cmd/elf.c b/cmd/elf.c index 673c6c30511..c2c048d243f 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -130,7 +130,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) else addr = hextoul(argv[1], NULL); -#if defined(CONFIG_CMD_NET) +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_LWIP) /* * Check to see if we need to tftp the image ourselves * before starting diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c new file mode 100644 index 00000000000..82edb5fd2e6 --- /dev/null +++ b/cmd/net-lwip.c @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include + +#if defined(CONFIG_CMD_DHCP) +U_BOOT_CMD( + dhcp, 3, 1, do_dhcp, + "boot image via network using DHCP/TFTP protocol", + "[loadAddress] [[hostIPaddr:]bootfilename]" +); +#endif diff --git a/common/board_r.c b/common/board_r.c index d4ba245ac69..5e122c6778b 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -471,7 +471,7 @@ static int initr_status_led(void) } #endif -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) static int initr_net(void) { puts("Net: "); @@ -726,7 +726,7 @@ static init_fnc_t init_sequence_r[] = { #ifdef CONFIG_PCI_ENDPOINT pci_ep_init, #endif -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) INIT_FUNC_WATCHDOG_RESET initr_net, #endif diff --git a/common/usb_kbd.c b/common/usb_kbd.c index f3b4a3c94e6..1a7d8ca9a67 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -418,7 +418,7 @@ static int usb_kbd_testc(struct stdio_dev *sdev) */ unsigned long poll_delay = CONFIG_SYS_HZ / 50; -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_NET_LWIP) /* * If net_busy_flag is 1, NET transfer is running, * then we check key-pressed every second (first check may be diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index eba0bf8b1f1..33aa4ecf658 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -97,7 +97,7 @@ config DSA_SANDBOX menuconfig NETDEVICES bool "Network device support" - depends on NET + depends on NET || NET_LWIP select DM_ETH help You must select Y to enable any network device support diff --git a/include/net-lwip.h b/include/net-lwip.h index 5c3f9e7e86c..cfd06726577 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -10,5 +10,8 @@ struct netif *net_lwip_new_netif(struct udevice *udev); struct netif *net_lwip_new_netif_noip(struct udevice *udev); void net_lwip_remove_netif(struct netif *netif); struct netif *net_lwip_get_netif(void); +int net_lwip_rx(struct udevice *udev, struct netif *netif); + +int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 9a70c6095b3..f6727360097 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -269,7 +269,8 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va) } break; case 'p': - if (CONFIG_IS_ENABLED(NET) || _DEBUG) { + if (CONFIG_IS_ENABLED(NET) || + CONFIG_IS_ENABLED(NET_LWIP) || _DEBUG) { pointer(info, fmt, va_arg(va, void *)); /* * Skip this because it pulls in _ctype which is diff --git a/net/Makefile b/net/Makefile index a9cecee637a..68370595a8e 100644 --- a/net/Makefile +++ b/net/Makefile @@ -12,11 +12,6 @@ obj-$(CONFIG_CMD_BOOTP) += bootp.o obj-$(CONFIG_CMD_CDP) += cdp.o obj-$(CONFIG_CMD_DNS) += dns.o obj-$(CONFIG_DM_DSA) += dsa-uclass.o -obj-$(CONFIG_$(SPL_)DM_ETH) += eth-uclass.o -obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_ETH) += eth_bootdev.o -obj-$(CONFIG_DM_MDIO) += mdio-uclass.o -obj-$(CONFIG_DM_MDIO_MUX) += mdio-mux-uclass.o -obj-$(CONFIG_$(SPL_)DM_ETH) += eth_common.o obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o obj-$(CONFIG_IPV6) += ndisc.o obj-$(CONFIG_$(SPL_)DM_ETH) += net.o @@ -43,4 +38,13 @@ CFLAGS_eth_common.o += -Wno-format-extra-args endif +ifeq ($(filter y,$(CONFIG_NET) $(CONFIG_NET_LWIP)),y) +obj-$(CONFIG_$(SPL_TPL_)BOOTDEV_ETH) += eth_bootdev.o +obj-$(CONFIG_DM_MDIO) += mdio-uclass.o +obj-$(CONFIG_DM_MDIO_MUX) += mdio-mux-uclass.o +obj-$(CONFIG_$(SPL_)DM_ETH) += eth-uclass.o +obj-$(CONFIG_$(SPL_)DM_ETH) += eth_common.o obj-y += net-common.o +endif + +obj-$(CONFIG_NET_LWIP) += lwip/ diff --git a/net/lwip/Makefile b/net/lwip/Makefile new file mode 100644 index 00000000000..4e92a101ddb --- /dev/null +++ b/net/lwip/Makefile @@ -0,0 +1,5 @@ +ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot + +obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o +obj-$(CONFIG_CMD_DHCP) += dhcp.o +obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c new file mode 100644 index 00000000000..e492ad82a9b --- /dev/null +++ b/net/lwip/dhcp.c @@ -0,0 +1,125 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DHCP_TIMEOUT_MS 10000 + +#ifdef CONFIG_CMD_TFTPBOOT +/* Boot file obtained from DHCP (if present) */ +static char boot_file_name[DHCP_BOOT_FILE_LEN]; +#endif + +static void call_lwip_dhcp_fine_tmr(void *ctx) +{ + dhcp_fine_tmr(); + sys_timeout(10, call_lwip_dhcp_fine_tmr, NULL); +} + +static int dhcp_loop(struct udevice *udev) +{ + char *ipstr = "ipaddr\0\0"; + char *maskstr = "netmask\0\0"; + char *gwstr = "gatewayip\0\0"; + unsigned long start; + struct netif *netif; + struct dhcp *dhcp; + bool bound; + int idx; + + idx = dev_seq(udev); + if (idx < 0 || idx > 99) { + log_err("unexpected idx %d\n", idx); + return CMD_RET_FAILURE; + } + + netif = net_lwip_new_netif_noip(udev); + if (!netif) + return CMD_RET_FAILURE; + + start = get_timer(0); + dhcp_start(netif); + call_lwip_dhcp_fine_tmr(NULL); + + /* Wait for DHCP to complete */ + do { + net_lwip_rx(udev, netif); + sys_check_timeouts(); + bound = dhcp_supplied_address(netif); + if (bound) + break; + if (ctrlc()) { + printf("Abort\n"); + break; + } + mdelay(1); + } while (get_timer(start) < DHCP_TIMEOUT_MS); + + sys_untimeout(call_lwip_dhcp_fine_tmr, NULL); + + if (!bound) { + net_lwip_remove_netif(netif); + return CMD_RET_FAILURE; + } + + dhcp = netif_dhcp_data(netif); + + env_set("bootfile", dhcp->boot_file_name); + + if (idx > 0) { + sprintf(ipstr, "ipaddr%d", idx); + sprintf(maskstr, "netmask%d", idx); + sprintf(gwstr, "gatewayip%d", idx); + } + + env_set(ipstr, ip4addr_ntoa(&dhcp->offered_ip_addr)); + env_set(maskstr, ip4addr_ntoa(&dhcp->offered_sn_mask)); + env_set("serverip", ip4addr_ntoa(&dhcp->server_ip_addr)); + if (dhcp->offered_gw_addr.addr != 0) + env_set(gwstr, ip4addr_ntoa(&dhcp->offered_gw_addr)); + +#ifdef CONFIG_PROT_DNS_LWIP + env_set("dnsip", ip4addr_ntoa(dns_getserver(0))); + env_set("dnsip2", ip4addr_ntoa(dns_getserver(1))); +#endif +#ifdef CONFIG_CMD_TFTPBOOT + if (dhcp->boot_file_name[0] != '\0') + strncpy(boot_file_name, dhcp->boot_file_name, + sizeof(boot_file_name)); +#endif + + printf("DHCP client bound to address %pI4 (%lu ms)\n", + &dhcp->offered_ip_addr, get_timer(start)); + + net_lwip_remove_netif(netif); + return CMD_RET_SUCCESS; +} + +int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + eth_set_current(); + + return dhcp_loop(eth_get_dev()); +} + +int dhcp_run(ulong addr, const char *fname, bool autoload) +{ + char *dhcp_argv[] = {"dhcp", NULL, }; + struct cmd_tbl cmdtp = {}; /* dummy */ + + if (autoload) { + /* Will be supported when TFTP is added */ + return -EOPNOTSUPP; + } + + return do_dhcp(&cmdtp, 0, 1, dhcp_argv); +} diff --git a/net/lwip/eth_internal.h b/net/lwip/eth_internal.h new file mode 100644 index 00000000000..0b829a8d388 --- /dev/null +++ b/net/lwip/eth_internal.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2001-2015 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + * Joe Hershberger, National Instruments + */ + +#ifndef __ETH_INTERNAL_H +#define __ETH_INTERNAL_H + +/* Do init that is common to driver model and legacy networking */ +void eth_common_init(void); + +/** + * eth_env_set_enetaddr_by_index() - set the MAC address environment variable + * + * This sets up an environment variable with the given MAC address (@enetaddr). + * The environment variable to be set is defined by <@base_name><@index>addr. + * If @index is 0 it is omitted. For common Ethernet this means ethaddr, + * eth1addr, etc. + * + * @base_name: Base name for variable, typically "eth" + * @index: Index of interface being updated (>=0) + * @enetaddr: Pointer to MAC address to put into the variable + * Return: 0 if OK, other value on error + */ +int eth_env_set_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + +int eth_mac_skip(int index); +void eth_current_changed(void); +void eth_set_dev(struct udevice *dev); +void eth_set_current_to_next(void); + +#endif diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c new file mode 100644 index 00000000000..fa4ad2a65f8 --- /dev/null +++ b/net/lwip/net-lwip.c @@ -0,0 +1,286 @@ +// SPDX-License-Identifier: GPL-2.0 + +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* xx:xx:xx:xx:xx:xx\0 */ +#define MAC_ADDR_STRLEN 18 + +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) +void (*push_packet)(void *, int len) = 0; +#endif +int net_restart_wrap; +static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN]; +uchar *net_rx_packets[PKTBUFSRX]; +uchar *net_rx_packet; +const u8 net_bcast_ethaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + +static err_t linkoutput(struct netif *netif, struct pbuf *p) +{ + struct udevice *udev = netif->state; + void *pp = NULL; + int err; + + if ((unsigned long)p->payload % PKTALIGN) { + /* + * Some net drivers have strict alignment requirements and may + * fail or output invalid data if the packet is not aligned. + */ + pp = memalign(PKTALIGN, p->len); + if (!pp) + return ERR_ABRT; + memcpy(pp, p->payload, p->len); + } + + err = eth_get_ops(udev)->send(udev, pp ? pp : p->payload, p->len); + free(pp); + if (err) { + log_err("send error %d\n", err); + return ERR_ABRT; + } + + return ERR_OK; +} + +static err_t net_lwip_if_init(struct netif *netif) +{ +#if LWIP_IPV4 + netif->output = etharp_output; +#endif + netif->linkoutput = linkoutput; + netif->mtu = 1500; + netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP; + + return ERR_OK; +} + +static void eth_init_rings(void) +{ + int i; + + for (i = 0; i < PKTBUFSRX; i++) + net_rx_packets[i] = net_pkt_buf + i * PKTSIZE_ALIGN; +} + +struct netif *net_lwip_get_netif(void) +{ + struct netif *netif, *found = NULL; + + NETIF_FOREACH(netif) { + if (!found) + found = netif; + else + printf("Error: more than one netif in lwIP\n"); + } + return found; +} + +static int get_udev_ipv4_info(struct udevice *dev, ip4_addr_t *ip, + ip4_addr_t *mask, ip4_addr_t *gw) +{ + char *ipstr = "ipaddr\0\0"; + char *maskstr = "netmask\0\0"; + char *gwstr = "gatewayip\0\0"; + int idx = dev_seq(dev); + char *env; + + if (idx < 0 || idx > 99) { + log_err("unexpected idx %d\n", idx); + return -1; + } + + if (idx) { + sprintf(ipstr, "ipaddr%d", idx); + sprintf(maskstr, "netmask%d", idx); + sprintf(gwstr, "gatewayip%d", idx); + } + + ip4_addr_set_zero(ip); + ip4_addr_set_zero(mask); + ip4_addr_set_zero(gw); + + env = env_get(ipstr); + if (env) + ip4addr_aton(env, ip); + + env = env_get(maskstr); + if (env) + ip4addr_aton(env, mask); + + env = env_get(gwstr); + if (env) + ip4addr_aton(env, gw); + + return 0; +} + +static struct netif *new_netif(struct udevice *udev, bool with_ip) +{ + unsigned char enetaddr[ARP_HLEN]; + char hwstr[MAC_ADDR_STRLEN]; + ip4_addr_t ip, mask, gw; + struct netif *netif; + int ret = 0; + bool first_call = true; + + if (!udev) + return NULL; + + if (first_call) { + eth_init_rings(); + /* Pick a valid active device, if any */ + eth_init(); + first_call = false; + } + + if (eth_start_udev(udev) < 0) { + log_err("Could not start %s\n", udev->name); + return NULL; + } + + netif_remove(net_lwip_get_netif()); + + ip4_addr_set_zero(&ip); + ip4_addr_set_zero(&mask); + ip4_addr_set_zero(&gw); + + if (with_ip) + if (get_udev_ipv4_info(udev, &ip, &mask, &gw) < 0) + return NULL; + + eth_env_get_enetaddr_by_index("eth", dev_seq(udev), enetaddr); + ret = snprintf(hwstr, MAC_ADDR_STRLEN, "%pM", enetaddr); + if (ret < 0 || ret >= MAC_ADDR_STRLEN) + return NULL; + + netif = calloc(1, sizeof(struct netif)); + if (!netif) + return NULL; + + netif->name[0] = 'e'; + netif->name[1] = 't'; + + string_to_enetaddr(hwstr, netif->hwaddr); + netif->hwaddr_len = ETHARP_HWADDR_LEN; + debug("adding lwIP netif for %s with hwaddr:%s ip:%s ", udev->name, + hwstr, ip4addr_ntoa(&ip)); + debug("mask:%s ", ip4addr_ntoa(&mask)); + debug("gw:%s\n", ip4addr_ntoa(&gw)); + + if (!netif_add(netif, &ip, &mask, &gw, udev, net_lwip_if_init, + netif_input)) { + printf("error: netif_add() failed\n"); + free(netif); + return NULL; + } + + netif_set_up(netif); + netif_set_link_up(netif); + /* Routing: use this interface to reach the default gateway */ + netif_set_default(netif); + + return netif; +} + +struct netif *net_lwip_new_netif(struct udevice *udev) +{ + return new_netif(udev, true); +} + +struct netif *net_lwip_new_netif_noip(struct udevice *udev) +{ + + return new_netif(udev, false); +} + +void net_lwip_remove_netif(struct netif *netif) +{ + netif_remove(netif); + free(netif); +} + +int net_init(void) +{ + eth_set_current(); + + net_lwip_new_netif(eth_get_dev()); + + return 0; +} + +static struct pbuf *alloc_pbuf_and_copy(uchar *data, int len) +{ + struct pbuf *p, *q; + + /* We allocate a pbuf chain of pbufs from the pool. */ + p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); + if (!p) { + LINK_STATS_INC(link.memerr); + LINK_STATS_INC(link.drop); + return NULL; + } + + for (q = p; q != NULL; q = q->next) { + memcpy(q->payload, data, q->len); + data += q->len; + } + + LINK_STATS_INC(link.recv); + + return p; +} + +int net_lwip_rx(struct udevice *udev, struct netif *netif) +{ + struct pbuf *pbuf; + uchar *packet; + int flags; + int len; + int i; + + if (!eth_is_active(udev)) + return -EINVAL; + + flags = ETH_RECV_CHECK_DEVICE; + for (i = 0; i < ETH_PACKETS_BATCH_RECV; i++) { + len = eth_get_ops(udev)->recv(udev, flags, &packet); + flags = 0; + + if (len > 0) { + pbuf = alloc_pbuf_and_copy(packet, len); + if (pbuf) + netif->input(pbuf, netif); + if (eth_get_ops(udev)->free_pkt) + eth_get_ops(udev)->free_pkt(udev, packet, len); + } + if (len <= 0) + break; + } + if (len == -EAGAIN) + len = 0; + + return len; +} + +void net_process_received_packet(uchar *in_packet, int len) +{ +#if defined(CONFIG_API) || defined(CONFIG_EFI_LOADER) + if (push_packet) + (*push_packet)(in_packet, len); +#endif +} + +u32_t sys_now(void) +{ + return get_timer(0); +} diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c new file mode 100644 index 00000000000..1fa246f55d9 --- /dev/null +++ b/net/lwip/tftp.c @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include + +int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + /* Not implemented */ + return CMD_RET_FAILURE; +} From patchwork Fri Aug 23 13:48:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821726 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387667wrh; Fri, 23 Aug 2024 06:52:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX1nWxI2I/e2QEqRCGf029hhTtRQzVw9XCHE7GZgjV0WrjWtbBajxLtFkB2iX2zrIDc9x10MA==@linaro.org X-Google-Smtp-Source: AGHT+IGvu++wy8xzjMODZ5VWFkT8FVTWafANw1WK8Cm0DTJWnCOtxzd+JBWef7yeIjYW8tB32hT7 X-Received: by 2002:a5d:6247:0:b0:367:4dce:1ff5 with SMTP id ffacd0b85a97d-37311863704mr1417032f8f.32.1724421176351; Fri, 23 Aug 2024 06:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421176; cv=none; d=google.com; s=arc-20160816; b=jVQ4JKTVx8sRQpTbafhqkSzOgpYlGX+HVOde94bG+gmsydMKOf19BisSpjq/S4Bs/o J1zGPCMxwwMU3CBHZ8iIKd33j3+4Dosoe2be5I8pmRcjqXsITmmlarF7ivXHcwUg/+MQ fov4d1AWV7JF1N8+ipJU6YGhAtMDh4gwkYrpwYkHES6YdN4DSRCUQorQN8MKMCJNCmn6 IuMb2XK11EUK44bqOGj/onz4TprkLmLaJ+JuOIo9QtSbvBjXwerc+Qfwund+4eJThDyR T+ykcrr6K5iD9B4YQN9qxXs3y06V5DtDUGmfOLEFDZaxVm10xsceEEUmYe7yASkq09Fc ZoFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0DoFLAGhsexdmcls0b6G/eYJkNCniEV9Ag5G7F6+LLI=; fh=Ymh6WAXfo0kX52YdlWEGnhP2rfyhRQhUAaR+slDc2CM=; b=ZzxOKQHwz1dqIUTlw+l/bFukzquGkgeMJQ4eQdN9NaebmcpIDIeSfHWj063DVCyh4O tcR+yvgl6E/HriscMLTfB0O7aC2IMclttvF4RZNjlZOnPDC4Zn2ETMsQO3Nc6K+W1dmL V7cCd/Ue1t9AGEt8mBR30p/q5SQdMscfkDQTVA1kaPGF1dY9xuXfrr+Rcj2KonQxhIm2 0e2EL9CUkxg4MiYPWobivQt56FY3kmrRt74P3nXVTt0fjqT1aYcy9CzVUWvlWhPI6+1w epVFergr8Z0lL3qWG1K4sJckOoiiGegefjUsZH89PMJ112XN5mOztuuzahxiicJcL+6r EmpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t5rHvGmW; 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-373081fffa8si1523263f8f.412.2024.08.23.06.52.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:52:56 -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=t5rHvGmW; 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 31EC2889EF; Fri, 23 Aug 2024 15:50:07 +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="t5rHvGmW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DC8B7886E7; Fri, 23 Aug 2024 15:50:05 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 6ABE5889BE for ; Fri, 23 Aug 2024 15:49:58 +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-x331.google.com with SMTP id 5b1f17b1804b1-42816ca782dso15525915e9.2 for ; Fri, 23 Aug 2024 06:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724420998; x=1725025798; 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=0DoFLAGhsexdmcls0b6G/eYJkNCniEV9Ag5G7F6+LLI=; b=t5rHvGmWOEgughjIQCfz0B6kWxSwNYILYJwaRpiMWrtdgqx9ncvl19gVXig9BL6aqG ne0z6rptdH61xOM3jzb+0grvj3a9INyGq8cFkein0d8MSUILBsQIseHDg33SF+r6MBNM 73NpKVj6B13hNSmdq/dH7kvFS+x2xAT7GRGSY56HRLSihppcBqGB2VEl9jhyU6U6Yezz S4Ya6fvxM3IBfcm4SbzgV0M/D9jPkzPvcxmAvupA4LC2tIWHv3PfIllnOpmRY5CAYl1D ssSJr75hhZJDcO6kkn9BuwwLChcFor5AOIPkrxbP7Cf0iqXaVmvnRFqloSSvobHZfNxD TMkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724420998; x=1725025798; 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=0DoFLAGhsexdmcls0b6G/eYJkNCniEV9Ag5G7F6+LLI=; b=DagVwqYyMxj5XYUyjrSKeBAlgYoD/AYsW6naonQwByNn8u0GWzpP1lstS7Islh4WKj wYvbuX+2wxEXfbOhRMw74UQuns8Rx+1d55c77zKCu665y7H4VF92SR25y7QaR7JcHxQU s3EwdPkc2DlULcqsU2reDCcnNiIsFE+t0GmGDZZ0Dm/0uoUhRUtcoHyZmjvNej2+5Y1q iYp8p6oQT+NIoWmr3ZqI2wW/dBxm4Fih9/eBte+k3KQRwzl7S0/EQ095CLsqxepL0VUJ 5dfr0BIaO2MFz7jmKsZ3eaUOryjjApJtwxjbFgnoeE+GCJDFdowKgTlVsR+GLft9DY0h g7Wg== X-Gm-Message-State: AOJu0Yzaun8DZnBtmZqy9Xh5R+tpp9sFF3xc8R5N32rlrCs+LapxpN7A QR3lO4lewul84SfLFEh8i1VcP7YjexQMQJjkctT5+J+pXbvUYONmXju3vkpO7EIar+bUIy/iKy6 DFbCH3eTz X-Received: by 2002:a5d:5409:0:b0:371:87d4:8f12 with SMTP id ffacd0b85a97d-37311855d45mr1463822f8f.17.1724420997660; Fri, 23 Aug 2024 06:49:57 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:57 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , AKASHI Takahiro , Heinrich Schuchardt , Masahisa Kojima , Sean Anderson , Marek Vasut Subject: [PATCH v9 21/37] net-lwip: add TFTP support and tftpboot command Date: Fri, 23 Aug 2024 15:48:25 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Implement do_tftpb(). This implementation of the tftp command supports an optional port number. For example: tftp 192.168.0.30:9069:file.bin It also supports taking the server IP from ${tftpserverip} if defined, before falling back to ${serverip}. Signed-off-by: Jerome Forissier --- cmd/Kconfig | 3 +- cmd/net-lwip.c | 8 ++ include/net-common.h | 4 + include/net-lwip.h | 4 + net/lwip/dhcp.c | 11 +- net/lwip/net-lwip.c | 16 +++ net/lwip/tftp.c | 279 ++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 319 insertions(+), 6 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 4084ecf0dfd..fd841cd4e53 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2108,10 +2108,9 @@ config CMD_MDIO config CMD_TFTPBOOT bool "tftp" select PROT_UDP_LWIP if NET_LWIP - default n + default y help tftpboot - load file via network using TFTP protocol - Currently a placeholder (not implemented) when NET_LWIP=y. endif # if CMD_NET diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index 82edb5fd2e6..80f0872bb8f 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -11,3 +11,11 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); #endif + +#if defined(CONFIG_CMD_TFTPBOOT) +U_BOOT_CMD( + tftpboot, 3, 0, do_tftpb, + "boot image via network using TFTP protocol\n", + "[loadAddress] [[hostIPaddr:]bootfilename]" +); +#endif diff --git a/include/net-common.h b/include/net-common.h index 43bc6b9a0d5..77d9fff18d2 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -440,6 +440,10 @@ static inline struct in_addr env_get_ip(char *var) int net_init(void); +/* NET compatibility */ +enum proto_t; +int net_loop(enum proto_t protocol); + /** * dhcp_run() - Run DHCP on the current ethernet device * diff --git a/include/net-lwip.h b/include/net-lwip.h index cfd06726577..37744b0e2cd 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -6,6 +6,10 @@ #include #include +enum proto_t { + TFTPGET +}; + struct netif *net_lwip_new_netif(struct udevice *udev); struct netif *net_lwip_new_netif_noip(struct udevice *udev); void net_lwip_remove_netif(struct netif *netif); diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c index e492ad82a9b..2b5d51924af 100644 --- a/net/lwip/dhcp.c +++ b/net/lwip/dhcp.c @@ -114,11 +114,20 @@ int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) int dhcp_run(ulong addr, const char *fname, bool autoload) { char *dhcp_argv[] = {"dhcp", NULL, }; +#ifdef CONFIG_CMD_TFTPBOOT + char *tftp_argv[] = {"tftpboot", boot_file_name, NULL, }; +#endif struct cmd_tbl cmdtp = {}; /* dummy */ if (autoload) { - /* Will be supported when TFTP is added */ +#ifdef CONFIG_CMD_TFTPBOOT + /* Assume DHCP was already performed */ + if (boot_file_name[0]) + return do_tftpb(&cmdtp, 0, 2, tftp_argv); + return 0; +#else return -EOPNOTSUPP; +#endif } return do_dhcp(&cmdtp, 0, 1, dhcp_argv); diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index fa4ad2a65f8..dd8e3deeff4 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -24,6 +24,7 @@ static uchar net_pkt_buf[(PKTBUFSRX) * PKTSIZE_ALIGN + PKTALIGN]; uchar *net_rx_packets[PKTBUFSRX]; uchar *net_rx_packet; const u8 net_bcast_ethaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +char net_boot_file_name[1024]; static err_t linkoutput(struct netif *netif, struct pbuf *p) { @@ -280,6 +281,21 @@ void net_process_received_packet(uchar *in_packet, int len) #endif } +int net_loop(enum proto_t protocol) +{ + char *argv[1]; + + switch (protocol) { + case TFTPGET: + argv[0] = "tftpboot"; + return do_tftpb(NULL, 0, 1, argv); + default: + return -EINVAL; + } + + return -EINVAL; +} + u32_t sys_now(void) { return get_timer(0); diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c index 1fa246f55d9..50b8fbad00d 100644 --- a/net/lwip/tftp.c +++ b/net/lwip/tftp.c @@ -2,10 +2,283 @@ /* Copyright (C) 2024 Linaro Ltd. */ #include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PROGRESS_PRINT_STEP_BYTES (10 * 1024) + +enum done_state { + NOT_DONE = 0, + SUCCESS = 1, + FAILURE = 2 +}; + +struct tftp_ctx { + ulong daddr; + ulong size; + ulong block_count; + ulong start_time; + enum done_state done; +}; + +static void *tftp_open(const char *fname, const char *mode, u8_t is_write) +{ + return NULL; +} + +static void tftp_close(void *handle) +{ + struct tftp_ctx *ctx = handle; + ulong elapsed; + + if (ctx->done == FAILURE) { + /* Closing after an error */ + return; + } + ctx->done = SUCCESS; + + elapsed = get_timer(ctx->start_time); + if (elapsed > 0) { + puts("\n\t "); /* Line up with "Loading: " */ + print_size(ctx->size / elapsed * 1000, "/s"); + } + puts("\ndone\n"); + printf("Bytes transferred = %lu (%lx hex)\n", ctx->size, ctx->size); + + if (env_set_hex("filesize", ctx->size)) { + log_err("filesize not updated\n"); + return; + } +} + +static int tftp_read(void *handle, void *buf, int bytes) +{ + return 0; +} + +static int tftp_write(void *handle, struct pbuf *p) +{ + struct tftp_ctx *ctx = handle; + struct pbuf *q; + + for (q = p; q != NULL; q = q->next) { + memcpy((void *)ctx->daddr, q->payload, q->len); + ctx->daddr += q->len; + ctx->size += q->len; + ctx->block_count++; + if (ctx->block_count % 10 == 0) { + putc('#'); + if (ctx->block_count % (65 * 10) == 0) + puts("\n\t "); + } + } + + return 0; +} + +static void tftp_error(void *handle, int err, const char *msg, int size) +{ + struct tftp_ctx *ctx = handle; + char message[100]; + + ctx->done = FAILURE; + memset(message, 0, sizeof(message)); + memcpy(message, msg, LWIP_MIN(sizeof(message) - 1, (size_t)size)); + + printf("\nTFTP error: %d (%s)\n", err, message); +} + +static const struct tftp_context tftp_context = { + tftp_open, + tftp_close, + tftp_read, + tftp_write, + tftp_error +}; + +static int tftp_loop(struct udevice *udev, ulong addr, char *fname, + ip_addr_t srvip, uint16_t srvport) +{ + struct netif *netif; + struct tftp_ctx ctx; + err_t err; + + if (!fname || addr == 0) + return -1; + + if (!srvport) + srvport = TFTP_PORT; + + netif = net_lwip_new_netif(udev); + if (!netif) + return -1; + + ctx.done = NOT_DONE; + ctx.size = 0; + ctx.block_count = 0; + ctx.daddr = addr; + + printf("Using %s device\n", udev->name); + printf("TFTP from server %s; our IP address is %s\n", + ip4addr_ntoa(&srvip), env_get("ipaddr")); + printf("Filename '%s'.\n", fname); + printf("Load address: 0x%lx\n", ctx.daddr); + printf("Loading: "); + + err = tftp_init_client(&tftp_context); + if (!(err == ERR_OK || err == ERR_USE)) + log_err("tftp_init_client err: %d\n", err); + + ctx.start_time = get_timer(0); + err = tftp_get(&ctx, &srvip, srvport, fname, TFTP_MODE_OCTET); + /* might return different errors, like routing problems */ + if (err != ERR_OK) { + printf("tftp_get() error %d\n", err); + net_lwip_remove_netif(netif); + return -1; + } + + while (!ctx.done) { + net_lwip_rx(udev, netif); + sys_check_timeouts(); + if (ctrlc()) + break; + } + + tftp_cleanup(); + + net_lwip_remove_netif(netif); + + if (ctx.done == SUCCESS) { + if (env_set_hex("fileaddr", addr)) { + log_err("fileaddr not updated\n"); + return -1; + } + efi_set_bootdev("Net", "", fname, map_sysmem(addr, 0), + ctx.size); + return 0; + } + + return -1; +} int do_tftpb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - /* Not implemented */ - return CMD_RET_FAILURE; + char *arg = NULL; + char *words[3] = { }; + char *fname = NULL; + char *server_ip = NULL; + char *server_port = NULL; + char *end; + ip_addr_t srvip; + uint16_t port = TFTP_PORT; + ulong laddr; + ulong addr; + int ret; + int i; + + laddr = env_get_ulong("loadaddr", 16, image_load_addr); + + switch (argc) { + case 1: + fname = env_get("bootfile"); + break; + case 2: + /* + * Only one arg - accept two forms: + * Just load address, or just boot file name. The latter + * form must be written in a format which can not be + * mis-interpreted as a valid number. + */ + addr = hextoul(argv[1], &end); + if (end == (argv[1] + strlen(argv[1]))) { + laddr = addr; + fname = env_get("bootfile"); + } else { + arg = strdup(argv[1]); + } + break; + case 3: + laddr = hextoul(argv[1], NULL); + arg = strdup(argv[2]); + break; + default: + ret = CMD_RET_USAGE; + goto out; + } + + if (!arg) + arg = net_boot_file_name; + + if (arg) { + /* Parse [ip:[port:]]fname */ + i = 0; + while ((*(words + i) = strsep(&arg,":"))) + i++; + + switch (i) { + case 3: + server_ip = words[0]; + server_port = words[1]; + fname = words[2]; + break; + case 2: + server_ip = words[0]; + fname = words[1]; + break; + case 1: + fname = words[0]; + break; + default: + break; + } + } + + if (!server_ip) + server_ip = env_get("tftpserverip"); + if (!server_ip) + server_ip = env_get("serverip"); + if (!server_ip) { + log_err("error: tftpserverip/serverip has to be set\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + if (server_port) + port = dectoul(server_port, NULL); + + if (!ipaddr_aton(server_ip, &srvip)) { + log_err("error: ipaddr_aton\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + if (!fname) { + log_err("error: no file name\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + if (!laddr) { + log_err("error: no load address\n"); + ret = CMD_RET_FAILURE; + goto out; + } + + eth_set_current(); + + if (tftp_loop(eth_get_dev(), laddr, fname, srvip, port) < 0) + ret = CMD_RET_FAILURE; +out: + free(arg); + return ret; } From patchwork Fri Aug 23 13:48:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821725 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387600wrh; Fri, 23 Aug 2024 06:52:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUXBuLbg4Wy2iYQdS9ZR/weVckuZIo80DpMAKhkvyrwIBCSzWlaMk/DVamc446GY0SeYcxJCw==@linaro.org X-Google-Smtp-Source: AGHT+IGyCo2QjLddZug0QU6n7DP0WXA4yXu4vRsVhGzSJKopty14mUUBm/X0ZEpL+G7Wu2vhbHPy X-Received: by 2002:a5d:4a8c:0:b0:368:4218:a3d with SMTP id ffacd0b85a97d-37311865dcemr1611771f8f.37.1724421164857; Fri, 23 Aug 2024 06:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421164; cv=none; d=google.com; s=arc-20160816; b=mr6odgz+JP02MOwrt5BjrvbHKGgQKrg1J+N3wxQZfOQfL8WbqRySxQAuYe/5BwL3/q lvXiH6Rdm2R1SE4+7ZwohwNn/yBsu+vZ3dh/Z5VvCB2PU21V50oc3e8xVHlgJ5NrPjyt 9+inFk0Jj/lrC+wB7ZZu4vIXuGucFbdu242Arug61BVQBFttmCsx+nZvKVJuSZVRJGUF VPy9+Z0PqJwd09k02ykJFw9KeMvK7RRpnwTjfWv8WXqfYEHTkAOm0WtkfxyLK/GzTgIC 7RgwnNb8c4hRqW9z3Jw2d52RICAJNqUc497+1yMe0hIJ3ePZW/rpuHv8WEtonU7YJKnc rNcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b+hKskSAPWMhVKbD/Dci90UIMnAT5dQAjjITjvSQQKs=; fh=M1S23L4OuXqF/0xVUVC1y8b6k04LnWuSUlGL53OIcXM=; b=JyCZ+gf1C6EdVtHBSsK3/B/R+mKSXwIfCZ6kwcU70ivNWJJWWxtgd7obpI+oWcSk+3 nk8N3P/y1UpwsPib21N7m2+sO8rG6f4LdJkaXzG7u+U68YWZDk3ziqWewJ6P2Pw5NMcX QWRC/r8Q/qRSK3Ud0oig0BDqc8d5z5F+y38KdfNlveNvLiEmjJPghkXQPo9SJ91P3gQz pDO6iVrreMjqf4ReaqNjsVvHFm6ic82/C8sZwJuO06Uoh9Ls9ZsG3ZweFI3LELOuzC+v yNrHtge2Ef6u+OOh9dwKb50ZRPMrcrwYVgzHHBPNYvK+I/F8UbVZT1emk8SjBTfLAkGS cL8g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mgk7E4kt; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-37308118002si1505229f8f.34.2024.08.23.06.52.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:52:44 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mgk7E4kt; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 C32FD88C1B; Fri, 23 Aug 2024 15:50:03 +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="mgk7E4kt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7943288C0F; Fri, 23 Aug 2024 15:50:02 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 6EC86889D2 for ; Fri, 23 Aug 2024 15:50:00 +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-x332.google.com with SMTP id 5b1f17b1804b1-42819654737so15568985e9.1 for ; Fri, 23 Aug 2024 06:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421000; x=1725025800; 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=b+hKskSAPWMhVKbD/Dci90UIMnAT5dQAjjITjvSQQKs=; b=mgk7E4kt/RO3SFgvYMJaO+geg52ghzHHopa+vZ/vJ0q4qqlFA+P89uNkNZKwZxKbdT IUGIA3FbHypwXeDtPu1QS5Tw3/xz3JDHMn/RA/rlj1UsGjkuh/HZFJdmfUZwRyeyho5E LxmBEjmg4EpWdIwbYrVb5H9mYih6zb5c6/Jzc/vGjHZbloUKEjIUVVUkRWIdp/B/33v8 RxxUraoH55jgPu+kH6As9cLW/ZhCRIJ306Vcdq6+hS6eOgGSxH2BexWxX3zdTkUPMhZY wKGmh2AKbXTMwORYvchl7UFP2zRJOoIiNVFL6gXesCMt1Y2Cs9U1TCtBP7EtS2Eq8rbi vIyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421000; x=1725025800; 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=b+hKskSAPWMhVKbD/Dci90UIMnAT5dQAjjITjvSQQKs=; b=BMl4Zd8eCozz19Sv5Z3veIL86TdW2SXBtHGKLaUBvrwa+MbZ3aJbjioyqeGOFpTKam ZbXrlMavDs/inpdoLzXgRU7/aLLTaPfeIAzR+tjxRfG/csAW+wP1DIP6pWzRIL9McvX2 mQnhWuCMbhKhtNKou8dONK5mV6iNbPoGIGwqlNWJM810fRwtX0VVIrmZujmF/qKutgYM qTwMCULiy8eKmC15bXQBmw/zqoAuorigrSSNNp0XkdpvaQEZOrwEnNzsbIUYf8G6YGE1 4rmubZayXCsb5/Yb4wOziexoLKpdFjWwqw4raqa1Xosbbxcs/7Z+RCy0myj7yY2ElTMO Qayw== X-Gm-Message-State: AOJu0Yw6TtlXgcsTyIy42WxLGa65mUcXSGh54vfTTbfwvL1uI6OaPf/F S6w3ZDcxbko0/HqQLqjonlTOXhU3RRBUzjj/UjU76tW9YKojWJaD3v4pSytAxOAp/tApdqFCRLi lSYDV6tOZ X-Received: by 2002:a05:600c:348a:b0:426:5e91:3ff1 with SMTP id 5b1f17b1804b1-42acd5da9a7mr15725205e9.24.1724420999629; Fri, 23 Aug 2024 06:49:59 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:49:59 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , Heinrich Schuchardt , AKASHI Takahiro Subject: [PATCH v9 22/37] net-lwip: add ping command Date: Fri, 23 Aug 2024 15:48:26 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 support for the the ping command with NET_LWIP. The implementation is derived from lwIP's contrib/apps/ping/ping.c. Signed-off-by: Jerome Forissier --- cmd/Kconfig | 11 +-- cmd/net-lwip.c | 8 ++ include/net-lwip.h | 1 + net/lwip/Makefile | 1 + net/lwip/ping.c | 177 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 net/lwip/ping.c diff --git a/cmd/Kconfig b/cmd/Kconfig index fd841cd4e53..844f3d25c4e 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2000,11 +2000,6 @@ config CMD_WGET wget is a simple command to download kernel, or other files, from a http server over TCP. -config CMD_PING - bool "ping" - help - Send ICMP ECHO_REQUEST to network host - config CMD_PING6 bool "ping6" depends on IPV6 @@ -2105,6 +2100,12 @@ config CMD_MDIO The MDIO interface is orthogonal to the MII interface and extends it by adding access to more registers through indirect addressing. +config CMD_PING + bool "ping" + select PROT_RAW_LWIP if NET_LWIP + help + Send ICMP ECHO_REQUEST to network host + config CMD_TFTPBOOT bool "tftp" select PROT_UDP_LWIP if NET_LWIP diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index 80f0872bb8f..feed719beef 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -12,6 +12,14 @@ U_BOOT_CMD( ); #endif +#if defined(CONFIG_CMD_PING) +U_BOOT_CMD( + ping, 2, 1, do_ping, + "send ICMP ECHO_REQUEST to network host", + "pingAddress" +); +#endif + #if defined(CONFIG_CMD_TFTPBOOT) U_BOOT_CMD( tftpboot, 3, 0, do_tftpb, diff --git a/include/net-lwip.h b/include/net-lwip.h index 37744b0e2cd..9aa371e962c 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -17,5 +17,6 @@ struct netif *net_lwip_get_netif(void); int net_lwip_rx(struct udevice *udev, struct netif *netif); int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/net/lwip/Makefile b/net/lwip/Makefile index 4e92a101ddb..b5af37a9b18 100644 --- a/net/lwip/Makefile +++ b/net/lwip/Makefile @@ -2,4 +2,5 @@ ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o obj-$(CONFIG_CMD_DHCP) += dhcp.o +obj-$(CONFIG_CMD_PING) += ping.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o diff --git a/net/lwip/ping.c b/net/lwip/ping.c new file mode 100644 index 00000000000..8dafa25959f --- /dev/null +++ b/net/lwip/ping.c @@ -0,0 +1,177 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PING_DELAY_MS 1000 +#define PING_COUNT 5 +/* Ping identifier - must fit on a u16_t */ +#define PING_ID 0xAFAF + +struct ping_ctx { + ip_addr_t target; + struct raw_pcb *pcb; + struct icmp_echo_hdr *iecho; + uint16_t seq_num; + bool alive; +}; + +static u8_t ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, + const ip_addr_t *addr) +{ + struct ping_ctx *ctx = arg; + struct icmp_echo_hdr *iecho = ctx->iecho; + + if (addr->addr != ctx->target.addr) + return 0; + + if ((p->tot_len >= (IP_HLEN + sizeof(struct icmp_echo_hdr))) && + pbuf_remove_header(p, IP_HLEN) == 0) { + iecho = (struct icmp_echo_hdr *)p->payload; + + if ((iecho->id == PING_ID) && + (iecho->seqno == lwip_htons(ctx->seq_num))) { + ctx->alive = true; + printf("host %s is alive\n", ipaddr_ntoa(addr)); + pbuf_free(p); + return 1; /* eat the packet */ + } + /* not eaten, restore original packet */ + pbuf_add_header(p, IP_HLEN); + } + + return 0; /* don't eat the packet */ +} + +static int ping_raw_init(struct ping_ctx *ctx) +{ + ctx->pcb = raw_new(IP_PROTO_ICMP); + if (!ctx->pcb) + return -ENOMEM; + + raw_recv(ctx->pcb, ping_recv, ctx); + raw_bind(ctx->pcb, IP_ADDR_ANY); + + return 0; +} + +static void ping_raw_stop(struct ping_ctx *ctx) +{ + if (ctx->pcb) + raw_remove(ctx->pcb); +} + +static void ping_prepare_echo(struct ping_ctx *ctx) +{ + struct icmp_echo_hdr *iecho = ctx->iecho; + + ICMPH_TYPE_SET(iecho, ICMP_ECHO); + ICMPH_CODE_SET(iecho, 0); + iecho->chksum = 0; + iecho->id = PING_ID; + iecho->seqno = lwip_htons(ctx->seq_num); + + iecho->chksum = inet_chksum(iecho, sizeof(*iecho)); +} + +static void ping_send_icmp(struct ping_ctx *ctx) +{ + struct pbuf *p; + size_t ping_size = sizeof(struct icmp_echo_hdr); + + p = pbuf_alloc(PBUF_IP, (u16_t)ping_size, PBUF_RAM); + if (!p) + return; + + if ((p->len == p->tot_len) && !p->next) { + ctx->iecho = (struct icmp_echo_hdr *)p->payload; + ping_prepare_echo(ctx); + raw_sendto(ctx->pcb, p, &ctx->target); + } + + pbuf_free(p); +} + +static void ping_send(void *arg) +{ + struct ping_ctx *ctx = arg; + + ctx->seq_num++; + if (ctx->seq_num <= PING_COUNT) { + ping_send_icmp(ctx); + sys_timeout(PING_DELAY_MS, ping_send, ctx); + } +} + +static int ping_loop(struct udevice *udev, const ip_addr_t* addr) +{ + struct ping_ctx ctx = {}; + struct netif *netif; + int ret; + + netif = net_lwip_new_netif(udev); + if (!netif) + return CMD_RET_FAILURE; + + printf("Using %s device\n", udev->name); + + ret = ping_raw_init(&ctx); + if (ret < 0) { + net_lwip_remove_netif(netif); + return ret; + } + + ctx.target = *addr; + + ping_send(&ctx); + + do { + sys_check_timeouts(); + net_lwip_rx(udev, netif); + if (ctx.alive) + break; + if (ctrlc()) { + printf("\nAbort\n"); + break; + } + } while (ctx.seq_num <= PING_COUNT); + + sys_untimeout(ping_send, &ctx); + ping_raw_stop(&ctx); + + net_lwip_remove_netif(netif); + + if (ctx.alive) + return 0; + + printf("ping failed; host %s is not alive\n", ipaddr_ntoa(addr)); + return -1; +} + +int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + ip_addr_t addr; + + if (argc < 2) + return CMD_RET_USAGE; + + if (!ipaddr_aton(argv[1], &addr)) + return CMD_RET_USAGE; + + eth_set_current(); + + if (ping_loop(eth_get_dev(), &addr) < 0) + return CMD_RET_FAILURE; + + return CMD_RET_SUCCESS; +} From patchwork Fri Aug 23 13:48:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821727 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387739wrh; Fri, 23 Aug 2024 06:53:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXN6Sjt6+b6wXxbCQfJmEVYZ2btb8iPw3NQOEYTGVOmfrUmWDzhfMZFFi4RQ7fnQ3nHtou8iQ==@linaro.org X-Google-Smtp-Source: AGHT+IFiS2h/IQHMqts6juoq4XaY7mdrHcq9omDlHoTZId8/YTCimST52Q0paVmFIQ9WPLKYpK3K X-Received: by 2002:a05:6000:2ad:b0:371:8484:57d7 with SMTP id ffacd0b85a97d-3731185e93amr1524496f8f.15.1724421187483; Fri, 23 Aug 2024 06:53:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421187; cv=none; d=google.com; s=arc-20160816; b=mQiGhd5JQ5d7XH9WYDdYy+2YeP/sDR09sZ6946N0LszMq8Nqc/j5Dgloeit1r+NZXX rEfaNbIZp09fXtKaYECMQm3MAbWLW5AoWe07gNbgp5gtkn3dQ8mmdYml8zpMwthJBG6I av83EgXoxTPIoLvnXDEbpRu9BgFwWf/eeJnfsLep0fM/V1m56YvQIAGp6G+mxCeuRzqm ctCcvZedEaMkHtlmXPTCF+zajjbp6Ai78+PvafG9TICzehbqdfVazaHQu3oGmLsbfVUd 40rQ7JkVUUelKJq+IM9aMj6aXL7d/sux2uwzsjeof0yuW9mv+qtCQ9mkKd59nhnHE7FJ OMVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4Q9o4LJ2CV2mJ+viCkcpBOVUDzsXjP4iNVa2VdSAluA=; fh=Npu+gD/Goq5lITR8C++Do9EJooTFKHb/914IcqrF34I=; b=yzJELeHrtemOg1qoNYrOM+sNbO35nW1IkyUAAyJAMnWhmjg5Tg8dokNjDeOPnlj51E bETZ1bJiVCsOg5ei5Is72LhhFgIMsbd3dpv1gxM6fjh2Ncx7mfuZGLCjDE0Z/zV8bd/9 wx1RwTHRVWU9fVYmQyVigyjFl4bpmQylbEFdROh9qNNphH0wPh3voqOiJTuzF7nFSkxm NjQLxN0zRBqcoFyowDIsOjvBbh2XMevYLS9YtvXgcnTzX+8i7sg60yC5CZ9/TCs+4F8U cNjZH9DPUt3HSqkxD4mOni/DRSBgugvesZlDxfw9ZHWCCMd1fRTMUltAjUlVxJydfDH0 4gjQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q346D5gF; 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-3730821aef5si1499517f8f.517.2024.08.23.06.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:53:07 -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=Q346D5gF; 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 92251889BE; Fri, 23 Aug 2024 15:50:08 +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="Q346D5gF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 69B80889D2; Fri, 23 Aug 2024 15:50:06 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 6D62F88C0B for ; Fri, 23 Aug 2024 15:50:02 +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-wr1-x42f.google.com with SMTP id ffacd0b85a97d-36d2a601c31so1062575f8f.0 for ; Fri, 23 Aug 2024 06:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421002; x=1725025802; 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=4Q9o4LJ2CV2mJ+viCkcpBOVUDzsXjP4iNVa2VdSAluA=; b=Q346D5gFo7DVyzUCingemB/Jp7wq9VyrJRNhikBuRNhOkdeul3B43Wo9o8CoQJPfXm mSe7YWHFKKpuQP6GCuGujadDiKgXr/bV2hLRfQkBewz2mPyqDTgShnja55i7+/kBkwUr TlhMq8ESlxiaguzz07Xul89nZg9w+OkUeEpc/dC7kjOtujXBvUsmdi0EYgKi5aWHojkq JehvhlJ2VN91E4lL2dsNs2eAtpg5olpZvny4zA4K0+QRk0dVejSTxCNaWwpjVqah00BH 9I4tKGQwJlroEltvoIoUN+/pKV52tttOTMJyS1kY5LzH+x5hMHAQvFXBVGKCDfLAZxE3 YNzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421002; x=1725025802; 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=4Q9o4LJ2CV2mJ+viCkcpBOVUDzsXjP4iNVa2VdSAluA=; b=gdElMsj0GTtfe3sOPlDuxuzweEBc8+ZKH6gwcgr9CF/38RUP5rM9lwT1n8yiyse+dT MiqVE7vLyXXYzg7EaOXI8dtiwf5NZ165C0kw9mu5zrWONr3N9TLzHSe8UogdU6O5mELB fFFshMBpqMDYMry6l+CEpTauZ3XqIoyG1yUDwDPZtQmrrwMvQMOqWV3x0I/DiZBTTLu3 dBctLdbZNIh0eFI70FtRhLQtGjjjTD+rZE4bNkuzAqc+PNsjEjIhSiYFhiuJ8WPF5GtF 6xc0S562BDZCuv6kbPC+KUn9jc9vUlUeot5itezbAcuQ1itw4c7xznAFXhvUtc+aPnxd OEXA== X-Gm-Message-State: AOJu0YxK1TZWYkNmYnn42bNcZD42tFuxRGFOKbNeiJvGJMKmNO/EUrCM cj4mj+KIoFdDVBgoXMiAsVc8GtPygxvkeOHgOUE77Y0E+NqFdXViNjilF0w74bNpShQTXIOsAlE Mf9p6bREF X-Received: by 2002:a05:6000:c:b0:371:8bc9:1682 with SMTP id ffacd0b85a97d-37311878906mr1673593f8f.33.1724421001553; Fri, 23 Aug 2024 06:50:01 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:01 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , AKASHI Takahiro , Heinrich Schuchardt Subject: [PATCH v9 23/37] net-lwip: add dns command Date: Fri, 23 Aug 2024 15:48:27 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 CMD_DNS when NET_LWIP is enabled to provide the dns command using lwIP. Signed-off-by: Jerome Forissier --- cmd/Kconfig | 11 ++-- cmd/net-lwip.c | 8 +++ include/net-lwip.h | 1 + net/lwip/Makefile | 1 + net/lwip/dns.c | 127 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 143 insertions(+), 5 deletions(-) create mode 100644 net/lwip/dns.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 844f3d25c4e..b26beb56fa2 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -2018,11 +2018,6 @@ config CMD_SNTP help Synchronize RTC via network -config CMD_DNS - bool "dns" - help - Lookup the IP of a hostname - config CMD_LINK_LOCAL bool "linklocal" select LIB_RAND @@ -2077,6 +2072,12 @@ config CMD_DHCP help Boot image via network using DHCP/TFTP protocol +config CMD_DNS + bool "dns" + select PROT_DNS_LWIP if NET_LWIP + help + Lookup the IP of a hostname + config CMD_MII bool "mii" imply CMD_MDIO diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index feed719beef..c021da6a674 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -27,3 +27,11 @@ U_BOOT_CMD( "[loadAddress] [[hostIPaddr:]bootfilename]" ); #endif + +#if defined(CONFIG_CMD_DNS) +U_BOOT_CMD( + dns, 3, 1, do_dns, + "lookup the IP of a hostname", + "hostname [envvar]" +); +#endif diff --git a/include/net-lwip.h b/include/net-lwip.h index 9aa371e962c..ff9d03b23e8 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -17,6 +17,7 @@ struct netif *net_lwip_get_netif(void); int net_lwip_rx(struct udevice *udev, struct netif *netif); int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/net/lwip/Makefile b/net/lwip/Makefile index b5af37a9b18..645d8a8c457 100644 --- a/net/lwip/Makefile +++ b/net/lwip/Makefile @@ -2,5 +2,6 @@ ccflags-y += -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot obj-$(CONFIG_$(SPL_)DM_ETH) += net-lwip.o obj-$(CONFIG_CMD_DHCP) += dhcp.o +obj-$(CONFIG_CMD_DNS) += dns.o obj-$(CONFIG_CMD_PING) += ping.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o diff --git a/net/lwip/dns.c b/net/lwip/dns.c new file mode 100644 index 00000000000..4b937feaee1 --- /dev/null +++ b/net/lwip/dns.c @@ -0,0 +1,127 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include + +#define DNS_RESEND_MS 1000 +#define DNS_TIMEOUT_MS 10000 + +struct dns_cb_arg { + ip_addr_t host_ipaddr; + const char *var; + bool done; +}; + +static void do_dns_tmr(void *arg) +{ + dns_tmr(); +} + +static void dns_cb(const char *name, const ip_addr_t *ipaddr, void *arg) +{ + struct dns_cb_arg *dns_cb_arg = arg; + char *ipstr = ip4addr_ntoa(ipaddr); + + dns_cb_arg->done = true; + + if (!ipaddr) { + printf("DNS: host not found\n"); + dns_cb_arg->host_ipaddr.addr = 0; + return; + } + + if (dns_cb_arg->var) + env_set(dns_cb_arg->var, ipstr); + + printf("%s\n", ipstr); +} + +static int dns_loop(struct udevice *udev, const char *name, const char *var) +{ + struct dns_cb_arg dns_cb_arg = { }; + bool has_server = false; + struct netif *netif; + ip_addr_t ipaddr; + ip_addr_t ns; + ulong start; + char *nsenv; + int ret; + + dns_cb_arg.var = var; + + netif = net_lwip_new_netif(udev); + if (!netif) + return -1; + + dns_init(); + + nsenv = env_get("dnsip"); + if (nsenv && ipaddr_aton(nsenv, &ns)) { + dns_setserver(0, &ns); + has_server = true; + } + + nsenv = env_get("dnsip2"); + if (nsenv && ipaddr_aton(nsenv, &ns)) { + dns_setserver(1, &ns); + has_server = true; + } + + if (!has_server) { + log_err("No valid name server (dnsip/dnsip2)\n"); + net_lwip_remove_netif(netif); + return CMD_RET_FAILURE; + } + + dns_cb_arg.done = false; + + ret = dns_gethostbyname(name, &ipaddr, dns_cb, &dns_cb_arg); + + if (ret == ERR_OK) { + dns_cb(name, &ipaddr, &dns_cb_arg); + } else if (ret == ERR_INPROGRESS) { + start = get_timer(0); + sys_timeout(DNS_RESEND_MS, do_dns_tmr, NULL); + do { + net_lwip_rx(udev, netif); + if (dns_cb_arg.done) + break; + sys_check_timeouts(); + if (ctrlc()) { + printf("\nAbort\n"); + break; + } + } while (get_timer(start) < DNS_TIMEOUT_MS); + sys_untimeout(do_dns_tmr, NULL); + } + + net_lwip_remove_netif(netif); + + if (dns_cb_arg.done && dns_cb_arg.host_ipaddr.addr != 0) + return CMD_RET_SUCCESS; + + return CMD_RET_FAILURE; +} + +int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + char *name; + char *var = NULL; + + if (argc == 1 || argc > 3) + return CMD_RET_USAGE; + + name = argv[1]; + + if (argc == 3) + var = argv[2]; + + eth_set_current(); + + return dns_loop(eth_get_dev(), name, var); +} From patchwork Fri Aug 23 13:48:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821728 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387816wrh; Fri, 23 Aug 2024 06:53:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjqvfrapBHKzZkT2Yy38IjZy4AIMpVEgbj22RkAmQDXC92atioUqWIv9bP0/6aFEPmjztMWg==@linaro.org X-Google-Smtp-Source: AGHT+IEhL212JH6epzc0ddfTtF6I2T/+j4Ot5rKE6nhb4TH/149H0Igw4XR2NzaOru2ZSd4It4UR X-Received: by 2002:a5d:64aa:0:b0:371:7c68:32e6 with SMTP id ffacd0b85a97d-373118520f8mr1911400f8f.4.1724421197547; Fri, 23 Aug 2024 06:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421197; cv=none; d=google.com; s=arc-20160816; b=Y37FzWCo5EFeS4O4NvK45g2mF4rKEsrZFDF3bgu/dOUI5f0+UzE1RX14+nw0WKE65U fXETr3TRkfWUdoj2IBXizOlDHv4SusVSBeuou/eVcCILrU2JIQ8Bvnt7ymXO7Amr4Ncu UbwrjavtWmC9zxgntEzZcY7a4jIFr8fDiJNxR6kTsA7Fyz4AV/TdOftyBrxCLUcATzY+ vparj/frZ8hM4Xvrzb79H+l5ShVqy3N29v7/+IVpZrBaVPq1k6wHqLVh/AeUnz0wzHdt VDENEuy9jUYXOUMSzgQmR1qtaIMr93AX0Uh3wb6cx5HC0xNFCy1HMkNYKZC4x+8PtUFn 3Seg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LmceqEqwXcI8cbIx3iqWzOsMCyxujqNRD+J/4EB6unE=; fh=uV229O9eY6R+RSXk63rWW7eQ5I5w6sGCNwz3zXCLTTk=; b=dkZYCx+tbTi5pbpo+3qJ4IrK3zCxG46wqVG0WKVzhJGfH1PeAu2HUMbgx5FW5zbO66 WFhdWwwLD9uVDiiW/v9H/t1NI7VDbaITVH5nyKAQHvS0UBCDR7XEdKVm3Sz2PJDRbHek n2zS9PmHH8U81Az9sMi3HoliXayvIOeInRVhzGUJE2CwtwDVzSGq8t/Nb+ItmteIyJ/x TiQMjK7Z+6pTt4GAM+xbRbNLEN12Kf76V7roPbVRF8PxOmpiR/f1WRx7vYgihg2oaUn/ XW9PtbNi8iYP1mILmscdIItqk3/31gSwdMC1NbCRRUuLvAqvvcEf3gov7R1BL3qXD5gk 47Qg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rxx+piT0; 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-373082e7265si1563678f8f.1065.2024.08.23.06.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:53:17 -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=Rxx+piT0; 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 E89E088C10; Fri, 23 Aug 2024 15:50:08 +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="Rxx+piT0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C890B889D2; Fri, 23 Aug 2024 15:50:06 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 CC19788C20 for ; Fri, 23 Aug 2024 15:50:03 +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-x329.google.com with SMTP id 5b1f17b1804b1-4281faefea9so15110595e9.2 for ; Fri, 23 Aug 2024 06:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421003; x=1725025803; 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=LmceqEqwXcI8cbIx3iqWzOsMCyxujqNRD+J/4EB6unE=; b=Rxx+piT0pjPvl8tHz6GHftiBIrt+0bFXD0lTJmHMkyfviqp5pAMU8ka5R85+mUzwRR 0yyY8v0cb+Ga7atMqPX7UBQRlJj0qQBzPHPaUXC87xGCUXOhL2HNee/UMp1MVs1EliAD piZkbuP1cmyawS4LtOp6yED5lHF2GzxdYW42BbgfCfQEbUpQISx0HzkbD1atDtqQAKUa Yymro7BtvgdQD7C8vgDScZXPvG2M8PwXfBdAgwvmovyzOWK6D9CtIa524Ma6mNGRrqhx RTqkC+GnqiJktS08WjIaaOWKPSc2aTiATboYBc2fAaCXjejClY/PgnvgXFX3YNoKllYp G02Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421003; x=1725025803; 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=LmceqEqwXcI8cbIx3iqWzOsMCyxujqNRD+J/4EB6unE=; b=cfPWUfHSkVvlFl43K2FjWr49iQYGmJynYwdMr7rdiALxJsoU8ovvzmOrNKH9x8sE0h EKzuV1Za12d5uUxYGmdU9bGjygu4+sD9Dah2cBlRUfmbiX7heQ4Y4o1Q97sHiQt5GWkW mvrOZTf0JSn5Z2JgK0mWBmVDYpxdfUt02HggjHszy3FY/r6LGHAKBi4O+HmHO5exxLsf 3fVQO5wQb6SvHdQA50UrTtWiKyJd0FpTkpR+X7XWk9yS9KD19p+UK/5JzCX7GPkV4Aiz xktjGvftv3honDnr1xvDW0RB2qg2QrHKBgx6WjjnsUz5s3pDUEP4SfQuj0tanWKiydrP wEbw== X-Gm-Message-State: AOJu0YxUw/uw1ttDh40lTfZRMaXYL/pnPZQRZOVS64GTRid0GMmJmwCP HSeIvtA2+kgPvz4k4pqOAjeInNCq9YZM/qWoiQas+IGK6iIbDE0aJDezwltKBqNwnC6GXYBNxEn W3uH82wWk X-Received: by 2002:a5d:4583:0:b0:368:8015:8a96 with SMTP id ffacd0b85a97d-3731185f2f6mr1526566f8f.16.1724421003024; Fri, 23 Aug 2024 06:50:03 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:02 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Francis Laniel , Heinrich Schuchardt , Johan Jonker , Marek Vasut Subject: [PATCH v9 24/37] net: split cmd/net.c into cmd/net.c and cmd/net-common.c Date: Fri, 23 Aug 2024 15:48:28 +0200 Message-Id: <15c9ec90e74bd019230a493660657c8db5cc8d16.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Extract some code from cmd/net.c that will be useful in a subsequent commit to implement wget with NET_LWIP. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- cmd/Makefile | 5 ++- cmd/net-common.c | 109 ++++++++++++++++++++++++++++++++++++++++++++ cmd/net.c | 115 ----------------------------------------------- 3 files changed, 113 insertions(+), 116 deletions(-) create mode 100644 cmd/net-common.c diff --git a/cmd/Makefile b/cmd/Makefile index fe733cf6ba9..2c3de45a074 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -130,7 +130,10 @@ obj-$(CONFIG_CMD_NAND) += nand.o ifdef CONFIG_CMD_NET obj-$(CONFIG_NET) += net.o obj-$(CONFIG_NET_LWIP) += net-lwip.o -CFLAGS_net-lwip.o := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot +obj-$(filter y,$(CONFIG_CMD_NET) $(CONFIG_CMD_NET_LWIP)) += net-common.o +lwip-includes := -I$(srctree)/lib/lwip/lwip/src/include -I$(srctree)/lib/lwip/u-boot +CFLAGS_net-lwip.o := $(lwip-includes) +CFLAGS_net-common.o := $(lwip-includes) endif obj-$(CONFIG_ENV_SUPPORT) += nvedit.o obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o diff --git a/cmd/net-common.c b/cmd/net-common.c new file mode 100644 index 00000000000..1c9fb83b896 --- /dev/null +++ b/cmd/net-common.c @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2000 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#include +#include +#include +#include +#include +#include + +static int do_net_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + const struct udevice *current = eth_get_dev(); + unsigned char env_enetaddr[ARP_HLEN]; + const struct udevice *dev; + struct uclass *uc; + + uclass_id_foreach_dev(UCLASS_ETH, dev, uc) { + eth_env_get_enetaddr_by_index("eth", dev_seq(dev), env_enetaddr); + printf("eth%d : %s %pM %s\n", dev_seq(dev), dev->name, env_enetaddr, + current == dev ? "active" : ""); + } + return CMD_RET_SUCCESS; +} + +static int do_net_stats(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + int nstats, err, i, off; + struct udevice *dev; + u64 *values; + u8 *strings; + + if (argc < 2) + return CMD_RET_USAGE; + + err = uclass_get_device_by_name(UCLASS_ETH, argv[1], &dev); + if (err) { + printf("Could not find device %s\n", argv[1]); + return CMD_RET_FAILURE; + } + + if (!eth_get_ops(dev)->get_sset_count || + !eth_get_ops(dev)->get_strings || + !eth_get_ops(dev)->get_stats) { + printf("Driver does not implement stats dump!\n"); + return CMD_RET_FAILURE; + } + + nstats = eth_get_ops(dev)->get_sset_count(dev); + strings = kcalloc(nstats, ETH_GSTRING_LEN, GFP_KERNEL); + if (!strings) + return CMD_RET_FAILURE; + + values = kcalloc(nstats, sizeof(u64), GFP_KERNEL); + if (!values) + goto err_free_strings; + + eth_get_ops(dev)->get_strings(dev, strings); + eth_get_ops(dev)->get_stats(dev, values); + + off = 0; + for (i = 0; i < nstats; i++) { + printf(" %s: %llu\n", &strings[off], values[i]); + off += ETH_GSTRING_LEN; + }; + + kfree(strings); + kfree(values); + + return CMD_RET_SUCCESS; + +err_free_strings: + kfree(strings); + + return CMD_RET_FAILURE; +} + +static struct cmd_tbl cmd_net[] = { + U_BOOT_CMD_MKENT(list, 1, 0, do_net_list, "", ""), + U_BOOT_CMD_MKENT(stats, 2, 0, do_net_stats, "", ""), +}; + +static int do_net(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + struct cmd_tbl *cp; + + cp = find_cmd_tbl(argv[1], cmd_net, ARRAY_SIZE(cmd_net)); + + /* Drop the net command */ + argc--; + argv++; + + if (!cp || argc > cp->maxargs) + return CMD_RET_USAGE; + if (flag == CMD_FLAG_REPEAT && !cmd_is_repeatable(cp)) + return CMD_RET_SUCCESS; + + return cp->cmd(cmdtp, flag, argc, argv); +} + +U_BOOT_CMD( + net, 3, 1, do_net, + "NET sub-system", + "list - list available devices\n" + "stats - dump statistics for specified device\n" +); diff --git a/cmd/net.c b/cmd/net.c index 53ce2bc5d0c..c90578e1b9f 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -674,118 +674,3 @@ U_BOOT_CMD( ); #endif /* CONFIG_CMD_LINK_LOCAL */ - -static int do_net_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) -{ - const struct udevice *current = eth_get_dev(); - unsigned char env_enetaddr[ARP_HLEN]; - const struct udevice *dev; - struct uclass *uc; - - uclass_id_foreach_dev(UCLASS_ETH, dev, uc) { - eth_env_get_enetaddr_by_index("eth", dev_seq(dev), env_enetaddr); - printf("eth%d : %s %pM %s\n", dev_seq(dev), dev->name, env_enetaddr, - current == dev ? "active" : ""); - } - return CMD_RET_SUCCESS; -} - -static int do_net_stats(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) -{ - int nstats, err, i, off; - struct udevice *dev; - u64 *values; - u8 *strings; - - if (argc < 2) - return CMD_RET_USAGE; - - err = uclass_get_device_by_name(UCLASS_ETH, argv[1], &dev); - if (err) { - printf("Could not find device %s\n", argv[1]); - return CMD_RET_FAILURE; - } - - if (!eth_get_ops(dev)->get_sset_count || - !eth_get_ops(dev)->get_strings || - !eth_get_ops(dev)->get_stats) { - printf("Driver does not implement stats dump!\n"); - return CMD_RET_FAILURE; - } - - nstats = eth_get_ops(dev)->get_sset_count(dev); - strings = kcalloc(nstats, ETH_GSTRING_LEN, GFP_KERNEL); - if (!strings) - return CMD_RET_FAILURE; - - values = kcalloc(nstats, sizeof(u64), GFP_KERNEL); - if (!values) - goto err_free_strings; - - eth_get_ops(dev)->get_strings(dev, strings); - eth_get_ops(dev)->get_stats(dev, values); - - off = 0; - for (i = 0; i < nstats; i++) { - printf(" %s: %llu\n", &strings[off], values[i]); - off += ETH_GSTRING_LEN; - }; - - return CMD_RET_SUCCESS; - -err_free_strings: - kfree(strings); - - return CMD_RET_FAILURE; -} - -static struct cmd_tbl cmd_net[] = { - U_BOOT_CMD_MKENT(list, 1, 0, do_net_list, "", ""), - U_BOOT_CMD_MKENT(stats, 2, 0, do_net_stats, "", ""), -}; - -static int do_net(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) -{ - struct cmd_tbl *cp; - - cp = find_cmd_tbl(argv[1], cmd_net, ARRAY_SIZE(cmd_net)); - - /* Drop the net command */ - argc--; - argv++; - - if (!cp || argc > cp->maxargs) - return CMD_RET_USAGE; - if (flag == CMD_FLAG_REPEAT && !cmd_is_repeatable(cp)) - return CMD_RET_SUCCESS; - - return cp->cmd(cmdtp, flag, argc, argv); -} - -U_BOOT_CMD( - net, 3, 1, do_net, - "NET sub-system", - "list - list available devices\n" - "stats - dump statistics for specified device\n" -); - -#if defined(CONFIG_CMD_NCSI) -static int do_ncsi(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) -{ - if (!phy_interface_is_ncsi() || !ncsi_active()) { - printf("Device not configured for NC-SI\n"); - return CMD_RET_FAILURE; - } - - if (net_loop(NCSI) < 0) - return CMD_RET_FAILURE; - - return CMD_RET_SUCCESS; -} - -U_BOOT_CMD( - ncsi, 1, 1, do_ncsi, - "Configure attached NIC via NC-SI", - "" -); -#endif /* CONFIG_CMD_NCSI */ From patchwork Fri Aug 23 13:48:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821729 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387894wrh; Fri, 23 Aug 2024 06:53:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUl7NjkHPKRhbh8YjSTQ3POhzqNoL9UG6U4nftCPcwVANBOJ87u2pXI5SY1mGmSt6ngHstZMg==@linaro.org X-Google-Smtp-Source: AGHT+IFiToyi73sYKh2num7teHug4XGeGTuO/dogcJu6JXWAhLP/eOO+32e572FyUV2hXO1x56/k X-Received: by 2002:adf:f752:0:b0:371:935e:a842 with SMTP id ffacd0b85a97d-37311855ba4mr1392095f8f.14.1724421208151; Fri, 23 Aug 2024 06:53:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421208; cv=none; d=google.com; s=arc-20160816; b=v/9RrM5AtOGTMC+LaRyJ95G1Q0VtSgqYAxAjtC4qRZLmAIKGysBE9k7PopqCUpQHRS T9LdaQ7ERl0NAs2Z8AFFIlGz5ENmG3urkIYmbA9nBfSZFe83NDNVKNgcd9YWawea/cAI YKDHuEW3P9OgDN4oJpAOoyGl/PUi0rhmC50KjWryfx3Vb1rVUEhp2vgWNa4v9VEMDIkP LyrL+Gg2CBvefA9SxTq3QSuGWvB+2gUlGDn4ArqWXbAmnvlN1YKaCA42KYsfFOA7gMsk QoVk0Y+HxiIzA6g3wSN7AoaKVwIgKA+DVnKHwGsHvCmv6S5PzN/G+BkseDzMgAs/D6Ca qnYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1Y5D6SO4sB5nqKMjyWKHTvxU6uqds6ckhE/xWTjH3zA=; fh=beRXill8TderJa5IcMdhXLyNh93zy3wRpHR09XGwi4g=; b=1BzEmT8xDyPYbOzIzyeh4FbmVENHVpeJbPil7/SSpK7qm/6x0fdkY+H5FXFkOVN4cn 2PuuZQbjCRB5Aq1R2l9Ullmu9jq2RNLSuy6uFdH2cRAB/9HPzCxFlE6Oi4VMWMl8Md81 EDYC4KU8MYCxnXfXZZx/LaI7O7xeOXGEYpjh3PXHtG1BZ+zstWkYwKAuMl7d4WJtUYES IgLwZ9ormnwl6R/B2jYUzOavA4ZtsLhKevpJZgqjLnYk9Sun0t19xhz0MUaoQxK2VG28 ZniseNniGMaW8Q6p9ezclzPrxhk24ePpU5rMq78kc9ODThzhJVlMKSZPbdwlHTtzDv9p YGRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tTIUQjDF; 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-3730826e9efsi1586289f8f.743.2024.08.23.06.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:53:28 -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=tTIUQjDF; 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 5548288C05; Fri, 23 Aug 2024 15:50:10 +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="tTIUQjDF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 49768889E9; Fri, 23 Aug 2024 15:50:08 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 00A25886E7 for ; Fri, 23 Aug 2024 15:50:05 +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-wr1-x431.google.com with SMTP id ffacd0b85a97d-371893dd249so986321f8f.2 for ; Fri, 23 Aug 2024 06:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421005; x=1725025805; 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=1Y5D6SO4sB5nqKMjyWKHTvxU6uqds6ckhE/xWTjH3zA=; b=tTIUQjDFOJsjFIgrbAXbhIMuHp0gfuYkNUOaU9uuQcdyU7rlcU6q4CUfJOamzypT73 dEAzWrisIQIpt/waA0d6eBluFtDkgTF2HVUNltQlJ5mWnkr/RXtqJgXz650hOBEF1o6C btoWiyM9PRi29xFmeEa++xqHzMWNwSy6Z3JCb7ppfxivORbjgAie67VKx6pRE0w3YZWs 8YeiqLXfMcMiZ5iptMXrmIkxkTTYE5ryLQFUcMeBiwV11rgnYF/rIFnr3z0jzYfDw7Qj 0ADqHZ3Jc5EX7P4wwayqOokz23OCKf7y745A09HNH+JSZSy9UojcURn7IiCYqusnvnx9 wJfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421005; x=1725025805; 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=1Y5D6SO4sB5nqKMjyWKHTvxU6uqds6ckhE/xWTjH3zA=; b=CV9gQ09bPWm+ok52VARdagOfnW0tyIikm0DIDgHoBQy6HP7swN2qfolheFYE7Bv8H1 faOCQri2qIhSz+yK0vGCw3gNHHxgLR1++uchExPTX7EMtEcG+JDwyzr8+nAbR+/a5Y33 pDSm6yQN8t+2V5oJcWSDXtgeBYLYg4EdluTv7Hq24n9REBPOXM+qy8pAmt0Y1R2GDUeg ONAtRSomzN+a6WqyT1/35hhz4pE1S/lI8FUOREAiGQNR4p6f+ThGfEYRyc+55c8cOgBZ cO5GjDefDEMh47cIlLjWaYeEZiAGOc+au4CGx5hdBcV1txP+46C57bLn15rBnojLs0ly K8+Q== X-Gm-Message-State: AOJu0YyWtZYEoebx+id7FvT0X4yA5jAHd79BfebmXUy0BDHd9iFi/UJs ZcKr50KBAOBpwTF9ZFfn8B9hNxmjsxbNTHjwfWnwyYtTmdIXuT4Cs6SDBpEmY4zg/Q3erL0rrHb 73mWdKiiS X-Received: by 2002:a5d:4a0b:0:b0:368:117c:84fd with SMTP id ffacd0b85a97d-37311840527mr1498332f8f.3.1724421005111; Fri, 23 Aug 2024 06:50:05 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:04 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Joe Hershberger , Ramon Fried , Simon Glass , Mattijs Korpershoek , AKASHI Takahiro , Heinrich Schuchardt , Jonathan Humphreys Subject: [PATCH v9 25/37] net-lwip: add wget command Date: Fri, 23 Aug 2024 15:48:29 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 support for the wget command with NET_LWIP. The command normally expects a URL: wget [loadaddr] url, but it also accepts the legacy syntax: wget [loadaddr] [server:]file. The server IP may alternatively be supplied via ${httpserverip} which has higher priority than ${serverip}. Based on code initially developed by Maxim U. Signed-off-by: Jerome Forissier Co-developed-by: Maxim Uvarov Cc: Maxim Uvarov Signed-off-by: Jerome Forissier --- cmd/Kconfig | 16 +- cmd/net-lwip.c | 8 + include/net-lwip.h | 18 +++ net/lwip/Makefile | 1 + net/lwip/wget.c | 363 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 399 insertions(+), 7 deletions(-) create mode 100644 net/lwip/wget.c diff --git a/cmd/Kconfig b/cmd/Kconfig index b26beb56fa2..fcefbbd5df0 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1993,13 +1993,6 @@ config SYS_DISABLE_AUTOLOAD is complete. Enable this option to disable this behavior and instead require files to be loaded over the network by subsequent commands. -config CMD_WGET - bool "wget" - select PROT_TCP - help - wget is a simple command to download kernel, or other files, - from a http server over TCP. - config CMD_PING6 bool "ping6" depends on IPV6 @@ -2114,6 +2107,15 @@ config CMD_TFTPBOOT help tftpboot - load file via network using TFTP protocol +config CMD_WGET + bool "wget" + select PROT_TCP if NET + select PROT_TCP_LWIP if NET_LWIP + select PROT_DNS_LWIP if NET_LWIP + help + wget is a simple command to download kernel, or other files, + from a http server over TCP. + endif # if CMD_NET endif # if NET || NET_LWIP diff --git a/cmd/net-lwip.c b/cmd/net-lwip.c index c021da6a674..42f8bd6b259 100644 --- a/cmd/net-lwip.c +++ b/cmd/net-lwip.c @@ -35,3 +35,11 @@ U_BOOT_CMD( "hostname [envvar]" ); #endif + +#if defined(CONFIG_CMD_WGET) +U_BOOT_CMD( + wget, 3, 1, do_wget, + "boot image via network using HTTP protocol", + "[loadAddress] URL" +); +#endif diff --git a/include/net-lwip.h b/include/net-lwip.h index ff9d03b23e8..1c3583f82a1 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -16,8 +16,26 @@ void net_lwip_remove_netif(struct netif *netif); struct netif *net_lwip_get_netif(void); int net_lwip_rx(struct udevice *udev, struct netif *netif); +/** + * wget_with_dns() - runs dns host IP address resulution before wget + * + * @dst_addr: destination address to download the file + * @uri: uri string of target file of wget + * Return: downloaded file size, negative if failed + */ + +int wget_with_dns(ulong dst_addr, char *uri); +/** + * wget_validate_uri() - varidate the uri + * + * @uri: uri string of target file of wget + * Return: true if uri is valid, false if uri is invalid + */ +bool wget_validate_uri(char *uri); + int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); #endif /* __NET_LWIP_H__ */ diff --git a/net/lwip/Makefile b/net/lwip/Makefile index 645d8a8c457..f2558f8763a 100644 --- a/net/lwip/Makefile +++ b/net/lwip/Makefile @@ -5,3 +5,4 @@ obj-$(CONFIG_CMD_DHCP) += dhcp.o obj-$(CONFIG_CMD_DNS) += dns.o obj-$(CONFIG_CMD_PING) += ping.o obj-$(CONFIG_CMD_TFTPBOOT) += tftp.o +obj-$(CONFIG_CMD_WGET) += wget.o diff --git a/net/lwip/wget.c b/net/lwip/wget.c new file mode 100644 index 00000000000..e8768fc2acd --- /dev/null +++ b/net/lwip/wget.c @@ -0,0 +1,363 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright (C) 2024 Linaro Ltd. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define SERVER_NAME_SIZE 200 +#define HTTP_PORT_DEFAULT 80 +#define PROGRESS_PRINT_STEP_BYTES (100 * 1024) + +enum done_state { + NOT_DONE = 0, + SUCCESS = 1, + FAILURE = 2 +}; + +struct wget_ctx { + char *path; + ulong daddr; + ulong saved_daddr; + ulong size; + ulong prevsize; + ulong start_time; + enum done_state done; +}; + +static int parse_url(char *url, char *host, u16 *port, char **path) +{ + char *p, *pp; + long lport; + + p = strstr(url, "http://"); + if (!p) { + log_err("only http:// is supported\n"); + return -EINVAL; + } + + p += strlen("http://"); + + /* Parse hostname */ + pp = strchr(p, ':'); + if (!pp) + pp = strchr(p, '/'); + if (!pp) + return -EINVAL; + + if (p + SERVER_NAME_SIZE <= pp) + return -EINVAL; + + memcpy(host, p, pp - p); + host[pp - p] = '\0'; + + if (*pp == ':') { + /* Parse port number */ + p = pp + 1; + lport = simple_strtol(p, &pp, 10); + if (pp && *pp != '/') + return -EINVAL; + if (lport > 65535) + return -EINVAL; + *port = (u16)lport; + } else { + *port = HTTP_PORT_DEFAULT; + } + if (*pp != '/') + return -EINVAL; + *path = pp; + + return 0; +} + +/* + * Legacy syntax support + * Convert [:]filename into a URL if needed + */ +static int parse_legacy_arg(char *arg, char *nurl, size_t rem) +{ + char *p = nurl; + size_t n; + char *col = strchr(arg, ':'); + char *env; + char *server; + char *path; + + if (strstr(arg, "http") == arg) { + n = snprintf(nurl, rem, "%s", arg); + if (n < 0 || n > rem) + return -1; + return 0; + } + + n = snprintf(p, rem, "%s", "http://"); + if (n < 0 || n > rem) + return -1; + p += n; + rem -= n; + + if (col) { + n = col - arg; + server = arg; + path = col + 1; + } else { + env = env_get("httpserverip"); + if (!env) + env = env_get("serverip"); + if (!env) { + log_err("error: httpserver/serverip has to be set\n"); + return -1; + } + n = strlen(env); + server = env; + path = arg; + } + + if (rem < n) + return -1; + strncpy(p, server, n); + p += n; + rem -= n; + if (rem < 1) + return -1; + *p = '/'; + p++; + rem--; + n = strlen(path); + if (rem < n) + return -1; + strncpy(p, path, n); + p += n; + rem -= n; + if (rem < 1) + return -1; + *p = '\0'; + + return 0; +} + +static err_t httpc_recv_cb(void *arg, struct altcp_pcb *pcb, struct pbuf *pbuf, + err_t err) +{ + struct wget_ctx *ctx = arg; + struct pbuf *buf; + + if (!pbuf) + return ERR_BUF; + + if (!ctx->start_time) + ctx->start_time = get_timer(0); + + for (buf = pbuf; buf; buf = buf->next) { + memcpy((void *)ctx->daddr, buf->payload, buf->len); + ctx->daddr += buf->len; + ctx->size += buf->len; + if (ctx->size - ctx->prevsize > PROGRESS_PRINT_STEP_BYTES) { + printf("#"); + ctx->prevsize = ctx->size; + } + } + + altcp_recved(pcb, pbuf->tot_len); + pbuf_free(pbuf); + return ERR_OK; +} + +static void httpc_result_cb(void *arg, httpc_result_t httpc_result, + u32_t rx_content_len, u32_t srv_res, err_t err) +{ + struct wget_ctx *ctx = arg; + ulong elapsed; + + if (httpc_result != HTTPC_RESULT_OK) { + log_err("\nHTTP client error %d\n", httpc_result); + ctx->done = FAILURE; + return; + } + if (srv_res != 200) { + log_err("\nHTTP server error %d\n", srv_res); + ctx->done = FAILURE; + return; + } + + elapsed = get_timer(ctx->start_time); + if (!elapsed) + elapsed = 1; + if (rx_content_len > PROGRESS_PRINT_STEP_BYTES) + printf("\n"); + printf("%u bytes transferred in %lu ms (", rx_content_len, elapsed); + print_size(rx_content_len / elapsed * 1000, "/s)\n"); + printf("Bytes transferred = %lu (%lx hex)\n", ctx->size, ctx->size); + efi_set_bootdev("Net", "", ctx->path, map_sysmem(ctx->saved_daddr, 0), + rx_content_len); + if (env_set_hex("filesize", rx_content_len) || + env_set_hex("fileaddr", ctx->saved_daddr)) { + log_err("Could not set filesize or fileaddr\n"); + ctx->done = FAILURE; + return; + } + + ctx->done = SUCCESS; +} + +static int wget_loop(struct udevice *udev, ulong dst_addr, char *uri) +{ + char server_name[SERVER_NAME_SIZE]; + httpc_connection_t conn; + httpc_state_t *state; + struct netif *netif; + struct wget_ctx ctx; + char *path; + u16 port; + + ctx.daddr = dst_addr; + ctx.saved_daddr = dst_addr; + ctx.done = NOT_DONE; + ctx.size = 0; + ctx.prevsize = 0; + ctx.start_time = 0; + + if (parse_url(uri, server_name, &port, &path)) + return CMD_RET_USAGE; + + netif = net_lwip_new_netif(udev); + if (!netif) + return -1; + + memset(&conn, 0, sizeof(conn)); + conn.result_fn = httpc_result_cb; + ctx.path = path; + if (httpc_get_file_dns(server_name, port, path, &conn, httpc_recv_cb, + &ctx, &state)) { + net_lwip_remove_netif(netif); + return CMD_RET_FAILURE; + } + + while (!ctx.done) { + net_lwip_rx(udev, netif); + sys_check_timeouts(); + if (ctrlc()) + break; + } + + net_lwip_remove_netif(netif); + + if (ctx.done == SUCCESS) + return 0; + + return -1; +} + +int wget_with_dns(ulong dst_addr, char *uri) +{ + eth_set_current(); + + return wget_loop(eth_get_dev(), dst_addr, uri); +} + +int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) +{ + char *end; + char *url; + ulong dst_addr; + char nurl[1024]; + + if (argc < 2 || argc > 3) + return CMD_RET_USAGE; + + dst_addr = hextoul(argv[1], &end); + if (end == (argv[1] + strlen(argv[1]))) { + if (argc < 3) + return CMD_RET_USAGE; + url = argv[2]; + } else { + dst_addr = image_load_addr; + url = argv[1]; + } + + if (parse_legacy_arg(url, nurl, sizeof(nurl))) + return CMD_RET_FAILURE; + + if (wget_with_dns(dst_addr, nurl)) + return CMD_RET_FAILURE; + + return CMD_RET_SUCCESS; +} + +/** + * wget_validate_uri() - validate the uri for wget + * + * @uri: uri string + * + * This function follows the current U-Boot wget implementation. + * scheme: only "http:" is supported + * authority: + * - user information: not supported + * - host: supported + * - port: not supported(always use the default port) + * + * Uri is expected to be correctly percent encoded. + * This is the minimum check, control codes(0x1-0x19, 0x7F, except '\0') + * and space character(0x20) are not allowed. + * + * TODO: stricter uri conformance check + * + * Return: true on success, false on failure + */ +bool wget_validate_uri(char *uri) +{ + char c; + bool ret = true; + char *str_copy, *s, *authority; + + for (c = 0x1; c < 0x21; c++) { + if (strchr(uri, c)) { + log_err("invalid character is used\n"); + return false; + } + } + if (strchr(uri, 0x7f)) { + log_err("invalid character is used\n"); + return false; + } + + if (strncmp(uri, "http://", 7)) { + log_err("only http:// is supported\n"); + return false; + } + str_copy = strdup(uri); + if (!str_copy) + return false; + + s = str_copy + strlen("http://"); + authority = strsep(&s, "/"); + if (!s) { + log_err("invalid uri, no file path\n"); + ret = false; + goto out; + } + s = strchr(authority, '@'); + if (s) { + log_err("user information is not supported\n"); + ret = false; + goto out; + } + s = strchr(authority, ':'); + if (s) { + log_err("user defined port is not supported\n"); + ret = false; + goto out; + } + +out: + free(str_copy); + + return ret; +} From patchwork Fri Aug 23 13:48:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821730 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp387955wrh; Fri, 23 Aug 2024 06:53:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV+k0qjR/JkSwdlMhw21D/vsIvEKjx02/g9kdc1xJhWvs/aagJv1fn7sfVf9enEKLL1kmhQiw==@linaro.org X-Google-Smtp-Source: AGHT+IEEcuCUUSpAPpHElSbaDtAnBTfcMmaCdLn3E381Klxm10tbrcq6UnS5Qj7u6ulM8ATEx+7M X-Received: by 2002:a05:600c:348c:b0:426:5440:854a with SMTP id 5b1f17b1804b1-42acc8d0bc5mr16962205e9.1.1724421218714; Fri, 23 Aug 2024 06:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421218; cv=none; d=google.com; s=arc-20240605; b=dJthHJF/as0Qdtcex+09NuRUEdwRTyP5tdZs3BXZx6utd01+cfFNfTEIhPVAM70xyF yrvqX8vy14zb+KebrAR8YIgFdsvIUqqyKairlUxC1CsPA79OEP5gBLWQvwqXAA7Xqsw7 q0BuQDc6MtHRGsXmsn8lRwitQlL7O3W34uSjxupAl/MahbeN3tJnpqGsUHWhwThh9tp/ ql4GOHvhsR5XfuVBgsbEyqGfqiHIjbLjsdi49H0wRHj3bAgDvekTMtQ+nXTHjPYmcwNI 52WaPMqKmCznQqpUTMvZ2hk+GvoTLkQs7gspFTHTkbbm4cQcHRI7N5pg4hMWx3n7HmDv jVLg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OU2VUMRGCTc+MvFx1Y4JV6qJNct5kwe7bvtCsqQAkio=; fh=unfva7WENhDSyGD/OHzzL8mLaBX2u/JXKBZjiHda3XI=; b=KAmcDLcm8gMSoXktQ/zIzBQ5o2nyA4ig27Op+v1LseUW2wf74+Im3hC9CqP/tke5fr u5fq+mNZGhuxA44FbSgVJNSF+dvoAcRyxwTVT7E5srCJi9QSE2gLUAnYzLiHqa/tOUxm SbDezIhl2pczm6JRKxffQpO8s8yX1hm6aWPYjfvlGDGakNJxWlZsHa1ErWJqOlORXu6s 4scG1zkPsBXaE4NQWz3mtXTouy+/kv9ux/UqJd8DnwWbqk0XjJhFp1jtSsoIw7dr/QY/ 1P+Bs908kZE9hCFTNEGtvQHwnreSjhy7PZVMGcSTEo8rVdCvZQfCHsFXMbBhFbJFLCTm /Ekw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QLQvptyc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42ac51618casi18862075e9.96.2024.08.23.06.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:53:38 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QLQvptyc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 A7BD988C42; Fri, 23 Aug 2024 15:50:10 +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="QLQvptyc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 05B0E88C17; Fri, 23 Aug 2024 15:50:09 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 23CD4889D2 for ; Fri, 23 Aug 2024 15:50:07 +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-wr1-x432.google.com with SMTP id ffacd0b85a97d-371936541caso910834f8f.0 for ; Fri, 23 Aug 2024 06:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421006; x=1725025806; 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=OU2VUMRGCTc+MvFx1Y4JV6qJNct5kwe7bvtCsqQAkio=; b=QLQvptycWiIui7gDl6oJduNayUkSjbxx/hO2TlU0qt5Hp4mzNazTovtZwFt+OA4YBD N/OrujlaBpRZlXvA3b6a8MpYufd9IZhhHk4F8W+rknRP/mM1kzUitvKSv388CkTExR2I 8oL2G2zlLEKP+kvWL+VHPzRhqLNrFj0LKfkt75NiaUe9AvTv18SVsGlqe+CHD+/b+7TJ FfL7yjcgDkC+pq6dtft49W+cfoDLNvuCXMStNDllS7ApQvpOzTx4i2hEJ2wnzgbPyP+m acR8JJSSyUZflTGpFpEmwTLOngDdTRU4Ssfc17ct69scWukN3+t3rax77OTD/nfjf2V2 JpOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421006; x=1725025806; 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=OU2VUMRGCTc+MvFx1Y4JV6qJNct5kwe7bvtCsqQAkio=; b=o1/fzXqSa7wfermXlek55gw21ZkXw5XpMvhqY7o+IB8vMCe1ZI1MpIMldeJsX20RTH lEb8raa0ZXuleisR7i/ni46EDpcFEMdE81y1wM+8HTqISDf0UPBElZlhwVI7YKMy6dVl YoPU4A2RzdQsl3Pz9T5KuWqew1A+raYN+jFVYZuSW7PALsXTae//26I932DPu8Hpcm+j F3W/aYpAnMI/yQ+V+eEZtQUG8/Td4lWjo/Ex7zyxr4khhxZbikchbRn/K7pCEwap289x cF6sxRjmPbtzz1XyYx3eeDkjcjuq5s62YzlmKmhe0OqfHTWChHTIu/aqkrrIUeCKuTFU R3vA== X-Gm-Message-State: AOJu0YwhXVOVzhtnGdlRv+4KZ7Mzaige2S73WslD7GXR/tfaCtk1uOTe UeVz1Q2kGxJIkNzsfVLvqzpuZ7BWAxDegN3t21QMOM6BfEj2VrVc9WKdsxt3P5oXnz49AkHSqB5 T1w0/TEu5 X-Received: by 2002:adf:ce88:0:b0:368:7a04:7f5b with SMTP id ffacd0b85a97d-373118d12b0mr1627665f8f.40.1724421006406; Fri, 23 Aug 2024 06:50:06 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:06 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jonathan Humphreys , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini Subject: [PATCH v9 26/37] net-lwip: lwIP wget supports user defined port in the uri, so allow it. Date: Fri, 23 Aug 2024 15:48:30 +0200 Message-Id: <9a357746ad72f7b78320d225c9d020e283000a8c.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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: Jonathan Humphreys Signed-off-by: Jonathan Humphreys Signed-off-by: Jerome Forissier --- net/lwip/wget.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/net/lwip/wget.c b/net/lwip/wget.c index e8768fc2acd..b495ebd1aa9 100644 --- a/net/lwip/wget.c +++ b/net/lwip/wget.c @@ -349,12 +349,6 @@ bool wget_validate_uri(char *uri) ret = false; goto out; } - s = strchr(authority, ':'); - if (s) { - log_err("user defined port is not supported\n"); - ret = false; - goto out; - } out: free(str_copy); From patchwork Fri Aug 23 13:48:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821731 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388009wrh; Fri, 23 Aug 2024 06:53:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWN5/vAbINCPuTFCnFz0CYUeSJKbsygibPbgKi4XOQbPHY/g07qLR6ACPOYfierHp1PkD43wQ==@linaro.org X-Google-Smtp-Source: AGHT+IFOVYBPMvkC4SyQoNm6E9TVmroQAVQTIIv5Pp5apLg968OSVYOAu0YptQJZq3qF/eovWLoE X-Received: by 2002:adf:fc0f:0:b0:371:869e:d24e with SMTP id ffacd0b85a97d-373118e363cmr1570288f8f.49.1724421228952; Fri, 23 Aug 2024 06:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421228; cv=none; d=google.com; s=arc-20240605; b=XO3IpuZlKgtk7tgfVaeuEE5VFf06MVdbXnUmeEUwoWUzDdB1SvvPNvDDrQdMnbVFoO kpRZHsor0VTOtDnvqaZiYsGP0oNvjW2pYLQ2UnRYaK6usY1OniegNxMKDHYmlGD1It5k N6606tRP2U3GZ+z9YHulhcccI5Q/j1TJM5o1ecW9mtTB5ihEY+N9Q7t/oFJqDkJtcQN2 CEpYURC+i5kcEuj/FcOHE3O/FQqYJhhg/iShhbEspB65gwcYpuPKw2MzNK/SzwtHe+H5 qYEJLOHnb4ijSXBdqocTcY0nTbSX9J34E19Hyy4H69lSLjvYhlJOLLYiFYscgf3/8pq4 Ao/g== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WQUv/HNCuMRxpKPtwooUf712RMBAKG5Q2VDiw47vrAI=; fh=LCNNNsKsQbMhqFD2SqirUToFzpA+FWgpqlnUktW33Kw=; b=Qpr4H4/bzmGMcoqv5U2TgJB+baPmGs+whYRzUdj6KQqrtFfOorp9uXjei2CGZ2bfA0 cG20LlRasymg0GTBqcOzp+TJJVutc3LbZXWSNb3Xy9PVVzHEbDjHvlPRkzef4bkPzdPt eqvwARwvUtTdSdWKru4Wl7LeZqmFuEHb5pm18yBfug/fn+duBiIK7Jm7p5Jcx2axpgq9 eUFGH/4hzbWkPtuK7+TgSPHqgcJ5eozNmib7qnyYkhV6RdXB5gh8F1D8zxReXlg9Xm+S soJ9xSMJwWjTb+rMHoyvwztpUQzQuhoc2EVAwfTPwvNLt4RWIpLjFw/rbBLFhP6b5eRD cPvQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="l/9OxuMY"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42ac5180172si18559395e9.161.2024.08.23.06.53.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:53:48 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="l/9OxuMY"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 14A6188C50; Fri, 23 Aug 2024 15:50:11 +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="l/9OxuMY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0300588C17; Fri, 23 Aug 2024 15:50:10 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 1B6DA88BFD for ; Fri, 23 Aug 2024 15:50:08 +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-x32e.google.com with SMTP id 5b1f17b1804b1-4281ca54fd3so16385795e9.2 for ; Fri, 23 Aug 2024 06:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421007; x=1725025807; 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=WQUv/HNCuMRxpKPtwooUf712RMBAKG5Q2VDiw47vrAI=; b=l/9OxuMY0ciMDG4rbtFVaO7UU68bpKlVurBNefbGWkbwigsM1WOjYQd/+ABxhaY0FD KiuVdwKO9aNTTJQGTzYlXJDK7P94HiSlliwueuo9MW5XW7AuYLP6rlnguM7z+CPabgTR 5FJ6BjPq6GdcDkKsmdmHCLh5AzNoteMg73flDHmESDek33ZATwgccpfVI4etNGMYyU9q Wp2klQQqth2tRRGslqUofxMkNVMg96p6rHXonTP8JraD3t59KZQ/T+ZR31VeUvQujk+Q OC/L0La1xiJrvvKj2bslej4d3/Zz3fo0TUXFV4jnGHSpHbE4bf/GyH55km+wpbVDa0Cr mQlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421007; x=1725025807; 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=WQUv/HNCuMRxpKPtwooUf712RMBAKG5Q2VDiw47vrAI=; b=Dl7gIRJG4CUnncIAs5IdXszji4BUO+DFVEk618vDDVghSZhEjNLLj3EbzKESeImgx8 pPu5Szd6itrapLPYg8iBLvI9ZtAT+/1ckOqgAbPKvXYl+Tr1SkOiaxyAvgKUAvXpbY6J i2PHmyQI0Bdqdcga32zQTUjhBq5mOMDqma+NgK3Rc5SMfpjGT7WtNQt/9cCdZIBketqv uAYIebjZdelLvglY8EBLaSbRCM5a0F1SeRraI0SBxnqo7lz9eRPS4trjxNXWUnWBbe2u 5lXgZX9EC+Zm6MbMnp1oDtEUr+BC1BknD7pacMNE6rgMP1NEc2Scy2wQA6IWVlt7TFBy GOfQ== X-Gm-Message-State: AOJu0YzBykVqzCZ/UAIXkyZqgUPYboVCNMFB6kJjdgEsVMjTjk9F3Ywa KJqq7PoMKxJ+Ogz18kS9Uvy/+WvjZ9Q5EO0frto4Ub2brRzyfEVQKoWSs1iXMne0wNwSbSvtt53 ZzJGw+mwQ X-Received: by 2002:adf:959a:0:b0:367:9625:bd06 with SMTP id ffacd0b85a97d-373118e3552mr1540055f8f.42.1724421007222; Fri, 23 Aug 2024 06:50:07 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:07 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Marek Vasut , Simon Glass Subject: [PATCH v9 27/37] cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y Date: Fri, 23 Aug 2024 15:48:31 +0200 Message-Id: <316f7bf4005999e127655ad13426cd48152e29a7.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Support "bdinfo -e" when lwIP is selected. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas Reviewed-by: Tom Rini --- cmd/bdinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c index 437ac4e8630..472e5c42b08 100644 --- a/cmd/bdinfo.c +++ b/cmd/bdinfo.c @@ -151,7 +151,7 @@ static int bdinfo_print_all(struct bd_info *bd) bdinfo_print_num_l("relocaddr", gd->relocaddr); bdinfo_print_num_l("reloc off", gd->reloc_off); printf("%-12s= %u-bit\n", "Build", (uint)sizeof(void *) * 8); - if (IS_ENABLED(CONFIG_CMD_NET)) + if (IS_ENABLED(CONFIG_CMD_NET) || IS_ENABLED(CONFIG_CMD_NET_LWIP)) print_eth(); bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob)); bdinfo_print_num_l("new_fdt", (ulong)map_to_sysmem(gd->new_fdt)); @@ -197,7 +197,8 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) case 'a': return bdinfo_print_all(bd); case 'e': - if (!IS_ENABLED(CONFIG_CMD_NET)) + if (!IS_ENABLED(CONFIG_CMD_NET) && + !IS_ENABLED(CONFIG_CMD_NET_LWIP)) return CMD_RET_USAGE; print_eth(); return CMD_RET_SUCCESS; From patchwork Fri Aug 23 13:48:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821732 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388109wrh; Fri, 23 Aug 2024 06:54:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVoi+Qpa/QBDgIuC+VH7jPkpu594HNkwvoPOgydUQArKuMqFovJlrTQYz2t+YfmMmt+2G997A==@linaro.org X-Google-Smtp-Source: AGHT+IH1SyB5PILGHczk5su0L53pd/VahfcMb+saxC0RicWfchn3TNDHcmS/HVPTgjnSp+I5ycml X-Received: by 2002:a05:600c:1396:b0:426:6320:226a with SMTP id 5b1f17b1804b1-42acd560280mr15517275e9.15.1724421244689; Fri, 23 Aug 2024 06:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421244; cv=none; d=google.com; s=arc-20240605; b=LqKpm+rdFWyRtwYP/cr98WQxRKiOH2gLT7Z7Ecp5On9ObOeTtv9rigg8Rorenx7CNR i5Okjt9IPsyFrBSHaUMVET2Csyb+e2t0lg/q1iwnMPTgxUPcZ2fGLwOu4WDG2iEPOsTX bYoShNChUvjCuxEC//mXuxB8Dw780igjaIQl2b9dMBQZoULCSdcZMZs4T4+sN3ga8iiC I1Rl6W6J/Swo+XhqLCLxf3Ms+oESbiVVaSa1+5oxZNhAPeKm215WE2zDfAotzw7Ms/Wd gCyGM/EmgbxgImB86/YXMSzTo7gy29wGUzDtluGVnruxde+ZdVyPxbmtoWlZySKloQ7M EDYg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1ojnSnXWSx4hAnWO4s8nLdkuHVSQzYxXK5vU09NYpDM=; fh=ThdVVZAeTRhYRIsitiRafY870JZ08RRoQKK9619Vak0=; b=PXl+3qda/UFVToK6ChqJRndDKzpT6Mxq4x+TuIByc5Ql4voqBdAZnF3xHHBN5t7N45 FHYC9vABSG6QS6WtAYT/FoWNa74cY/4XyOSdRWE011AOAtVIpXNPamm/RV7tPnNKs7sO 3JeQssOFoiP5/kDcKG4WxzlQVaNNhf8Ssnr9YfYcnE+U5h31hR75UdGSDkOW3Tld8FnC pg7wKOt5fLsJy3ZEyLrDNR3Qrsb8x117YqFQpWcuHNbB1qX1eZr3C6Jpk7pY6wfCvnC9 IoqHxl4Wz02FmfAgENaj/UURBEgyNsR8U67lQQBIEh8EQzBcOgd2EEaoOnMbXjduvs2k 9lcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y2GiaJ9I; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42abed89330si29188575e9.43.2024.08.23.06.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y2GiaJ9I; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 2EEA788C5C; Fri, 23 Aug 2024 15:50:14 +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="y2GiaJ9I"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B87B5886E7; Fri, 23 Aug 2024 15:50:10 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 DBBB788C0F for ; Fri, 23 Aug 2024 15:50:08 +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-wr1-x434.google.com with SMTP id ffacd0b85a97d-37189d8e637so1073955f8f.3 for ; Fri, 23 Aug 2024 06:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421008; x=1725025808; 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=1ojnSnXWSx4hAnWO4s8nLdkuHVSQzYxXK5vU09NYpDM=; b=y2GiaJ9I4UrYJ9AIiZ+QJ4vXU96i6/eq+pcCuJq67Hzj7bf88wonY0oLxVXaLOJ3pp HfJ2+uNS5v04her5mSaUmPY0INIEpc7aRaVsE/kvkUDGC7AtaiP4ZHOYN5l2oMwJZWDz rQy4tFkXJKe0mQa02qHzfiPZqfMd0z2ulhsxNaF7bsfCsF43Y0RyNWdlqjrGdYZauWDx Gw9eXAvmxX/7UDdg1LaR0FRmb8Uc8bQ1kAy8gkYZO/F+lE5RK6dHRRS+b6BofRFSzzb+ L6GUV5ZWhbM44E10VTCGKcD7rbuEYIhI7Wvl4NwRiaAD+Obi0IxJUMxA/DSe1iWg2cm4 +xNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421008; x=1725025808; 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=1ojnSnXWSx4hAnWO4s8nLdkuHVSQzYxXK5vU09NYpDM=; b=XYdWVW41mcwbpkgAGBJ84oTdNRHjE4eKvOcxvL5QIc+7gi3Tvv3RHPuipFHVy0Pj6l lVxQ2b9zpLAB7HIO4Mbza1ed8OMw6jo09nzXfC234QLyVGTM2JK1qDXEnOvWuMVeYA2u mLrMKgm4RMqq2Dvmg6TOEWjJcYZ/TQQ8fMxn9+xGpLlYAvwnHtTdZjOeLSF12fyOJib9 jsaeDHOltu0RoqV++mxb5oBAgGizwDS+RPCOEFJRVrO5qN6NTKgtUvB102frOlEYJV/B dvwfk4O09Mk8K9TYFpUEQofsxAUmnxGCUpMprVjYuN4SgO/wV4J3rp/7aNWK27XRsLmy 3J3g== X-Gm-Message-State: AOJu0YzlKIcjFbqWKcbexFsh4nFR5yDPFAkk5Te+CPWCc2/lJECpdeY6 eTwzmEdEwpAX0iPWgpFsmgVNGJSR7y7p/Wm7bgivIkn0HoTHlRB7lYJs1Y1Wh20hyTrZSQIEXgU w59DYFg+x X-Received: by 2002:adf:fac6:0:b0:371:8c9c:d97f with SMTP id ffacd0b85a97d-373118580c3mr1438450f8f.10.1724421008196; Fri, 23 Aug 2024 06:50:08 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:08 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini Subject: [PATCH v9 28/37] configs: add qemu_arm64_lwip_defconfig Date: Fri, 23 Aug 2024 15:48:32 +0200 Message-Id: <3d55a61d399cf5f863b1ca372b45bc1b833715fb.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 qemu_arm64_lwip_defconfig which #include's qemu_arm64_defconfig and selects NET_LWIP instead of NET. This config has all the supported net commands enabled. Signed-off-by: Jerome Forissier --- configs/qemu_arm64_lwip_defconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 configs/qemu_arm64_lwip_defconfig diff --git a/configs/qemu_arm64_lwip_defconfig b/configs/qemu_arm64_lwip_defconfig new file mode 100644 index 00000000000..c7198340592 --- /dev/null +++ b/configs/qemu_arm64_lwip_defconfig @@ -0,0 +1,10 @@ +#include + +CONFIG_ARM=y +CONFIG_ARCH_QEMU=y + +CONFIG_NET_LWIP=y +CONFIG_CMD_DNS=y +CONFIG_CMD_WGET=y +CONFIG_EFI_HTTP_BOOT=y +CONFIG_LWIP_TCP_WND=8000 From patchwork Fri Aug 23 13:48:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821733 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388165wrh; Fri, 23 Aug 2024 06:54:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWO5nWgUdQbPknc1UyCEWKBXwsER26HSGnZqtPUU4wIBmhPowvsmQ+7NiyWhKe09NDENfsKNA==@linaro.org X-Google-Smtp-Source: AGHT+IHaz0tctmPPwKGFFIoK9oErYJYj8rhycA6IlK8qdTUa1oz6HPgl8ARGOWV+RB1rzHi9K4x6 X-Received: by 2002:a5d:400c:0:b0:371:8c79:73c1 with SMTP id ffacd0b85a97d-3731187e96dmr1715684f8f.2.1724421254423; Fri, 23 Aug 2024 06:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421254; cv=none; d=google.com; s=arc-20240605; b=cUYzuFGdtebDI87tDpO0F+ylZEnE0Zuf2m0BVbjHYL6VTQzxbEBlNd4CG3kXqOAjNp I2u4tajtNN6JGVicL8GhL7oD/OrUi86BwSCMYK38Lrd5GRwsDSThwL3Ah52218z0Qb8h 8zc1ov4ObrNzZrZZn1zOs7qaMPKI7pV6L4qgl0Zx4KWD8jWjijr+HEYDA75YjZrWYAL+ vv40e20XmFKQZTmu0ZcovQvJmnBe48cQmBhoEMzWBy+q2yvULGY4Gnb0B1Alz7f+1kEo zMJUQyzRpHGNcCen3N9DjlkwBrpgJa6qxTueebWjReGI2yr11PMqHKzjijO1ivBdAsba M4EA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cPzj+kahbIDUn0aO8ocEV3Gnoxfu0K4hRIlupOD9QjQ=; fh=ThdVVZAeTRhYRIsitiRafY870JZ08RRoQKK9619Vak0=; b=DfusG29VQhgR2knYJjcoD6z1JgMdYMUFW6+k9uDq3uIYDtx4V0TO5b8M2LlUpGxcOx G10rzG5nDf/E5b9xnUuxGiqoiTZBthkzBOBhW+dqYUPv1QQvEfY6rEywUpFNNgJI4CHZ pmVTyhiUvT3C4M/ge4sn2D11Ki1ioYMe92J3ZR9lZNdy4JXwg7npeW5TRKF52KQyeqv8 8AI7+PpmSEX1BEiGxBaFB8H8uWtGlNFPVSV1l9kbywYLXHxz5luflZVlKXZROxIyWWtP RjQK3ISrCIJViHFot+nrtv3jtWxzp6JhwSs58Epnp0hnII5ZfKw0niJMZ4QPoyWLshSe I+jA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C0p1Lg1Q; 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 5b1f17b1804b1-42abf011fd4si29434355e9.201.2024.08.23.06.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:54:14 -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=C0p1Lg1Q; 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 81FA888C93; Fri, 23 Aug 2024 15:50:14 +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="C0p1Lg1Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E96DB88C5D; Fri, 23 Aug 2024 15:50: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 DB2C5889ED for ; Fri, 23 Aug 2024 15:50:09 +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-wr1-x434.google.com with SMTP id ffacd0b85a97d-3719753d365so1034378f8f.2 for ; Fri, 23 Aug 2024 06:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421009; x=1725025809; 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=cPzj+kahbIDUn0aO8ocEV3Gnoxfu0K4hRIlupOD9QjQ=; b=C0p1Lg1QmGR81s1usRv/dnjhK5Ne2W2VrapweJaNLbhta5DKcucdL5dv1PFebR5+U5 H16ojnPX1LcyKew1ZwNBjDNd8W9Mcnq172Xp3Iixos17sDzSsAQ/UwAbetmzHWjiKuzQ FcQ6yCkYPlefn7sjR0AhF1He/ZJ5bqBY00qMGIcAlc/vSrCzU9/B3+emqqjwosmApYz5 k5quhuIiJr+oNI7Y0WnJa+3A/CKZNT+n4ETbOAoGTUzbeLSGj2ngEgebacD1oy88wxxp S6KLbhAQXYSf3kz0UzsZTXPRCFD/Y8v/3D/nEqPYvEBu0zk/buxwNO0IgEG6zofsCb5c 3Iag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421009; x=1725025809; 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=cPzj+kahbIDUn0aO8ocEV3Gnoxfu0K4hRIlupOD9QjQ=; b=kA/Qk+MIxTp8bPwG5iP0AQxkWW28U54qk3oebqI0PE9km6+7nJu1RUVMVU4hwTQQw8 W+ev7dXIihrj197NTYbJlBr83oJ6HCH4p24lFqg8hrzPd24dUh3J82GIJGMHA7GqxQuG uNvvRSM9fu53lQic6K/qAjavPFDU0a/9qG3g/vkXLlykObVfqw2gx666chiDwSa/5g+0 9CdWatVz9UNgiP4Ezv4P9aPXjLQyRJ6x/JG88mKIEG7718riTLFUPRsxInWPDt8oXFdR JyYBtdkBdTdRdRz8u0DLNQYwOrTCN7SFFRYWVzbKun3qrFRMRAnb4h005NG0YU/uUo+y 9qZA== X-Gm-Message-State: AOJu0YxVq0UcB9PxYq9jm64KJKlLhd5yrsG4uAVVgtnCaHUf0LlJGiqI wt/UYzDzKnn1+t1/wNC/tuCGZ6WXyXDJfurtGc59oV0rLwVfWv3ifU/XFhSKArIXFB6ynwzFOK4 WHoj+Og96 X-Received: by 2002:a5d:650f:0:b0:368:2f01:307a with SMTP id ffacd0b85a97d-37311909071mr1506695f8f.46.1724421009050; Fri, 23 Aug 2024 06:50:09 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:08 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini Subject: [PATCH v9 29/37] lwip: tftp: add support of blksize option to client Date: Fri, 23 Aug 2024 15:48:33 +0200 Message-Id: <86725bd2293d65a0864c3eb8fd74d71cf6ae3906.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 TFTP protocol uses a default block size of 512 bytes. This value is sub-optimal for ethernet devices, which have a MTU (Maximum Transmission Unit) of 1500 bytes. When taking into acount the overhead of the IP and UDP layers, this leaves 1468 bytes for the TFTP payload. This patch introduces a new function: tftp_client_set_blksize() which may be used to change the block size from the default. It has to be called after tftp_client_init() and before tftp_get(). If the server does not support the option, the client will still accept to receive 512-byte blocks. Signed-off-by: Jerome Forissier --- lib/lwip/lwip/src/apps/tftp/tftp.c | 94 +++++++++++++++++-- .../lwip/src/include/lwip/apps/tftp_client.h | 1 + 2 files changed, 89 insertions(+), 6 deletions(-) diff --git a/lib/lwip/lwip/src/apps/tftp/tftp.c b/lib/lwip/lwip/src/apps/tftp/tftp.c index ddfdbfc0c1b..e08e9665124 100644 --- a/lib/lwip/lwip/src/apps/tftp/tftp.c +++ b/lib/lwip/lwip/src/apps/tftp/tftp.c @@ -57,7 +57,7 @@ #include "lwip/timeouts.h" #include "lwip/debug.h" -#define TFTP_MAX_PAYLOAD_SIZE 512 +#define TFTP_DEFAULT_BLOCK_SIZE 512 #define TFTP_HEADER_LENGTH 4 #define TFTP_RRQ 1 @@ -65,6 +65,7 @@ #define TFTP_DATA 3 #define TFTP_ACK 4 #define TFTP_ERROR 5 +#define TFTP_OACK 6 enum tftp_error { TFTP_ERROR_FILE_NOT_FOUND = 1, @@ -88,9 +89,11 @@ struct tftp_state { int timer; int last_pkt; u16_t blknum; + u16_t blksize; u8_t retries; u8_t mode_write; u8_t tftp_mode; + bool wait_oack; }; static struct tftp_state tftp_state; @@ -137,10 +140,24 @@ send_request(const ip_addr_t *addr, u16_t port, u16_t opcode, const char* fname, { size_t fname_length = strlen(fname)+1; size_t mode_length = strlen(mode)+1; - struct pbuf* p = init_packet(opcode, 0, fname_length + mode_length - 2); + size_t blksize_length = 0; + struct pbuf* p; char* payload; err_t ret; + if (tftp_state.blksize) { + blksize_length = 14; /* maximum (blksize is a u16_t): 'blksize\0XXXXX\0' */ + if (tftp_state.blksize < 10000) + blksize_length--; + if (tftp_state.blksize < 1000) + blksize_length--; + if (tftp_state.blksize < 100) + blksize_length--; + if (tftp_state.blksize < 10) + blksize_length--; + } + + p = init_packet(opcode, 0, fname_length + mode_length + blksize_length - 2); if (p == NULL) { return ERR_MEM; } @@ -148,7 +165,10 @@ send_request(const ip_addr_t *addr, u16_t port, u16_t opcode, const char* fname, payload = (char*) p->payload; MEMCPY(payload+2, fname, fname_length); MEMCPY(payload+2+fname_length, mode, mode_length); + if (tftp_state.blksize) + sprintf(payload+2+fname_length+mode_length, "blksize%c%d%c", 0, tftp_state.blksize, 0); + tftp_state.wait_oack = true; ret = udp_sendto(tftp_state.upcb, p, addr, port); pbuf_free(p); return ret; @@ -221,14 +241,14 @@ send_data(const ip_addr_t *addr, u16_t port) pbuf_free(tftp_state.last_data); } - tftp_state.last_data = init_packet(TFTP_DATA, tftp_state.blknum, TFTP_MAX_PAYLOAD_SIZE); + tftp_state.last_data = init_packet(TFTP_DATA, tftp_state.blknum, TFTP_DEFAULT_BLOCK_SIZE); if (tftp_state.last_data == NULL) { return; } payload = (u16_t *) tftp_state.last_data->payload; - ret = tftp_state.ctx->read(tftp_state.handle, &payload[2], TFTP_MAX_PAYLOAD_SIZE); + ret = tftp_state.ctx->read(tftp_state.handle, &payload[2], TFTP_DEFAULT_BLOCK_SIZE); if (ret < 0) { send_error(addr, port, TFTP_ERROR_ACCESS_VIOLATION, "Error occurred while reading the file."); close_handle(); @@ -239,6 +259,28 @@ send_data(const ip_addr_t *addr, u16_t port) resend_data(addr, port); } +static u16_t payload_size(void) +{ + if (tftp_state.blksize) + return tftp_state.blksize; + return TFTP_DEFAULT_BLOCK_SIZE; +} + +static const char * +find_option(struct pbuf *p, const char *option) +{ + int i; + u16_t optlen = strlen(option); + const char *b = p->payload; + + for (i = 0; i + optlen + 1 < p->len; i++) { + if (lwip_strnstr(b + i, option, optlen)) + return b + i + optlen + 2; + } + + return NULL; +} + static void tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16_t port) { @@ -338,6 +380,15 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr } blknum = lwip_ntohs(sbuf[1]); + if (tftp_state.blksize && tftp_state.wait_oack) { + /* + * Data received while we are expecting an OACK for our blksize option. + * This means the server doesn't support it, let's switch back to the + * default block size. + */ + tftp_state.blksize = 0; + tftp_state.wait_oack = false; + } if (blknum == tftp_state.blknum) { pbuf_remove_header(p, TFTP_HEADER_LENGTH); @@ -349,7 +400,7 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr send_ack(addr, port, blknum); } - if (p->tot_len < TFTP_MAX_PAYLOAD_SIZE) { + if (p->tot_len < payload_size()) { close_handle(); } else { tftp_state.blknum++; @@ -386,7 +437,7 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr lastpkt = 0; if (tftp_state.last_data != NULL) { - lastpkt = tftp_state.last_data->tot_len != (TFTP_MAX_PAYLOAD_SIZE + TFTP_HEADER_LENGTH); + lastpkt = tftp_state.last_data->tot_len != (TFTP_DEFAULT_BLOCK_SIZE + TFTP_HEADER_LENGTH); } if (!lastpkt) { @@ -405,6 +456,25 @@ tftp_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr close_handle(); } break; + case PP_HTONS(TFTP_OACK): { + const char *optval = find_option(p, "blksize"); + u16_t srv_blksize = 0; + tftp_state.wait_oack = false; + if (optval) { + if (!tftp_state.blksize) { + /* We did not request this option */ + send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "blksize unexpected"); + } + srv_blksize = atoi(optval); + if (srv_blksize <= 0 || srv_blksize > tftp_state.blksize) { + send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "Invalid blksize"); + } + LWIP_DEBUGF(TFTP_DEBUG | LWIP_DBG_STATE, ("tftp: accepting blksize=%d\n", srv_blksize)); + tftp_state.blksize = srv_blksize; + } + send_ack(addr, port, 0); + break; + } default: send_error(addr, port, TFTP_ERROR_ILLEGAL_OPERATION, "Unknown operation"); break; @@ -493,6 +563,18 @@ tftp_init_client(const struct tftp_context *ctx) return tftp_init_common(LWIP_TFTP_MODE_CLIENT, ctx); } +/** @ingroup tftp + * Set the block size to be used by the TFTP client. The server may choose to + * accept a lower value. + * @param blksize Block size in bytes + */ +void +tftp_client_set_blksize(u16_t blksize) +{ + if (blksize != TFTP_DEFAULT_BLOCK_SIZE) + tftp_state.blksize = blksize; +} + /** @ingroup tftp * Deinitialize ("turn off") TFTP client/server. */ diff --git a/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h b/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h index 24dbda6a8c9..e1e21d06b67 100644 --- a/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h +++ b/lib/lwip/lwip/src/include/lwip/apps/tftp_client.h @@ -44,6 +44,7 @@ enum tftp_transfer_mode { }; err_t tftp_init_client(const struct tftp_context* ctx); +void tftp_client_set_blksize(u16_t blksize); err_t tftp_get(void* handle, const ip_addr_t *addr, u16_t port, const char* fname, enum tftp_transfer_mode mode); err_t tftp_put(void* handle, const ip_addr_t *addr, u16_t port, const char* fname, enum tftp_transfer_mode mode); From patchwork Fri Aug 23 13:48:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821734 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388235wrh; Fri, 23 Aug 2024 06:54:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXBPsXpZ5n8hOT1Ne1ZPw1cR3332G+yr01YxVLVohkpSL3lIP8YJkCUCcs9muBTEG2mBcSw/g==@linaro.org X-Google-Smtp-Source: AGHT+IGJ//S8q47Q48bTn+G39eMOkzzb5IdialNyHS9nS9ZQbd6+/N9F6CTpFGTnG/I2nQoA33he X-Received: by 2002:a05:600c:5491:b0:426:6f1e:ce93 with SMTP id 5b1f17b1804b1-42acd5e2dffmr13878105e9.33.1724421265936; Fri, 23 Aug 2024 06:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421265; cv=none; d=google.com; s=arc-20240605; b=F4r7W46oEHhlbd3+BsILiDzDLvOZ/Ib5NDUhwqFtPhDbwIUYVFaqQRIsDtxQBoRt9F BQ1A3fM7WMvo1wj15R3piFoly0e8EIQuUIjQ9B/lQq0QMRjKmsMMNOO+w3u95KrsZAH4 AoB8fqqnQ016jyjJNRX7uMYmATONSQwhtQTPPiTCV4n3/lyN66C7atTHPxJaMn/b79KT DCN8cllzbv/nT7JyURjq1beMpEjeEJNgQcrt/kWAoDVpV33nXfWUPjxg7cAMHRwdyYgT S3aeZ1Yg7hcYua1nroJ98b+2BeGttOLDfgn1ag4DaTiov1QTMwIhhGiL3bEeApTbhZe6 nL6w== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w5Ti40FD60twAqgTogRIah0zrrRbOJ+6aN+DRYhjcLI=; fh=8LAzHPYFumYV4f2J8/2jQOtKLAr6TBnp6a+gbEwg0U4=; b=UzN8h1ALUUdegbPFM/40ASzZ6rL0NS51ZjW57qK8lo27J+52oYsgt4wm8f48nqFrnU +Y0GqUXGg0RrHu7XBqSWazsyo0xSgDEXeUPnFVmbFa7e2y8ex2y5CDLd6HWMEEJ3CFoc zHPx+qoXhg+sbHDCky98/iRpQv9V/wjukw/RZfIShbGw3C2VrxT5dYge83kunQ5va544 TsXqHrYtib/v1SZ72Xtw9hsTADnxaIiWr0ibkK4VpjAQ6CT3h/hLYbxH6ZtCSj6HvYsn R9QrUs3M63BlWB5VQGNovNZblyDuQtfGfVxDO1DlRppH7r8pzDP5fAvrF6BMfH/efWWf /chA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Srfv0ADQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42ac5180447si18936455e9.178.2024.08.23.06.54.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Srfv0ADQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 E158C88C15; Fri, 23 Aug 2024 15:50:14 +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="Srfv0ADQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE62688C6D; Fri, 23 Aug 2024 15:50: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 F388E88C13 for ; Fri, 23 Aug 2024 15:50:10 +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-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3719398eafcso1043388f8f.1 for ; Fri, 23 Aug 2024 06:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421010; x=1725025810; 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=w5Ti40FD60twAqgTogRIah0zrrRbOJ+6aN+DRYhjcLI=; b=Srfv0ADQMWrxUDvTEvjlS2ps2Mvm+f9/T9YgUyAWaMixc3qngAMc7EuSQsT66UF8ei 1X55UU3iKefvJmof+5lu0rs8ulq7hvDG4ge6eUnnfQARV4XtGHBPiq7wz2VOuBZ11Oy3 FwlnNqWIm33Fquwy1UUN0mFvxfNkG6bmyg3joprT7xxz9Np8OSE62HF+rRYdsi+J1Ky3 GDMeaUl2IZamy6+RMubmIlruBLJTUbv2YOCp05zw9ofOVmdqBeJaITYh9O9SE/xiLyEw YBh50DnK1FD/moSaA21RjOcjQUZ8JIMIcm9anW44E39VyZU2OPWsQc90kopwWLJMa38v CtUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421010; x=1725025810; 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=w5Ti40FD60twAqgTogRIah0zrrRbOJ+6aN+DRYhjcLI=; b=CorjnwZaAfIC9OPVkF3ToOnNvJXTTJ+8JZ7Ei9Uzn4aRjhHsIaylAdAA8wHm0/MFQM h8hDrQ/9TglXwCbv9+kJfJDro62KPD3fvIlVPspOQaqi2g2Q9zxaN59PtendGYtYSHI5 P2BX2NwWZHqEfJhpUIKOqhW5RCPBPEGl4haVffWkFvcoQOaonmxpp9H7ypoZrsfaokkv hOrJd6WQlyxf/u7FhLDJ+Y4MtMh1ZeV+Y2ZwWHobg7ZNLe1ZQydFg5xhp46fWIwGE4vo lkm0Lt1ZTgfeEiOArrE4QkYJpaj4N1yU4FMAW26ki94wASuSXEpITrYgCFJEx5ZAu4et 4PVg== X-Gm-Message-State: AOJu0YyvEOXdZsChA3/aqE/pdNn+rA23qPMSoA3MK1goQazo/kDEatcX bxDyj3bkkjK1ZsFlIzaCoIv8pFUDjgqnjLi8Uby3ZOJ4erUceMnWsfDf7m1AT2ceyjYa0FNYGpg jzwLPCLbH X-Received: by 2002:adf:fd41:0:b0:367:8a87:ada2 with SMTP id ffacd0b85a97d-37311876fadmr1505479f8f.26.1724421010155; Fri, 23 Aug 2024 06:50:10 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:09 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Joe Hershberger , Ramon Fried , Tom Rini , Baruch Siach , Simon Glass , Anand Moon Subject: [PATCH v9 30/37] net-lwip: add TFTP_BLOCKSIZE Date: Fri, 23 Aug 2024 15:48:34 +0200 Message-Id: <86cbe8adc7cd7130571f5b4d4eaf3828c222d6fe.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 support for setting the TFTP block size. The default value (1468) is fine for Ethernet and allows a better throughput than the TFTP default (512), if the server supports the blksize option of course. I tested this change with qemu_arm64_lwip_defconfig. The throughput is now 875 KiB/s vs. 313 KiB/s before. That is still a low number, but I think we can't expect more without implementing the windowsize option. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- net/Kconfig | 20 ++++++++++---------- net/lwip/tftp.c | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/net/Kconfig b/net/Kconfig index 16a9de47e94..76ab7d91eeb 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -60,16 +60,6 @@ config SYS_FAULT_ECHO_LINK_DOWN this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to be configured. -config TFTP_BLOCKSIZE - int "TFTP block size" - default 1468 - help - Default TFTP block size. - The MTU is typically 1500 for ethernet, so a TFTP block of - 1468 (MTU minus eth.hdrs) provides a good throughput with - almost-MTU block sizes. - You can also activate CONFIG_IP_DEFRAG to set a larger block. - config TFTP_PORT bool "Set TFTP UDP source/destination ports via the environment" help @@ -254,6 +244,16 @@ config NET_RANDOM_ETHADDR generated. It will be saved to the appropriate environment variable, too. +config TFTP_BLOCKSIZE + int "TFTP block size" + default 1468 + help + Default TFTP block size. + The MTU is typically 1500 for ethernet, so a TFTP block of + 1468 (MTU minus eth.hdrs) provides a good throughput with + almost-MTU block sizes. + You can also activate CONFIG_IP_DEFRAG to set a larger block. + endif # if NET || NET_LWIP config SYS_RX_ETH_BUFFER diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c index 50b8fbad00d..51cd1e0207c 100644 --- a/net/lwip/tftp.c +++ b/net/lwip/tftp.c @@ -138,6 +138,8 @@ static int tftp_loop(struct udevice *udev, ulong addr, char *fname, if (!(err == ERR_OK || err == ERR_USE)) log_err("tftp_init_client err: %d\n", err); + tftp_client_set_blksize(CONFIG_TFTP_BLOCKSIZE); + ctx.start_time = get_timer(0); err = tftp_get(&ctx, &srvip, srvport, fname, TFTP_MODE_OCTET); /* might return different errors, like routing problems */ From patchwork Fri Aug 23 13:48:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821735 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388302wrh; Fri, 23 Aug 2024 06:54:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFMOmuuw+cX1qJTIaFvTXj1yeoZ/R19c0QfTnN5Wu7RcB+qZnqOfvrtxjtjq33UFtlMRjfnA==@linaro.org X-Google-Smtp-Source: AGHT+IGtWLKRltpobSw4eYz5eTQKbx1D7y9+yfux9gkBY/ee7oX7JnSHfop4Hic081oYBOcZ8Q/X X-Received: by 2002:a5d:47af:0:b0:371:93d3:3419 with SMTP id ffacd0b85a97d-37311841a66mr1622384f8f.12.1724421277027; Fri, 23 Aug 2024 06:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421277; cv=none; d=google.com; s=arc-20160816; b=NnDQscltqCkuY3KYC1mGRSqULvayqdAqq7b6MoXpsNNX3QHrhCok2+4j34y7YQlmk6 yIPgbwdPwh+6Aj2YXIaOblIgSZOjtl5u/qyes1suX/ZWznlG32cmiVtpTWjBCKuKRafI 1mz+dU7MElyuH/OzuiAuAFqz7oEEsxPZYdTWSa7gMRlhhQ/SuAN6Sipk11nqdn56FjPC NFzAnCpfMSKl/E2w3h8/CiJldHEMwQmcycU6l4VlM7N15tTdcIJziUNVbRhlzysUhrTv LuLh+55t6xlQmeqgbs/rddNLZJufGt7/5Ci+NJNj+J1Hs8H+L7w2q6MZdBrYC7bx+2nP GHkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YReqvMd/BxfFFS2kjHJgaJSXZI3pm+qMN/lkAT63YpM=; fh=KHBkO1cMxvxOf3oQBHi6yJaebUf7JU4mAfTIjGEYF08=; b=cRsMA1oDcAlmK0RNgQ+dEXj7Oe+kVDH7dRYEmZc0tp9SYZ7ItsiXzULSlHiMxjyZD+ tH1MEXYonCdi9vhu+CFyxVbvXf5PbycMFrLX8Z4Tm5kIX7wevgPdgjsgCAmqxDOaWaSB GRKw4XUzoQQcDfTROCVOcR0MBf8f+gw7uU/SrWN6M2K1L699KtGsF39JKRb0c3KQFV1K Zbx+wVt7cbfBu0Z4F4A/Q5AQVTt44zavHF89tICpME4W46Pl+9h1Ig0JtHhHm+ZcJxlz MoH7V0RKGFKfLxjkUT2WxbrRXWShMloU0n4MifWv1F3YlvhvdTAimmsv7ZvxJNU2lu3a xs0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jp6NflvK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-373082005dbsi1553311f8f.330.2024.08.23.06.54.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:54:37 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jp6NflvK; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 44F4088C61; Fri, 23 Aug 2024 15:50:17 +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="Jp6NflvK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0E131889ED; Fri, 23 Aug 2024 15:50:14 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 D55AF88C08 for ; Fri, 23 Aug 2024 15:50:11 +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-wr1-x42b.google.com with SMTP id ffacd0b85a97d-371a9bea8d4so985612f8f.2 for ; Fri, 23 Aug 2024 06:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421011; x=1725025811; 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=YReqvMd/BxfFFS2kjHJgaJSXZI3pm+qMN/lkAT63YpM=; b=Jp6NflvKcaQtrmU2bUTRx3ovxeQ7p1KtMCn6OtsKm7LyxVe5l0DNIJPG/gb9soc6p0 f9GQh3TWIsvj89uuWeC0ZgN+GbVAZ7foo3DI69BMg0PUau62mSK8WmZJjcgMAOAXgwXI 0m3kLYDUQavh024hdUH4dZLdm+QB5CgQHSUxXU/gZ/nyv8ugvMxSr1Q8L2lAraDNJNwf F1EmGZJT5HoFmzQcnPLOGzBdiJLsvFCErGhEfFRwx6mKwXPEstgE75vYwvgohWH19jp1 ken9tNEblPzKA77pq4OcmRtFAas1x+PD2pCl2oZL5cIEUf4xQRDNQyxjbSnBo2F1eNoz 4tFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421011; x=1725025811; 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=YReqvMd/BxfFFS2kjHJgaJSXZI3pm+qMN/lkAT63YpM=; b=X7eo8o1yitJS5otD2Lpin9qAWJIRuWjGdb3UrZW2f1vwmySZcZSdSuwL870vYOZZxv HZZnfdYy4sDfzWLj+Mtpj+9ojlM+r4JdXAbcHztuWdFLKMkKEOaHUOWZ8+fzZaNtdSmt MQEV/RxTnBezeK094ZVXvRud83uQFp70lNsKBthnUO084PtqNvQyJ7iD1TtD4VIhj+6Z E7Z0V1wHc0YqDp5oypgVLq7lJ4fLGjAWCsDEIxFvHjfDPuTnDwhtvWZ5ScnRrEtE40b+ yzzGj75c0uCn1hKgF5CjS3xuRE/1/f5btkTP90kQBu2JKV+veVRZiW8hKWYz+I5KDzr0 8QRg== X-Gm-Message-State: AOJu0Ywsb932teUxh/1AqYCs/DzTkVLsoZ0KBjByyaFPoPOl+IA+DLGM 2ZlDTHB1Du/9x7HrXh2qxKdv0ireq8D3/EnJQB2XwPnrpYg/WiF60Bw1XuVG257WDRx+HH5k23Y fIJxAJgyp X-Received: by 2002:a5d:66c1:0:b0:368:74e0:2068 with SMTP id ffacd0b85a97d-37311865155mr1536883f8f.33.1724421011079; Fri, 23 Aug 2024 06:50:11 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:10 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Jiaxun Yang Subject: [PATCH v9 31/37] CI: add qemu_arm64_lwip to the test matrix Date: Fri, 23 Aug 2024 15:48:35 +0200 Message-Id: <3aad66cbc5eb380993fd4f9409167d91e9746f06.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Build and run qemu_arm64_lwip_defconfig in CI. This tests the lightweight IP (lwIP) implementation of the dhcp, tftpboot and ping commands. Signed-off-by: Jerome Forissier --- .azure-pipelines.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 93111eb6127..59fddb96a48 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -238,6 +238,10 @@ stages: cd \${WORK_DIR} git config --global --add safe.directory \${WORK_DIR} git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks + # qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled. + # The test config and the boardenv file from qemu_arm64 can be re-used so create symlinks + ln -s conf.qemu_arm64_na /tmp/uboot-test-hooks/bin/travis-ci/conf.qemu_arm64_lwip_na + ln -s u_boot_boardenv_qemu_arm64_na.py /tmp/uboot-test-hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py ln -s travis-ci /tmp/uboot-test-hooks/bin/\`hostname\` ln -s travis-ci /tmp/uboot-test-hooks/py/\`hostname\` grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd @@ -415,6 +419,9 @@ stages: qemu_arm64: TEST_PY_BD: "qemu_arm64" TEST_PY_TEST_SPEC: "not sleep" + qemu_arm64_lwip: + TEST_PY_BD: "qemu_arm64_lwip" + TEST_PY_TEST_SPEC: "test_net_dhcp or test_net_ping or test_net_tftpboot" qemu_m68k: TEST_PY_BD: "M5208EVBE" TEST_PY_ID: "--id qemu" From patchwork Fri Aug 23 13:48:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821736 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388364wrh; Fri, 23 Aug 2024 06:54:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVnAdsCqSuYm7uPyIDmM6I6Iqb+1MdalKg6t0M/AMo/D6+Zk9psV0s0lNVY1N804tvC7pv/Eg==@linaro.org X-Google-Smtp-Source: AGHT+IFs1BXQ6SyvyIOdLG5nWFx/cd+O+IYwGG8Mn7C62ERucbggxefpG2oygGp6N4jCM5REnF78 X-Received: by 2002:a5d:5849:0:b0:371:8a3a:680a with SMTP id ffacd0b85a97d-3731187d5d8mr1916677f8f.32.1724421286333; Fri, 23 Aug 2024 06:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421286; cv=none; d=google.com; s=arc-20240605; b=a6VIydeGmWOapWnnFJTCsRkPDDltMI4YREClHgdBaHTCWReA4frN9m5wNbfag5bQHJ 75iz+XKZfNeiRNTvy1LZlEm/lXiaNgK7p3RzN9uV85rbVgyf1S4TtbRc/EDvTu1h1yYM 6S4h7YWWubHYqB+xTQvmV/DNr4RsYPqlwi+cHEoH/0q/B4Ew1yNwC3doGYceobLuFy0g Fx1J/rDx4rILGXmq9mswSOT0yi0klvJB+oBIIzv3aC85fKczuZuGyEbA8TD6QLL9qnPN zWbWcw18S014ocIfARpcCZ31BM187SQqU9Q6GsNdNBcgfpX/HZMNsB/0iQWatdAkutQh KVAw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0tGrz+fyPkE3vdcLjdOdpujgl7dYrT2sQnfYMflACoQ=; fh=njgCjITlrmjocOGF7fS4RLuSuMr6zJR3aQXJijMkmxM=; b=H/F51UubvvmqzwN5NCivR0g4+QZCgdEPfB1RAl7Fa4CgLLjAnVO2KR6fVhplXmsPGU VNP21fsElHASu/H7Jk031E4ZbGhne2oKD8SiIujovLwoBhMzBf73k7Sg047I+1ohrfs4 kJA5zilx5KsBQv4zD2yJlPOkIATRAu0rFlN/s6cNxb+cAMHugqHcL3+j6cIJL13/fX4h GKDvs2Y4JSbZj3aEjQjFFRwAZ+JRgO5QI7lfz429jswRJ2oS/04iANMxRDRDvKBSIRRr IpEPBYQI6J9sQwoUZYwpb1IvHwtckLre9D1XCjv1+Z3zBEnyV2fh4kcjqtsWCocieTTk DikA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h+4AdGH6; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id 5b1f17b1804b1-42abefdb9adsi29334755e9.162.2024.08.23.06.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:54:46 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h+4AdGH6; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 978D788C9D; Fri, 23 Aug 2024 15:50:17 +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="h+4AdGH6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F1A7488C6A; Fri, 23 Aug 2024 15:50: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (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 8927E88C70 for ; Fri, 23 Aug 2024 15:50:13 +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-wr1-x433.google.com with SMTP id ffacd0b85a97d-37196786139so1035574f8f.2 for ; Fri, 23 Aug 2024 06:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421013; x=1725025813; 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=0tGrz+fyPkE3vdcLjdOdpujgl7dYrT2sQnfYMflACoQ=; b=h+4AdGH6jszR5YoutpkFbgGFxuX/BruNyHkGgXzbv13l3O/UVmPf4yHIP2Lr71dyiy WyJxrk6yb4fOeYnvixDafpXf43bVRuMRaGEHjzcgyB8gM4BvQfxl0LwUeFC8TXdpHk55 c8In8xiqEPap5GuTH1TRXLt3wKtH/SoSrafQ2Yx2uD8zDiZSRbOKYQrhvhDDz75T2mlH 2HkJISredVdjpTKnVRIrPPqPTSdfeZRnR6sQGRIwu92zw8D41WzOEZUQ3CpbD077H6nm L6JLS5kjIo4qlm5VO5+aO+TLoGuyHiWRjS7dmYid3Xke6WJ5hbN1jVWOw9/uNE7nS/gy ZUeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421013; x=1725025813; 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=0tGrz+fyPkE3vdcLjdOdpujgl7dYrT2sQnfYMflACoQ=; b=aVOWahkXcbK6eHU3dgU7r4ISshJqae01ZsYZSXWJ9kSSVOAwr8L/BRtL3IpyC3if0g byN2kxb/fxzLhVCUbGP9Ymo+yxJFHORj9PRFlsrCgHQE52/Jv6xMnDtDRSDT0xqWhMEL N0BhqkoEVdYXGsItRlHX89cNDRv6XqIbCxooFZvTOGa7BTSN+NV20Ci+iPlY9+xSI5Im /8xo81nTyUjC7CEsqJh7f5q6CGqbjh1jYqLazbVHoqPXaaD8dIJflsXCulc5o6bWBhUG LoobS0A/Q5l1V8/Fj2GtsLcH1gbVqQwVNKHs5Pjkb4TKQ8QQ8BsDclDVraCXhtKj0Um+ +fmQ== X-Gm-Message-State: AOJu0YzpbagZGycY1W0mvm0paB4neQjb3BJ/ySbKHc2aolmYQlv3jTIl ohg6M1/Eog4g9nJYvAEbcx/u3AJcDnH8DYBVAiOqnHvH8grlKcB77uiZRal5Ii+ljfg7Qpt8hnG WNMgVvUDs X-Received: by 2002:a5d:61c2:0:b0:368:3f5b:2ae4 with SMTP id ffacd0b85a97d-3731187db65mr1528871f8f.36.1724421012659; Fri, 23 Aug 2024 06:50:12 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:11 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Mattijs Korpershoek , Simon Glass , Sumit Garg , Neil Armstrong , Caleb Connolly , Robert Marko , Sam Protsenko , Nathan Barrett-Morrison , Heinrich Schuchardt Subject: [PATCH v9 32/37] MAINTAINERS: net-lwip: add myself as a maintainer Date: Fri, 23 Aug 2024 15:48:36 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 myself as a maintainer for the lwIP network stack integration code and network commands. The library code itself (i.e., most files under lib/lwip/ except README, Makefile and integration files in u-boot) is unmodified from upstream and therefore does not need a maintainer. Signed-off-by: Jerome Forissier Reviewed-by: Ilias Apalodimas --- MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2050ae24df8..cbd59d17e4f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1351,6 +1351,17 @@ F: drivers/net/ F: include/net.h F: net/ +NETWORK (LWIP) +M: Jerome Forissier +S: Maintained +F: cmd/net-lwip.c +F: configs/qemu_arm64_lwip_defconfig +F: include/net-lwip.h +F: lib/lwip/Makefile +F: lib/lwip/README +F: lib/lwip/u-boot/ +F: net/lwip/ + NIOS M: Thomas Chou S: Maintained From patchwork Fri Aug 23 13:48:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821737 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388423wrh; Fri, 23 Aug 2024 06:54:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLbjV+TuFJJA3qHF9SH2l375PLfjOCWB9IUbU9342cI2CDWalstBC7ZBPH6oQYFJg25w80pA==@linaro.org X-Google-Smtp-Source: AGHT+IH0C28xOe1ZtCWzcvWYnlqFedv7/yX4ohsoMsek/ORQgIU83g0ibOulJdB67dWEn6CDY2P4 X-Received: by 2002:a5d:64ea:0:b0:365:980c:d281 with SMTP id ffacd0b85a97d-373118e560cmr1921666f8f.45.1724421297900; Fri, 23 Aug 2024 06:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421297; cv=none; d=google.com; s=arc-20160816; b=QrtyEKIp4sdtqwYjLom2JyaoWaJoQldUQypp1M+2dhgx5UliV0kc2S7mZh4wdn5g9m f51aLN+bg6OGAZEZ9Fcuk8V13exFsFrKNQAgz/uBFDUGrctJ+gGfpGumpZZrZxhLlAKr BdNJ4xFm2pAQlKLyy8z4RByn6E99nGa5+h+RW1/bk2LhOhxtkUvlk6BMvLj5SvHFMdGz zDiNlQITHhkRHq3jsY8VYiAUiYIsyFPCGHDA7p2XrqmUnhMPq2loH6FPiv3yAYrBjZp/ XiDj0+I0XJSuQhxwDMCtORWUZRQERR51sogphaUAZ4veFSpRb0vQVwx/oIGnRxO2hVCz VNMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rapHq8mT0Fevrq/9JxTGXRXySaMIV1ZV1VBfbr90Q3k=; fh=AtwNuI/9+j5QelDnvRWlVtpMPpCcYdPifWW3DzxjkF8=; b=RiCA6xdMHZVwQ7wXyKxhevUPdpADpThcG5Y/vhOmFlPtjRiiHr2+2bNAxxqXqMb+f5 rniD8mdCHei7k565uhFLJ4KXbbkIO5fc4in8aXyF1iRPMDkaLCRcHNZEFuV453IO7yaz 1YMvVU/sXGYsg6WePhkL2Dez1fJE8EYGs8J0CmKeGT+1yXo00Zr1NIH2lvc3gTfH4QdF ONiFXPMjFqHenfaUBCEwHy8p2BDAN2XZKS0G90PYh45dmwX8+t0e+LjLqCbaDGKEaCo3 XFJGDx3DbHACmFX1sdiZ3DALLYPZ0Orw4bfmaB28CQlC9qfuueMC37ztvIezZDC5BQX3 fFZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GpMQovna; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-37308117b2esi1527730f8f.99.2024.08.23.06.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:54:57 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GpMQovna; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 E8B8E88C4A; Fri, 23 Aug 2024 15:50:19 +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="GpMQovna"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A21B488C70; Fri, 23 Aug 2024 15:50: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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (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 7A97D88C90 for ; Fri, 23 Aug 2024 15:50:14 +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-x32e.google.com with SMTP id 5b1f17b1804b1-428e0d18666so15104705e9.3 for ; Fri, 23 Aug 2024 06:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421014; x=1725025814; 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=rapHq8mT0Fevrq/9JxTGXRXySaMIV1ZV1VBfbr90Q3k=; b=GpMQovnaZ+W/+EG3QtKwuC1h5pLn/93M4HEYMRXgYqo6yGS0spf2Rb2iKqto9bZg6y Z1BtOPiwVEmEGmmh/fh8C+ciEDHENlO+kNZV0iLfIy65ZPLrqq9QfNFIExnc18q9B2WK b5iQET+SQIEx4cyqU+7SfcXgP5Z/xhgd6+y7GNZACPDcxnzPiqtV2hKen1UBX69M8ZoP 5Vj5FopOqu2DN9ghf1vygwkRu168eyq4dbuhZaC0Bl/2O9PQBLy8Mo7eqJrtXoNpFFtO Tg4nt6GeZ+CrCQ4S3V+v9LkaAUhD/aHGBBT5jDg/8ct/tQg4CZeDq5lXtukvR6E62psh qTwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421014; x=1725025814; 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=rapHq8mT0Fevrq/9JxTGXRXySaMIV1ZV1VBfbr90Q3k=; b=psrNOf9DTwh0Swho2zOrHrXj1KRq1BIs51K4ewiHxd3pP3vdWc1osdfgqgWIlEgN1d 0SmFdS51FXna4Lk41GhrQM9VwL+QUY2DJBsQDwXH0k1GItWlulGw3iHb9S9LDrA04XpF xjOrwa50gmJLUpXBzyvBkIQzeIdA72NpkTLwzNd1CWyHi9YU5UkVitj/oq7MNphuZpQ7 3R/lWysZqYFWd00xy53DA+wWaDh6Wt777bYfcetJy/EHOL+7LyoC02U1+5ZgQW9nAMPO lH1uodG6tpAgbe4UEMRROVucWtgI1Ykk5ii27qldb8ITEnSCgjzjNxCRqvqkzW0wzesu 7lVw== X-Gm-Message-State: AOJu0Yxo4xAkHqXo/Wh6uiNHCt9JX0ONo1o7tDIKVkFcSb6gJmZT5X3t /Imw34GSVOCGAOh9KApf0IVu3e1gCuaLmCw/BK79HbRRb6V0SNrKSnwaz4O3GTi/wOszJnTgpLB wRuexSnvI X-Received: by 2002:a5d:6d06:0:b0:367:8fc3:a25b with SMTP id ffacd0b85a97d-373118e551emr1627876f8f.42.1724421013698; Fri, 23 Aug 2024 06:50:13 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:13 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Lukasz Majewski , Mattijs Korpershoek , Tom Rini , Marek Vasut , Heinrich Schuchardt , Jaehoon Chung , Miquel Raynal , Jonas Karlman Subject: [PATCH v9 33/37] Kconfig: fix undefined symbols (g_dnl*) when NET_LWIP is default enabled Date: Fri, 23 Aug 2024 15:48:37 +0200 Message-Id: <49c9454c4ee803376d59233a712ba04df98b9ec5.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 for link errors on am62px_evm_a53and other platforms when NET_LWIP is enabled: common/dfu.c:34:(.text.run_usb_dnl_gadget+0x68): undefined reference to `g_dnl_clear_detach [...] common/spl/spl_dfu.c:29:(.text.spl_dfu_cmd+0xb0): undefined reference to `run_usb_dnl_gadget' - 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 - 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 --- drivers/dfu/Kconfig | 1 + drivers/usb/gadget/Kconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index d034b501360..7de629f103a 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -8,6 +8,7 @@ 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..ce9364c3172 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -324,6 +324,7 @@ config SPL_DFU select SPL_HASH select SPL_DFU_NO_RESET depends on SPL_RAM_SUPPORT + depends on DFU_OVER_USB help This feature enables the DFU (Device Firmware Upgrade) in SPL with RAM memory device support. The ROM code will load and execute From patchwork Fri Aug 23 13:48:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821738 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388472wrh; Fri, 23 Aug 2024 06:55:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXAAEOfGi92Ke0hVQaQg6i0LNNiA8XYk7+wIRl8in/vbSwmN4fOtdfhDgihTsqXbZtHjzQkbw==@linaro.org X-Google-Smtp-Source: AGHT+IFvRee8SBwWpJYbllYwNQIeFkoVqUhesNmQ9gUi9IVTsAXtj1NjzHyf8FhBRq/dZMjG39Fj X-Received: by 2002:adf:b311:0:b0:368:665a:4c64 with SMTP id ffacd0b85a97d-37311840237mr1242831f8f.5.1724421307805; Fri, 23 Aug 2024 06:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421307; cv=none; d=google.com; s=arc-20160816; b=FtZaEy3NOG8MfsZ4EI3TJNZAXyt0y6ImU2X27GrgwvuJ/42c9ve5CxNJkewJbB0dOK zqDB9TkSxUrPl55AcFnuyIsnyjav4K3X2s34n3gjjQt5/xIT2cuKQGEBPq4OcWj9mFPt e9ib0P1KXWCXFmZTAElWiosv80dao8EAsN1Rvu/EsLEfiC2LK5HdA+xN5T05tUsJ7JZs /NbeVEUArDiCuHblIQxc0VjSTMsoLHbelhXRLZO2C8c9Be+KE+YDpR17T+rG3JYoTa1U ACtOkPsF4sGH7z9y1R/4yNPFM0r+CVkRmy46yPrvqu9QV/xbkWWhXOx/RLKCHGZfy48o WoUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zBTpKlNJ+CX952bVpUvNeHC0pIUflmSyNV267epLKSw=; fh=jsFXu3iLijXIN2uYmlfqKS6I1KzGXFCz88a7kH8+wjU=; b=TD/IwaGG8J5ApZs0UUMdPNMIEYdxZcI1yhXAF15TWhQIalIoVqcWWPdRbW1CdDuNpH w/SpA0fZqHfl5y8IlUP5B5pbY6WAjq1adWZhHFB2YNixMmi9yr7+uksLJj8lA7yxBxnC BS9ALv18yoKJuAMFMYtSygUf5JF5LFGidAicB8LsG9Zi1K0Z1pZcme4nNQbSWHVaATmf dF2XZencfn4FfewPtxNyuoeeP+zyxsxVuwChHBFBOhT5ZCcuLuro/2rhGZMBjwOLF6W1 PRHwdRM3uK61BlR739dEZnaPBrQI8hKzsiUa/sYA8DsT3ykUfnCFB9hcpFrGVy3d36+T 3pDg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W8FLEjyG; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-373082009e2si1571703f8f.349.2024.08.23.06.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:55:07 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W8FLEjyG; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 466F488C73; Fri, 23 Aug 2024 15:50: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="W8FLEjyG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 264E288C73; Fri, 23 Aug 2024 15:50: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, T_SCC_BODY_TEXT_LINE,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 60BEB88C65 for ; Fri, 23 Aug 2024 15:50:15 +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-x332.google.com with SMTP id 5b1f17b1804b1-42816ca782dso15529705e9.2 for ; Fri, 23 Aug 2024 06:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421015; x=1725025815; 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=zBTpKlNJ+CX952bVpUvNeHC0pIUflmSyNV267epLKSw=; b=W8FLEjyGgRGmjcbSFIQXW03LGaARUzBAk6Jc2Z8jVVUdEl0t7YEnsP+e9QsVcyL7d9 pFpBc50zXnWCKHhiKBAkzZwgc6K1tTVUoOZm+/zKvIACPdxp5QC4yxOYdrS2L2/ThMAp TmORmOZJGZkveOleDSSG8rlVa2tpxICQX70a8P3mWbhCoBf2sQ6+bgZS+hCROhmuD20z 5nIknk8o6mOagOM+bOLQ8fd6fk/l+RdANBX/FghbHoluvj7O4Aov0k+YPaVKHX8ac4t/ v1IMIZC5KD0OfBltOG8E+kZDerA5tIE3PLdGlypiNJKqzu4a66+aHfmf0Z28mFT5yoF/ R/hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421015; x=1725025815; 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=zBTpKlNJ+CX952bVpUvNeHC0pIUflmSyNV267epLKSw=; b=S90XxgfgFjdxHDWjHWiISjHMdQ4/8aVT3oOCJO2KVBvMgwRvs9wDF+a56ssRbFgAt7 zOf8TfJfXJL7VAPMCkeywua3iFZ4e4D4vEJr+IiRJ5PJOEVaekX2VmqRZrtLIMc4Wb6F N+kYir1kaLu/etV+XJ7Ss+9VjuTB8U9sKYF129M1X4w6HCUk6PaiwHZB5R6NeEIb4ihV NL51mlBPBZP+j3B3T1L4MGV41OGlMYg/3UhXITmfDK8vIaY5MC9tYKYk5OdQvgVKHr37 g0ppO2crBsLG+V7jRj4/JA3YH9WoFy7rz1Ds5FUMbqWKhFkSptb2TwDIbII97TtX4LPs qAgQ== X-Gm-Message-State: AOJu0Yyg/wGNyOmjd7yruRL56h3bzwZ7myhmkRvhnp4ELEGBtBz1kVu3 Pof1daajckOg8gadkZyB1YlFD/Adgocik4JRrO+ajOCt7T3zsBeOhsNWULZ+vv/wVRHqtZofSxG QYftJcsC7 X-Received: by 2002:a05:6000:4009:b0:371:8e95:9c84 with SMTP id ffacd0b85a97d-3731186340fmr1655520f8f.26.1724421014589; Fri, 23 Aug 2024 06:50:14 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:14 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass Subject: [PATCH v9 34/37] configs: use syntax CONFIG_FOO=n in tools-only_defconfig Date: Fri, 23 Aug 2024 15:48:38 +0200 Message-Id: <1cd8b6cde8ba55d6f78cc8ca4c4376bc5ce62294.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 tools-only defconfig causes troubles on MacOSX due to the default C compiler being Clang (LLVM) rather than GCC and more specifically due to [1]. Therefore replace "$ CONFIG_FOO is not set" with the equivalent "CONFIG_FOO=n" using the following command: $ sed -i -e 's/# \(CONFIG_[^ ]*\) is not set/\1=n/' \ configs/tools-only_defconfig This fixes the tools_only_macOS CI job on GitHub [2]. [1] https://github.com/llvm/llvm-project/issues/78778 [2] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=9105&view=results Suggested-by: Tom Rini Signed-off-by: Jerome Forissier Reviewed-by: Tom Rini --- configs/tools-only_defconfig | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/configs/tools-only_defconfig b/configs/tools-only_defconfig index e00f2c48598..7511e30d709 100644 --- a/configs/tools-only_defconfig +++ b/configs/tools-only_defconfig @@ -4,26 +4,26 @@ CONFIG_ENV_SIZE=0x2000 CONFIG_DEFAULT_DEVICE_TREE="sandbox" CONFIG_SYS_LOAD_ADDR=0x0 CONFIG_PCI=y -# CONFIG_SANDBOX_SDL is not set +CONFIG_SANDBOX_SDL=n CONFIG_ANDROID_BOOT_IMAGE=y CONFIG_TIMESTAMP=y CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y -# CONFIG_BOOTSTD_FULL is not set -# CONFIG_BOOTMETH_CROS is not set -# CONFIG_BOOTMETH_VBE is not set +CONFIG_BOOTSTD_FULL=n +CONFIG_BOOTMETH_CROS=n +CONFIG_BOOTMETH_VBE=n CONFIG_USE_BOOTCOMMAND=y CONFIG_BOOTCOMMAND="run distro_bootcmd" -# CONFIG_CMD_BOOTD is not set -# CONFIG_CMD_BOOTM is not set -# CONFIG_CMD_BOOTI is not set -# CONFIG_CMD_ELF is not set -# CONFIG_CMD_EXTENSION is not set -# CONFIG_CMD_DATE is not set +CONFIG_CMD_BOOTD=n +CONFIG_CMD_BOOTM=n +CONFIG_CMD_BOOTI=n +CONFIG_CMD_ELF=n +CONFIG_CMD_EXTENSION=n +CONFIG_CMD_DATE=n CONFIG_OF_CONTROL=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NO_NET=y -# CONFIG_ACPIGEN is not set +CONFIG_ACPIGEN=n CONFIG_AXI=y CONFIG_AXI_SANDBOX=y CONFIG_SANDBOX_GPIO=y @@ -32,9 +32,9 @@ CONFIG_DM_RTC=y CONFIG_SOUND=y CONFIG_SYSRESET=y CONFIG_TIMER=y -# CONFIG_VIRTIO_MMIO is not set -# CONFIG_VIRTIO_PCI is not set -# CONFIG_VIRTIO_SANDBOX is not set -# CONFIG_GENERATE_ACPI_TABLE is not set -# CONFIG_EFI_LOADER is not set +CONFIG_VIRTIO_MMIO=n +CONFIG_VIRTIO_PCI=n +CONFIG_VIRTIO_SANDBOX=n +CONFIG_GENERATE_ACPI_TABLE=n +CONFIG_EFI_LOADER=n CONFIG_TOOLS_MKEFICAPSULE=y From patchwork Fri Aug 23 13:48:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821739 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388556wrh; Fri, 23 Aug 2024 06:55:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUOnj4Hxjsx2JkkmmUvWbwRmyikx2SDhcn6yB55PfgvVtCyooRcGMa5G4S8CNgQcsteTH2Gtw==@linaro.org X-Google-Smtp-Source: AGHT+IH01T1Tpz/nRzDiDcX5ubocXKr+5KxcPEAzNb26YtWndyispnsHM2nSuIYGsNE0Iuo6+Miu X-Received: by 2002:a5d:61c2:0:b0:368:3f5b:2ae4 with SMTP id ffacd0b85a97d-3731187db65mr1537810f8f.36.1724421320020; Fri, 23 Aug 2024 06:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421320; cv=none; d=google.com; s=arc-20160816; b=vl/e/Xjr+SJFt9BRdbyY45nYiD1jZksfBE7eAwGu05YqsUjMphsuGJ6r6dbKGI5a5h 5bYbv72+1z5FT28Fbr01t1SrfhQvKHmOZYY7/bmibF+G35Obk6SxeDgMaAIkzVHqUnxn bsoPJQ38eozaAXsColNWCS19CJonGYL8LKogdzrTQ0qW3ZQ4ryd+8GpJdiXYaz5OG30a mN0oHhNksHPAiqiHNvyOhUJpMfMiQKF/WdJ8KlgkWS+ndc48amwosJ/KVWfD92Lg6gkn WjMIRNVHL/CGjrPTomsXRDPakBKTx085JxdSsmPpwfpHZ64M8FIZChUjuVJfp2+8ZEXD r8bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5wGAxngIl5/YTS5ICCFukRbGaZs+N1aXf1ApJKIVpUI=; fh=xNJZ8hsFL9wA3T5IMnRuZ9W9zj55p/RH3uwqNhDdoJc=; b=uwquVBacccJiIMUNrrb2wU+FLBkS1ox9IdKisQaM2DFnOEDpZQdQmRaxOCPytcTc6U t+WznZkNi8PRY9ahh/1UMrcJ0BEF4mYyp2nCUPAD+KEJHLk80vz9lLD/NEL/WMPEAysC qr6Av1uLruPe6MJuj3XYBpOQHdoYJkUijP/CtVZb+21XfGw8DejcfsFKbHsOu3pUwb80 khWr23qeO86lLayIiUjMDwpyMJKbDT7m8yPf5Irg8AU70awffaiRw2zD7/qXCbr/BZ24 GzSA6qJWnqvC3WRN4uZJQ+9qBsszB9HZgk5LEUqnffme9LgrI6CVEUA+yxoXHmuO41jN pgYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emKAEB4+; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-373081ffefcsi1513493f8f.431.2024.08.23.06.55.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:55:19 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emKAEB4+; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 973D688C91; Fri, 23 Aug 2024 15:50: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="emKAEB4+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7413B88C65; Fri, 23 Aug 2024 15:50: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (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 525F388C6A for ; Fri, 23 Aug 2024 15:50: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-wr1-x435.google.com with SMTP id ffacd0b85a97d-37196229343so1227723f8f.0 for ; Fri, 23 Aug 2024 06:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421015; x=1725025815; 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=5wGAxngIl5/YTS5ICCFukRbGaZs+N1aXf1ApJKIVpUI=; b=emKAEB4+wlUmboJ4nEkWQL0qc1YIfnvRsVkGmXt+IZjNLEdRzFi6NoJp/ullas4Zpp toZx/3PXEtmwLDK6rpEQRJrlevsOKom1Orf/3q3SBCWwIdzI5slO5sqw+AHQVw/IK6R2 3u3wQHnwbCNyXrRefdT+Fm5iDvVKXUPj2lxZ4FLapkzIlgjR00IECdvFHZBa710w7TMl NjjROaW4R+uvqrqCN4eSGz/ilCPqMIwLJmakVY+Cz1uaOIsqH8h26aymLSPe0BzLd4uP negmQvIohv4Oo4MX7OlSTIJzafn+oC2xo5nJX/PQ2DyMsOUODgxHWEwMQ9NuukiQ5GCP IDtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421015; x=1725025815; 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=5wGAxngIl5/YTS5ICCFukRbGaZs+N1aXf1ApJKIVpUI=; b=uibLTatPAv9b9t69xUBM01hWZvMbbXKKH6xdLcuxdcA++ptQss3b9fvXewWnfxy9JR 8Fv2Fn7wGZbbCXv+Ch5rgEStnpXqCglD6ZevM665GZh2avSO6EyVD0baiRK7xOPpYTY3 hCre+HeshTsNV1B7DunikLR4G00RHwp8pgDl/fhsv6YB50PNq+8rSuVXGuSpHMkdhGEQ uv4wMwr4SpJ6wdkvCxqARWzzBJ40Iryu1qMDatDqz2XAfUh6MNHH2yWKHiQS3LHz0ZdD fXnraDmjQ2FSZ5ZV8Xy27vNB+395VNvauXQM2LXjMvNDmoasblxcRAiAjGc+UWRzLLR1 wgcQ== X-Gm-Message-State: AOJu0YwYA6S24/pfsMXuJ0VolCULX2iGaPm4+xxc8Q+VADYictNaGVDy S5ZMMQgow0sT7G9g+bmI0YmWZDoR7FxneD2qMQQC8QqrYO+SPe9L19gs1C3JQTUpNUyZTxGuuja EezElGthI X-Received: by 2002:a5d:6211:0:b0:366:f8e7:d898 with SMTP id ffacd0b85a97d-373118e372amr1472407f8f.50.1724421015579; Fri, 23 Aug 2024 06:50:15 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:15 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Tom Rini , Simon Glass , Marcel Ziswiler , Marek Vasut , Jonas Karlman , Greg Malysa , Jesse Taube , Shengyu Qu Subject: [PATCH v9 35/37] [TESTING] Kconfig: enable NET_LWIP by default except for SANDBOX Date: Fri, 23 Aug 2024 15:48:39 +0200 Message-Id: <1629f6845b448edcdead09a9350f1ae2ae7a4bb6.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 Enable NET_LWIP by default for testing purposes. SANDBOX doesn't support NET_LWIP so default to NET in this case. Signed-off-by: Jerome Forissier --- Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/Kconfig b/Kconfig index 6657b9e5e30..2b316afa542 100644 --- a/Kconfig +++ b/Kconfig @@ -749,6 +749,7 @@ menu Networking choice prompt "Networking stack" + default NET_LWIP if !SANDBOX default NET config NO_NET From patchwork Fri Aug 23 13:48:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821740 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp388637wrh; Fri, 23 Aug 2024 06:55:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU6l6tTiykqXJYXf6Q+4G1iM3w6gXM6gD4NXZtn90C7iUiiHLtIhmadIQ9yuwlRwE2wzDGrAw==@linaro.org X-Google-Smtp-Source: AGHT+IGkrBd5aQS8bddRbvpmxfXdXhNS5i+fp3SnrdnlhrsHsmxobzCQDYyXhTxi6X97MIf7SjOO X-Received: by 2002:adf:f707:0:b0:367:8a2b:7354 with SMTP id ffacd0b85a97d-37311852212mr1382023f8f.11.1724421332132; Fri, 23 Aug 2024 06:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724421332; cv=none; d=google.com; s=arc-20160816; b=BWC8H95v1oBC0gsYAoYaqeLXQknZie9FBRmDIAuZIssTLkbe7KBPfK1Xx7Zms40/VY 4aWWms4pgZCSkFSXPk+Wj1pz0GUTEqLC9SIXa2zepAMgeiUwdLwhoW72EU5GskHjylr9 7ZRZZOrAiXnUs7C4t4CxmfKLGVvMj2BD8Z4OAIjmrtnIDvWVnZDlAJouQmOIuwtX22Dg e2OLBx/17jeYF0uU4W1+LxPd6/+sF6XC3u0mUkRxRCqKe28ldBtVOq9vdU2sJdsj8fG0 RmT2pcfRvOAnF81nXQ/Aa5dAePIUmLvT0cmqYRjCXiow0MZHUzUcuLz2TRcEhmlORVrL EGNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eJQB/lVIEuaOTisBmT/KtDxk9lFVqELDc6NKg+RqMYs=; fh=RFJhacO2EHA8DrLccx88KrXRD/oQsH29AdT2FSBQkoE=; b=OqCPJm7PWmqxaSaCrUuAHPMoPFqsRUsuSRG2OVH2m7xZ28reanscqPW7Tyt7CjCYQU PouBjJY56zvNvGOBlpFOqw32Zlx1gpGMbsy3GzN4PqWYfANOCBuarUIK+5Jxa6mwTyrB y3JRBOLYCAM49S0BxXgTagm2eUET5JHQbx0tEDES323GmApxFsigDMOtyarQK3FtYbew UtgL2SmnSEFBaxVOQ6lCwgplY9DjKH0Ov2awiH9K+JeucB8NxH2ncjMDPDXxHsXbMgH+ F3DcQBNZz5NCmzZXzPPpyicvC8K/66k66YZ+khsSmg8T1MU1ZCf7IbXGrXOYvorFtkwU Ns0w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oiw0OBrq; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-37308200819si1494176f8f.378.2024.08.23.06.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:55:32 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oiw0OBrq; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 F26FA88C13; Fri, 23 Aug 2024 15:50:22 +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="oiw0OBrq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 47CD488C13; Fri, 23 Aug 2024 15:50: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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 6534F88C8A for ; Fri, 23 Aug 2024 15:50:17 +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-wr1-x42b.google.com with SMTP id ffacd0b85a97d-371aa511609so981029f8f.1 for ; Fri, 23 Aug 2024 06:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421017; x=1725025817; 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=eJQB/lVIEuaOTisBmT/KtDxk9lFVqELDc6NKg+RqMYs=; b=oiw0OBrqtcuG1mkPXR0Tp3np4xX8dh6Q0xeIcdzPzOwFiejI1HOZtmCKx7PQTFb9RL NDOIuP5aVZt7bGygDcAklTjofp19ER2IODmzE8ZkwX1qzU1VKthdxY+s04egP0hkKKtJ SZI1jyhPb6tLlQUSSFgmLet9t4G72XnZRQNWpV6HZHwVx1VsnrfGMM2pqyzJc6d03SWL +0AgraayCZzE15FjUTeTd8DtiBQb0gp7cBBPtBR/MSSdn6CGeDA42tmjT3/XnIK6nNss 2PdSfweYJM9XYOk/jrVF0WXdA8FQnXyViGahOakbVBa02Ys643uMFPw1CkmkUMEfSr62 iCrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421017; x=1725025817; 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=eJQB/lVIEuaOTisBmT/KtDxk9lFVqELDc6NKg+RqMYs=; b=lyrwqkUCv/TB26xfkgqxRBl3ZvuvbCgDjEZtyTUEMpvVHJ/x+Hv8ZzUc4L/ST2F04d +RNt5zc/HzTqgE0opAoO9m0v6pcbeptUcJ87+zEiFADo+JroHIOw48wswMPSxYCjZsCf xRFtElTP53lRqP3fxYnUfVzWdNBcesgkIsf8tvW0R3aMffh3jIX1oT3B3gM8xhUyfsqn uMjc+dbe8XU7NyQnkNZApyHEKxt7XviP4khAvH8Xt6vfWMwaDO9V3REvxyGCbsd4BvC5 Cy8x337pXxaIte5JVJeHiqKGEKCB8yGgVPu0GqRDJS0lLtxgzE+NX7wabz9PEuF4D7Dt o2Ew== X-Gm-Message-State: AOJu0Yz6LvRJc0PrJniePnRibG9jNJUZjrlp8l3UGwkMNunAWjKDQ0vB Yrc88kO0dkfut6K4p2CpXeq8ZwyFRb4Hx2QCwjcLMRC97JAFwynnT8qRQqluYIBmLebXSK9Hbu5 hdjclQPHP X-Received: by 2002:a05:6000:c85:b0:371:7d3c:51bb with SMTP id ffacd0b85a97d-3731185ea64mr1314252f8f.19.1724421016607; Fri, 23 Aug 2024 06:50:16 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:16 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Maxim Sloyko , Tom Rini , "Chia-Wei, Wang" Subject: [PATCH v9 36/37] [TESTING] configs: set CONFIG_NET=y for FTGMAC100 Date: Fri, 23 Aug 2024 15:48:40 +0200 Message-Id: <29c7d3f8d92ef223c269dc4b27076b99cb3c142a.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: 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 FTGMAC100 is not compatible with NET_LWIP which was enabled as the default stack in a previous commit. So enable NET in the defconfig. Signed-off-by: Jerome Forissier Reviewed-by: Chia-Wei Wang --- configs/evb-ast2500_defconfig | 1 + configs/evb-ast2600_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/evb-ast2500_defconfig b/configs/evb-ast2500_defconfig index 6685f37e3f5..d20ccf16797 100644 --- a/configs/evb-ast2500_defconfig +++ b/configs/evb-ast2500_defconfig @@ -35,6 +35,7 @@ CONFIG_CMD_NCSI=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_NET=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_REGMAP=y CONFIG_CLK=y diff --git a/configs/evb-ast2600_defconfig b/configs/evb-ast2600_defconfig index e6a4e4d1b7c..47faf05a242 100644 --- a/configs/evb-ast2600_defconfig +++ b/configs/evb-ast2600_defconfig @@ -78,6 +78,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_ENV_SECT_SIZE_AUTO=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_NET=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y From patchwork Fri Aug 23 13:48:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Forissier X-Patchwork-Id: 821743 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp406101wrh; Fri, 23 Aug 2024 07:26:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBR3LQIgXd2qClEBgUpNRr2eBqOjvDip0HuziFlAYRjL6Q0EPE3e/BIdde9TH4RGgJAfh4FA==@linaro.org X-Google-Smtp-Source: AGHT+IF9BXf3572uWPyA4HBPoc3svjxJn0ehCtJpbmKv/7KzZAlHZCvn4f8y70wvGL2OzUNQxTZZ X-Received: by 2002:a05:600c:474d:b0:426:6ed2:6130 with SMTP id 5b1f17b1804b1-42acc8dd6d5mr16560225e9.14.1724423210765; Fri, 23 Aug 2024 07:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724423210; cv=none; d=google.com; s=arc-20160816; b=HhR7PRKYkIqEoJmnFaOFJeYw/HXPw1NCU8UwhyXLnFhOGS50zOhHRmW73IR3LeYTqA bX5V1RsMD8nifSvug/Xu3SKZGGMwmpofbVt0M7A017IXWv9teVya98ZDgZP0knzkXbYY gLSgPyc1Eku2zKysxxwodtrhyCzoDOQ5M57yADRungq+heKt5dpQO+t+cloDBPJ41Hg0 WLKU9PBHxWBSezT2pC1Ps2A6uXzTKI996u8npXNpgT03oP6XyioZ/Onu+th1SISC50F8 Po35z7G63FlnMaq2HJLZdA3zb/OlwVg6x7uKOkkkm/rOYgfXF+iwRu2IhCv6vVMSa+Ll Th+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N8xDu7zZqrTK5rBt6q1IH5mA6wpcm8jKpSLJpqJUpDU=; fh=Rxu/68zbZU4QrXuxNzTcgELTTyIb+QuIXRFEM6YC3eM=; b=Nolcwq1kaQmhdSOWrxYgTIsVxRdB+S2DPP3FhmKJhU7TlNCTOssKC1THjlbQYynSmM 3Nzl5C6nDiNzy/ZzhDuwqj+ovMXkkPRWBrpCvAQ0ro7F7dKGeuKetTK+Zr02xA3NwjD0 WAYcPAMbNa9asgIG5zaXZ3eO8pyGzOyDpEsMSXdYuS6DBKBc+1Tt12bNgFBmHAggsm7c gZbba5BeTRuGEHeTgvAPOK4q3D3+hS7XKJSJwHnBrXH+1FPu/Ylq1SEUiLN/FIE4X/Kq q4Do1uZ6mdqKcg+DxUfZxwW0MoDCeOZ9QARJ2qaiYDDRkb7TSSV2LUSU5f322rZGkRbT 6+7A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fd/dHBs8"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id ffacd0b85a97d-37308286844si1546590f8f.850.2024.08.23.07.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 07:26:50 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fd/dHBs8"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 A378D88969; Fri, 23 Aug 2024 16:26:39 +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="fd/dHBs8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9F54F88A56; Fri, 23 Aug 2024 15:50:34 +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, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (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 64AA988CCB for ; Fri, 23 Aug 2024 15:50:29 +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-wr1-x42b.google.com with SMTP id ffacd0b85a97d-371ba7e46easo1020432f8f.0 for ; Fri, 23 Aug 2024 06:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724421029; x=1725025829; 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=N8xDu7zZqrTK5rBt6q1IH5mA6wpcm8jKpSLJpqJUpDU=; b=fd/dHBs8mB8ULm0opg8RqtQ+0G/Z/Cpc18NpjKhnFcxqrDpeSeM1ixT01BmbmB2Wk0 eDPRTBl63PPCVIT4MwB6u8AG5QYmnNpw95lDepQFedsd1WVumYRFskMApKNPrCNvdigu dyj+uTzPuN0xljOrz5A1YqfSPe4ipz4fSaehNz6uSEqy0ZQf4XYVQWNMj4WFmtV0BK1l oLsvOJme5AoO2hZjbP7pVqp5wWOtbqSWEpRdxMUAc+DUMFE09fwBFGb6ajRC2Ftzx7VX 5SGSI2Wkg91mO6IDy0cbU+eJdBsEgFY/VgI7jzuxLg5SRkRWgM5Fl5WNU5PbqsDqWICk WdDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724421029; x=1725025829; 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=N8xDu7zZqrTK5rBt6q1IH5mA6wpcm8jKpSLJpqJUpDU=; b=Bg/S+RpKvjaPUWJE+Tpc9v+C/AX9rag+st3x7slndGdg7xkccUbfSG+xYTyEK5kOX/ N1vlvm2pBysSdfJRE7Ymndm+AjIwOZlm7P1N7uiwSQse8a55I1Dj1mCvjOUJnBhf5B41 8EXiRkT2HYhqsNG2joNJjKye27+hoeqy9XaVYcvubEPVCvTq0A23RSt2ZyxekZc3fwsW ugwkPxRBZGBYEqpd6SyZke6cS3MM47UzfDPHVjhq7NPi0ZjG9/BgbobvreZSAKg6m22j Hr+apGVDN7VCsN3tLoE5YdD71u7jxjfhQa0nN8knvbYc3Ld3byUD2PkrB9F+qiIy5fYy dyVg== X-Gm-Message-State: AOJu0Yznn3xpaPYJrfmJfT8BdxzMfXpVsjmVTzKyb6A2FU4MuTLq1K02 vp6kS2UhrIUFa2wpe1uEzYZkVcOKiDFj0MMYKhPtT6UgeS0E/R7aGxd2lAS1cbOd3jKf09/Oh7P /U3jDWN0K X-Received: by 2002:adf:b19a:0:b0:36b:c66a:b9fd with SMTP id ffacd0b85a97d-37311841a8dmr1316663f8f.6.1724421028254; Fri, 23 Aug 2024 06:50:28 -0700 (PDT) Received: from builder.. ([2a01:e0a:3cb:7bb0:e668:dc94:35c7:8064]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-373081ffb40sm4201665f8f.76.2024.08.23.06.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 06:50:27 -0700 (PDT) From: Jerome Forissier To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Javier Tia , Raymond Mao , Maxim Uvarov , Tim Harvey , Anton Antonov , Jerome Forissier , Neil Armstrong , Tom Rini , "Andrew F. Davis" , Krzysztof Kozlowski , Christian Hewitt , Stefan Roese , Dennis Gilmore , Hugo Villeneuve , Viacheslav Bocharov , Frieder Schrempf , Heiko Thiery , Michael Walle , =?utf-8?q?Eric_B=C3=A9nard?= , Kostya Porotchkin , Luka Kovacic , Luka Perkov , Patrick Bruenn , Baruch Siach , Fabio Estevam , Adrian Alonso , Parthiban Nallathambi , Beniamino Galvani , Marek Vasut , Jaehoon Chung , Lukasz Majewski , Martyn Welch , Richard Hu , Otavio Salvador , Navin Sankar Velliangiri , Simon Glass , Mathew McBride , =?utf-8?q?Marek_Beh=C3=BAn?= , Linus Walleij , Liviu Dudau , Peter Hoyes , Josef Holzmayr , Igor Prusov , Alexey Romanov , Sean Anderson , Marcel Ziswiler , Svyatoslav Ryhel , Sumit Garg , Josua Mayer , Anatolij Gustschin , Peng Fan , Mattijs Korpershoek , Benjamin Hahn , =?utf-8?q?Marek_Moj=C3=ADk?= , Patryk Biel , "Ole P. Orhagen" , Kristian Amlie Subject: [PATCH v9 37/37] [TESTING] configs: set CONFIG_NET=y when PXE is enabled Date: Fri, 23 Aug 2024 15:48:41 +0200 Message-Id: <00fadaf14a9ef16015a5d5e5543d5ff68d1f4803.1724419624.git.jerome.forissier@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 23 Aug 2024 16:26:38 +0200 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 Many platforms won't build when NET_LWIP is the default choice in Kconfig: include/config_distro_bootcmd.h:443:9: error: expected '}' before 'BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE' [...] Set the legacy stack (CONFIG_NET=y) for these platforms. Signed-off-by: Jerome Forissier --- configs/ad401_defconfig | 1 + configs/am43xx_evm_defconfig | 1 + configs/am43xx_evm_qspiboot_defconfig | 1 + configs/am43xx_evm_rtconly_defconfig | 1 + configs/am43xx_evm_usbhost_boot_defconfig | 1 + configs/am43xx_hs_evm_defconfig | 1 + configs/am43xx_hs_evm_qspi_defconfig | 1 + configs/am57xx_evm_defconfig | 1 + configs/am57xx_hs_evm_defconfig | 1 + configs/am57xx_hs_evm_usb_defconfig | 1 + configs/arndale_defconfig | 1 + configs/bananapi-cm4-cm4io_defconfig | 1 + configs/bananapi-m2-pro_defconfig | 1 + configs/bananapi-m2s_defconfig | 1 + configs/bananapi-m5_defconfig | 1 + configs/beelink-gsking-x_defconfig | 1 + configs/beelink-gt1-ultimate_defconfig | 1 + configs/beelink-gtking_defconfig | 1 + configs/beelink-gtkingpro_defconfig | 1 + configs/clearfog_defconfig | 1 + configs/clearfog_gt_8k_defconfig | 1 + configs/clearfog_sata_defconfig | 1 + configs/clearfog_spi_defconfig | 1 + configs/dra7xx_evm_defconfig | 1 + configs/dra7xx_hs_evm_defconfig | 1 + configs/dra7xx_hs_evm_usb_defconfig | 1 + configs/helios4_defconfig | 1 + configs/imx8mn_var_som_defconfig | 1 + configs/jethub_j100_defconfig | 1 + configs/jethub_j80_defconfig | 1 + configs/khadas-vim2_defconfig | 1 + configs/khadas-vim3_defconfig | 1 + configs/khadas-vim3l_defconfig | 1 + configs/khadas-vim_defconfig | 1 + configs/kontron-sl-mx6ul_defconfig | 1 + configs/kontron-sl-mx8mm_defconfig | 1 + configs/kontron_pitx_imx8m_defconfig | 1 + configs/kontron_sl28_defconfig | 1 + configs/libretech-ac_defconfig | 1 + configs/libretech-cc_defconfig | 1 + configs/libretech-cc_v2_defconfig | 1 + configs/libretech-s905d-pc_defconfig | 1 + configs/libretech-s912-pc_defconfig | 1 + configs/marsboard_defconfig | 1 + configs/mvebu_crb_cn9130_defconfig | 1 + configs/mvebu_db_armada8k_defconfig | 1 + configs/mvebu_db_cn9130_defconfig | 1 + configs/mvebu_mcbin-88f8040_defconfig | 1 + configs/mvebu_puzzle-m801-88f8040_defconfig | 1 + configs/mx53cx9020_defconfig | 1 + configs/mx6cuboxi_defconfig | 1 + configs/mx7dsabresd_defconfig | 1 + configs/mx7dsabresd_qspi_defconfig | 1 + configs/myir_mys_6ulx_defconfig | 1 + configs/nanopi-k2_defconfig | 1 + configs/novena_defconfig | 1 + configs/odroid-c2_defconfig | 1 + configs/odroid-c4_defconfig | 1 + configs/odroid-go-ultra_defconfig | 1 + configs/odroid-hc4_defconfig | 1 + configs/odroid-n2_defconfig | 1 + configs/odroid-n2l_defconfig | 1 + configs/odroid-xu3_defconfig | 1 + configs/p200_defconfig | 1 + configs/p201_defconfig | 1 + configs/p212_defconfig | 1 + configs/peach-pi_defconfig | 1 + configs/peach-pit_defconfig | 1 + configs/phycore_pcl063_defconfig | 1 + configs/pico-dwarf-imx6ul_defconfig | 1 + configs/pico-dwarf-imx7d_defconfig | 1 + configs/pico-hobbit-imx6ul_defconfig | 1 + configs/pico-hobbit-imx7d_defconfig | 1 + configs/pico-imx6ul_defconfig | 1 + configs/pico-imx7d_bl33_defconfig | 1 + configs/pico-imx7d_defconfig | 1 + configs/pico-nymph-imx7d_defconfig | 1 + configs/pico-pi-imx6ul_defconfig | 1 + configs/pico-pi-imx7d_defconfig | 1 + configs/radxa-zero2_defconfig | 1 + configs/radxa-zero_defconfig | 1 + configs/riotboard_defconfig | 1 + configs/s400_defconfig | 1 + configs/seeed_npi_imx6ull_defconfig | 1 + configs/smdk5250_defconfig | 1 + configs/smdk5420_defconfig | 1 + configs/snow_defconfig | 1 + configs/spring_defconfig | 1 + configs/ten64_tfa_defconfig | 1 + configs/turris_mox_defconfig | 1 + configs/turris_omnia_defconfig | 1 + configs/u200_defconfig | 1 + configs/vexpress_aemv8a_juno_defconfig | 1 + configs/vexpress_aemv8a_semi_defconfig | 1 + configs/vexpress_aemv8r_defconfig | 1 + configs/vexpress_ca9x4_defconfig | 1 + configs/vexpress_fvp_defconfig | 1 + configs/videostrong-kii-pro_defconfig | 1 + configs/wandboard_defconfig | 1 + configs/wetek-core2_defconfig | 1 + configs/wetek-hub_defconfig | 1 + configs/wetek-play2_defconfig | 1 + 102 files changed, 102 insertions(+) diff --git a/configs/ad401_defconfig b/configs/ad401_defconfig index b44b9c63e83..9502523b447 100644 --- a/configs/ad401_defconfig +++ b/configs/ad401_defconfig @@ -56,3 +56,4 @@ CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_GADGET=y CONFIG_WDT=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig index d73b1cb804b..394c1a5225c 100644 --- a/configs/am43xx_evm_defconfig +++ b/configs/am43xx_evm_defconfig @@ -108,3 +108,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_ETHER=y CONFIG_SPL_USB_ETHER=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig index 89e212595af..9d9b96b9adb 100644 --- a/configs/am43xx_evm_qspiboot_defconfig +++ b/configs/am43xx_evm_qspiboot_defconfig @@ -70,3 +70,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_rtconly_defconfig b/configs/am43xx_evm_rtconly_defconfig index 2ff01193285..ccb934cdf96 100644 --- a/configs/am43xx_evm_rtconly_defconfig +++ b/configs/am43xx_evm_rtconly_defconfig @@ -87,3 +87,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig index 845b686ac93..c67d7e86042 100644 --- a/configs/am43xx_evm_usbhost_boot_defconfig +++ b/configs/am43xx_evm_usbhost_boot_defconfig @@ -108,3 +108,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig index ff5073cbb2b..5925f66391d 100644 --- a/configs/am43xx_hs_evm_defconfig +++ b/configs/am43xx_hs_evm_defconfig @@ -105,3 +105,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_ETHER=y CONFIG_SPL_USB_ETHER=y +CONFIG_NET=y diff --git a/configs/am43xx_hs_evm_qspi_defconfig b/configs/am43xx_hs_evm_qspi_defconfig index 5ef59d830e5..c36b572c58e 100644 --- a/configs/am43xx_hs_evm_qspi_defconfig +++ b/configs/am43xx_hs_evm_qspi_defconfig @@ -71,3 +71,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0403 CONFIG_USB_GADGET_PRODUCT_NUM=0xbd00 CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index 7c3ceeb07db..039efaf7f2f 100644 --- a/configs/am57xx_evm_defconfig +++ b/configs/am57xx_evm_defconfig @@ -123,3 +123,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_LIBAVB=y +CONFIG_NET=y diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index 1f7eca4691e..5b009f56676 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -119,3 +119,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_LIBAVB=y +CONFIG_NET=y diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig index 807e1d66a6d..d4b6caa159c 100644 --- a/configs/am57xx_hs_evm_usb_defconfig +++ b/configs/am57xx_hs_evm_usb_defconfig @@ -120,3 +120,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y CONFIG_LIBAVB=y +CONFIG_NET=y diff --git a/configs/arndale_defconfig b/configs/arndale_defconfig index b664ad58773..9a8439a24df 100644 --- a/configs/arndale_defconfig +++ b/configs/arndale_defconfig @@ -57,3 +57,4 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_HOST_ETHER=y +CONFIG_NET=y diff --git a/configs/bananapi-cm4-cm4io_defconfig b/configs/bananapi-cm4-cm4io_defconfig index cb78dabc13a..a2baec987b6 100644 --- a/configs/bananapi-cm4-cm4io_defconfig +++ b/configs/bananapi-cm4-cm4io_defconfig @@ -88,3 +88,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/bananapi-m2-pro_defconfig b/configs/bananapi-m2-pro_defconfig index 196bc4077d6..fad40f49fdc 100644 --- a/configs/bananapi-m2-pro_defconfig +++ b/configs/bananapi-m2-pro_defconfig @@ -81,3 +81,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/bananapi-m2s_defconfig b/configs/bananapi-m2s_defconfig index 7b137d5e1c4..d3e2bb9aeac 100644 --- a/configs/bananapi-m2s_defconfig +++ b/configs/bananapi-m2s_defconfig @@ -86,3 +86,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/bananapi-m5_defconfig b/configs/bananapi-m5_defconfig index 99ed7c9669a..0505283a061 100644 --- a/configs/bananapi-m5_defconfig +++ b/configs/bananapi-m5_defconfig @@ -81,3 +81,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/beelink-gsking-x_defconfig b/configs/beelink-gsking-x_defconfig index c1e60ede4a0..28e13a155b3 100644 --- a/configs/beelink-gsking-x_defconfig +++ b/configs/beelink-gsking-x_defconfig @@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/beelink-gt1-ultimate_defconfig b/configs/beelink-gt1-ultimate_defconfig index 0e30e13c823..73a843f9e5a 100644 --- a/configs/beelink-gt1-ultimate_defconfig +++ b/configs/beelink-gt1-ultimate_defconfig @@ -82,3 +82,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/beelink-gtking_defconfig b/configs/beelink-gtking_defconfig index 0b644f0e349..281f6ae496b 100644 --- a/configs/beelink-gtking_defconfig +++ b/configs/beelink-gtking_defconfig @@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/beelink-gtkingpro_defconfig b/configs/beelink-gtkingpro_defconfig index a694617a968..93ac53fb1dc 100644 --- a/configs/beelink-gtkingpro_defconfig +++ b/configs/beelink-gtkingpro_defconfig @@ -78,3 +78,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig index 62dbf2aa48f..bd21d3e0f02 100644 --- a/configs/clearfog_defconfig +++ b/configs/clearfog_defconfig @@ -77,3 +77,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/clearfog_gt_8k_defconfig b/configs/clearfog_gt_8k_defconfig index df7e04a75bb..5e1292dc7e7 100644 --- a/configs/clearfog_gt_8k_defconfig +++ b/configs/clearfog_gt_8k_defconfig @@ -81,3 +81,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/clearfog_sata_defconfig b/configs/clearfog_sata_defconfig index 41382f995d3..16d052223b3 100644 --- a/configs/clearfog_sata_defconfig +++ b/configs/clearfog_sata_defconfig @@ -78,3 +78,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/clearfog_spi_defconfig b/configs/clearfog_spi_defconfig index f345b12e6c7..820f3575316 100644 --- a/configs/clearfog_spi_defconfig +++ b/configs/clearfog_spi_defconfig @@ -78,3 +78,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 0cea5504364..784b75bd1a0 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -147,3 +147,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y +CONFIG_NET=y diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 5f56b187503..b9227251d55 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -141,3 +141,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y +CONFIG_NET=y diff --git a/configs/dra7xx_hs_evm_usb_defconfig b/configs/dra7xx_hs_evm_usb_defconfig index 5b67a0e8392..4263c1a7b8a 100644 --- a/configs/dra7xx_hs_evm_usb_defconfig +++ b/configs/dra7xx_hs_evm_usb_defconfig @@ -128,3 +128,4 @@ CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" CONFIG_USB_GADGET_VENDOR_NUM=0x0451 CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 CONFIG_SPL_DFU=y +CONFIG_NET=y diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index 29b6230e901..1a2166d3778 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -77,3 +77,4 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y +CONFIG_NET=y diff --git a/configs/imx8mn_var_som_defconfig b/configs/imx8mn_var_som_defconfig index 218415fad57..cb92a63ab1f 100644 --- a/configs/imx8mn_var_som_defconfig +++ b/configs/imx8mn_var_som_defconfig @@ -113,3 +113,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/jethub_j100_defconfig b/configs/jethub_j100_defconfig index 9de6b4b44d9..805223551a3 100644 --- a/configs/jethub_j100_defconfig +++ b/configs/jethub_j100_defconfig @@ -73,3 +73,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_RANDOM_UUID=y +CONFIG_NET=y diff --git a/configs/jethub_j80_defconfig b/configs/jethub_j80_defconfig index 85306872f9a..c22d81a755b 100644 --- a/configs/jethub_j80_defconfig +++ b/configs/jethub_j80_defconfig @@ -77,3 +77,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_RANDOM_UUID=y +CONFIG_NET=y diff --git a/configs/khadas-vim2_defconfig b/configs/khadas-vim2_defconfig index 50f8b306505..5eb7106b674 100644 --- a/configs/khadas-vim2_defconfig +++ b/configs/khadas-vim2_defconfig @@ -77,3 +77,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/khadas-vim3_defconfig b/configs/khadas-vim3_defconfig index 32579b8ac36..d0f03dad0a8 100644 --- a/configs/khadas-vim3_defconfig +++ b/configs/khadas-vim3_defconfig @@ -102,3 +102,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/khadas-vim3l_defconfig b/configs/khadas-vim3l_defconfig index b9f4690045a..94dd1055b3c 100644 --- a/configs/khadas-vim3l_defconfig +++ b/configs/khadas-vim3l_defconfig @@ -102,3 +102,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/khadas-vim_defconfig b/configs/khadas-vim_defconfig index ac00e8975e1..13be376ebd7 100644 --- a/configs/khadas-vim_defconfig +++ b/configs/khadas-vim_defconfig @@ -68,3 +68,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/kontron-sl-mx6ul_defconfig b/configs/kontron-sl-mx6ul_defconfig index f295ecfe4b7..7096d21468b 100644 --- a/configs/kontron-sl-mx6ul_defconfig +++ b/configs/kontron-sl-mx6ul_defconfig @@ -109,3 +109,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/kontron-sl-mx8mm_defconfig b/configs/kontron-sl-mx8mm_defconfig index 1b7d22b43e1..684ec802c5e 100644 --- a/configs/kontron-sl-mx8mm_defconfig +++ b/configs/kontron-sl-mx8mm_defconfig @@ -149,3 +149,4 @@ CONFIG_EFI_SET_TIME=y CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y CONFIG_EFI_CAPSULE_ON_DISK=y CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y +CONFIG_NET=y diff --git a/configs/kontron_pitx_imx8m_defconfig b/configs/kontron_pitx_imx8m_defconfig index c2133470fc9..c49432504ba 100644 --- a/configs/kontron_pitx_imx8m_defconfig +++ b/configs/kontron_pitx_imx8m_defconfig @@ -113,3 +113,4 @@ CONFIG_USB_DWC3=y CONFIG_EFI_SET_TIME=y CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y +CONFIG_NET=y diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig index a1d5f89b1ec..f4db4e8f5e0 100644 --- a/configs/kontron_sl28_defconfig +++ b/configs/kontron_sl28_defconfig @@ -131,3 +131,4 @@ CONFIG_WDT_SP805=y CONFIG_EFI_SET_TIME=y CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y CONFIG_EFI_CAPSULE_FIRMWARE_FIT=y +CONFIG_NET=y diff --git a/configs/libretech-ac_defconfig b/configs/libretech-ac_defconfig index 6ad04570022..874153174df 100644 --- a/configs/libretech-ac_defconfig +++ b/configs/libretech-ac_defconfig @@ -96,3 +96,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/libretech-cc_defconfig b/configs/libretech-cc_defconfig index beb919ca6e8..fe40804f9fc 100644 --- a/configs/libretech-cc_defconfig +++ b/configs/libretech-cc_defconfig @@ -79,3 +79,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/libretech-cc_v2_defconfig b/configs/libretech-cc_v2_defconfig index 6859dfd517c..646f71be6a0 100644 --- a/configs/libretech-cc_v2_defconfig +++ b/configs/libretech-cc_v2_defconfig @@ -83,3 +83,4 @@ CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y +CONFIG_NET=y diff --git a/configs/libretech-s905d-pc_defconfig b/configs/libretech-s905d-pc_defconfig index 0adc0afdf30..eb02012a21d 100644 --- a/configs/libretech-s905d-pc_defconfig +++ b/configs/libretech-s905d-pc_defconfig @@ -90,3 +90,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/libretech-s912-pc_defconfig b/configs/libretech-s912-pc_defconfig index cbce0cf4000..1be8ab43e4b 100644 --- a/configs/libretech-s912-pc_defconfig +++ b/configs/libretech-s912-pc_defconfig @@ -89,3 +89,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig index 198fec2cb2c..24c48b101ee 100644 --- a/configs/marsboard_defconfig +++ b/configs/marsboard_defconfig @@ -71,3 +71,4 @@ CONFIG_IMX_HDMI=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/mvebu_crb_cn9130_defconfig b/configs/mvebu_crb_cn9130_defconfig index 4d5f575b038..722fe226b43 100644 --- a/configs/mvebu_crb_cn9130_defconfig +++ b/configs/mvebu_crb_cn9130_defconfig @@ -86,3 +86,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_db_armada8k_defconfig b/configs/mvebu_db_armada8k_defconfig index 6913796c010..9964c5d8244 100644 --- a/configs/mvebu_db_armada8k_defconfig +++ b/configs/mvebu_db_armada8k_defconfig @@ -75,3 +75,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_db_cn9130_defconfig b/configs/mvebu_db_cn9130_defconfig index 9133e25b241..3cf83522e67 100644 --- a/configs/mvebu_db_cn9130_defconfig +++ b/configs/mvebu_db_cn9130_defconfig @@ -91,3 +91,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_mcbin-88f8040_defconfig b/configs/mvebu_mcbin-88f8040_defconfig index eef612a261e..c89d6c33d4e 100644 --- a/configs/mvebu_mcbin-88f8040_defconfig +++ b/configs/mvebu_mcbin-88f8040_defconfig @@ -81,3 +81,4 @@ CONFIG_USB_ETHER_ASIX=y CONFIG_USB_ETHER_MCS7830=y CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_NET=y diff --git a/configs/mvebu_puzzle-m801-88f8040_defconfig b/configs/mvebu_puzzle-m801-88f8040_defconfig index b00e92908b3..8304fd6cd87 100644 --- a/configs/mvebu_puzzle-m801-88f8040_defconfig +++ b/configs/mvebu_puzzle-m801-88f8040_defconfig @@ -83,3 +83,4 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y # CONFIG_EFI_LOADER is not set +CONFIG_NET=y diff --git a/configs/mx53cx9020_defconfig b/configs/mx53cx9020_defconfig index c20c6a40a1d..9d127dd2d64 100644 --- a/configs/mx53cx9020_defconfig +++ b/configs/mx53cx9020_defconfig @@ -41,3 +41,4 @@ CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_IPUV3=y CONFIG_IMX_VIDEO_SKIP=y +CONFIG_NET=y diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig index e3aba715aa5..cd400eec02f 100644 --- a/configs/mx6cuboxi_defconfig +++ b/configs/mx6cuboxi_defconfig @@ -93,3 +93,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig index 7811b17bf0f..2072fea5bc7 100644 --- a/configs/mx7dsabresd_defconfig +++ b/configs/mx7dsabresd_defconfig @@ -89,3 +89,4 @@ CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_IMX_WATCHDOG=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/mx7dsabresd_qspi_defconfig b/configs/mx7dsabresd_qspi_defconfig index 2ee8bd36252..36464c1387e 100644 --- a/configs/mx7dsabresd_qspi_defconfig +++ b/configs/mx7dsabresd_qspi_defconfig @@ -91,3 +91,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/myir_mys_6ulx_defconfig b/configs/myir_mys_6ulx_defconfig index b165dd407d1..39ceea85115 100644 --- a/configs/myir_mys_6ulx_defconfig +++ b/configs/myir_mys_6ulx_defconfig @@ -70,3 +70,4 @@ CONFIG_SPL_USB_HOST=y CONFIG_USB_GADGET=y CONFIG_SPL_USB_GADGET=y # CONFIG_RANDOM_UUID is not set +CONFIG_NET=y diff --git a/configs/nanopi-k2_defconfig b/configs/nanopi-k2_defconfig index 2e1c756bf7a..db0a6f8c079 100644 --- a/configs/nanopi-k2_defconfig +++ b/configs/nanopi-k2_defconfig @@ -46,3 +46,4 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_DEBUG_UART_SKIP_INIT=y CONFIG_MESON_SERIAL=y +CONFIG_NET=y diff --git a/configs/novena_defconfig b/configs/novena_defconfig index 322689ef3a2..978a02112b2 100644 --- a/configs/novena_defconfig +++ b/configs/novena_defconfig @@ -106,3 +106,4 @@ CONFIG_IMX_VIDEO_SKIP=y CONFIG_IMX_HDMI=y CONFIG_SPLASH_SCREEN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/odroid-c2_defconfig b/configs/odroid-c2_defconfig index ce5eaec3cd2..e922314e54a 100644 --- a/configs/odroid-c2_defconfig +++ b/configs/odroid-c2_defconfig @@ -71,3 +71,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-c4_defconfig b/configs/odroid-c4_defconfig index 4ef1e681666..9b59ecea421 100644 --- a/configs/odroid-c4_defconfig +++ b/configs/odroid-c4_defconfig @@ -82,3 +82,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-go-ultra_defconfig b/configs/odroid-go-ultra_defconfig index 06437fe3ae0..20e4bdea976 100644 --- a/configs/odroid-go-ultra_defconfig +++ b/configs/odroid-go-ultra_defconfig @@ -75,3 +75,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/odroid-hc4_defconfig b/configs/odroid-hc4_defconfig index 60233fb9cee..ffcdb4f4a2e 100644 --- a/configs/odroid-hc4_defconfig +++ b/configs/odroid-hc4_defconfig @@ -99,3 +99,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-n2_defconfig b/configs/odroid-n2_defconfig index a4cc766f84a..72a0c2e51c7 100644 --- a/configs/odroid-n2_defconfig +++ b/configs/odroid-n2_defconfig @@ -79,3 +79,4 @@ CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-n2l_defconfig b/configs/odroid-n2l_defconfig index 3f657d18812..45617f04705 100644 --- a/configs/odroid-n2l_defconfig +++ b/configs/odroid-n2l_defconfig @@ -74,3 +74,4 @@ CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig index c80900e2cc5..66e51ad1b79 100644 --- a/configs/odroid-xu3_defconfig +++ b/configs/odroid-xu3_defconfig @@ -72,3 +72,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x04e8 CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/p200_defconfig b/configs/p200_defconfig index b6946034795..1a84f5cfb5b 100644 --- a/configs/p200_defconfig +++ b/configs/p200_defconfig @@ -45,3 +45,4 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_DEBUG_UART_SKIP_INIT=y CONFIG_MESON_SERIAL=y +CONFIG_NET=y diff --git a/configs/p201_defconfig b/configs/p201_defconfig index dcc1454be16..dfbe1b79ed0 100644 --- a/configs/p201_defconfig +++ b/configs/p201_defconfig @@ -46,3 +46,4 @@ CONFIG_DM_REGULATOR_FIXED=y CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_DEBUG_UART_SKIP_INIT=y CONFIG_MESON_SERIAL=y +CONFIG_NET=y diff --git a/configs/p212_defconfig b/configs/p212_defconfig index 9cf22ca4db7..1ae033bc804 100644 --- a/configs/p212_defconfig +++ b/configs/p212_defconfig @@ -54,3 +54,4 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_DWC3=y CONFIG_USB_DWC3_MESON_GXL=y +CONFIG_NET=y diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig index 27d438efb79..b420b278764 100644 --- a/configs/peach-pi_defconfig +++ b/configs/peach-pi_defconfig @@ -90,3 +90,4 @@ CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/peach-pit_defconfig b/configs/peach-pit_defconfig index 1c7e0114a85..42323d5e547 100644 --- a/configs/peach-pit_defconfig +++ b/configs/peach-pit_defconfig @@ -89,3 +89,4 @@ CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/phycore_pcl063_defconfig b/configs/phycore_pcl063_defconfig index 2f6b158a677..fdc2b1493d9 100644 --- a/configs/phycore_pcl063_defconfig +++ b/configs/phycore_pcl063_defconfig @@ -68,3 +68,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4fff CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y # CONFIG_RANDOM_UUID is not set +CONFIG_NET=y diff --git a/configs/pico-dwarf-imx6ul_defconfig b/configs/pico-dwarf-imx6ul_defconfig index 8b90285980f..668a9321504 100644 --- a/configs/pico-dwarf-imx6ul_defconfig +++ b/configs/pico-dwarf-imx6ul_defconfig @@ -79,3 +79,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig index 9d5241a50d0..e390cd4e304 100644 --- a/configs/pico-dwarf-imx7d_defconfig +++ b/configs/pico-dwarf-imx7d_defconfig @@ -95,3 +95,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-hobbit-imx6ul_defconfig b/configs/pico-hobbit-imx6ul_defconfig index e3aca6e82e1..7283a6754d1 100644 --- a/configs/pico-hobbit-imx6ul_defconfig +++ b/configs/pico-hobbit-imx6ul_defconfig @@ -82,3 +82,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index 690139c09ca..a48ce623f2b 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -94,3 +94,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig index ce29718a903..2d4e68ca76e 100644 --- a/configs/pico-imx6ul_defconfig +++ b/configs/pico-imx6ul_defconfig @@ -90,3 +90,4 @@ CONFIG_VIDEO_LOGO=y CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig index 1327523e289..c63a4620089 100644 --- a/configs/pico-imx7d_bl33_defconfig +++ b/configs/pico-imx7d_bl33_defconfig @@ -94,3 +94,4 @@ CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index 6009b1c65c1..f614c6fbc40 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -96,3 +96,4 @@ CONFIG_VIDEO_MXS=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig index 9d5241a50d0..e390cd4e304 100644 --- a/configs/pico-nymph-imx7d_defconfig +++ b/configs/pico-nymph-imx7d_defconfig @@ -95,3 +95,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y +CONFIG_NET=y diff --git a/configs/pico-pi-imx6ul_defconfig b/configs/pico-pi-imx6ul_defconfig index 81f3e9bbebb..2b86127d59b 100644 --- a/configs/pico-pi-imx6ul_defconfig +++ b/configs/pico-pi-imx6ul_defconfig @@ -82,3 +82,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_NET=y diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 28c46abed78..6a14e3bcd72 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -98,3 +98,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/radxa-zero2_defconfig b/configs/radxa-zero2_defconfig index 92e0a8833cc..ba90842e973 100644 --- a/configs/radxa-zero2_defconfig +++ b/configs/radxa-zero2_defconfig @@ -77,3 +77,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/radxa-zero_defconfig b/configs/radxa-zero_defconfig index 5179c58dadc..b734fa8c6a4 100644 --- a/configs/radxa-zero_defconfig +++ b/configs/radxa-zero_defconfig @@ -73,3 +73,4 @@ CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y +CONFIG_NET=y diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig index a1e806be421..3f61fe5831e 100644 --- a/configs/riotboard_defconfig +++ b/configs/riotboard_defconfig @@ -89,3 +89,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_SPL_OF_LIBFDT=y +CONFIG_NET=y diff --git a/configs/s400_defconfig b/configs/s400_defconfig index d75d296fa0e..01607562552 100644 --- a/configs/s400_defconfig +++ b/configs/s400_defconfig @@ -60,3 +60,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1b8e CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/seeed_npi_imx6ull_defconfig b/configs/seeed_npi_imx6ull_defconfig index e7557025dd2..f093c26dd7f 100644 --- a/configs/seeed_npi_imx6ull_defconfig +++ b/configs/seeed_npi_imx6ull_defconfig @@ -75,3 +75,4 @@ CONFIG_SPL_USB_HOST=y CONFIG_USB_GADGET=y CONFIG_SPL_USB_GADGET=y # CONFIG_RANDOM_UUID is not set +CONFIG_NET=y diff --git a/configs/smdk5250_defconfig b/configs/smdk5250_defconfig index 8b42c8bdb32..abc601da69f 100644 --- a/configs/smdk5250_defconfig +++ b/configs/smdk5250_defconfig @@ -73,3 +73,4 @@ CONFIG_USB_EHCI_HCD=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX88179=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/smdk5420_defconfig b/configs/smdk5420_defconfig index 55a53178f9c..dd4e4fb9849 100644 --- a/configs/smdk5420_defconfig +++ b/configs/smdk5420_defconfig @@ -58,3 +58,4 @@ CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_DWC3=y CONFIG_USB_HOST_ETHER=y +CONFIG_NET=y diff --git a/configs/snow_defconfig b/configs/snow_defconfig index 2c0757194bd..664ea4032f7 100644 --- a/configs/snow_defconfig +++ b/configs/snow_defconfig @@ -108,3 +108,4 @@ CONFIG_VIDEO_BRIDGE_NXP_PTN3460=y CONFIG_TPM=y CONFIG_ERRNO_STR=y CONFIG_UNIT_TEST=y +CONFIG_NET=y diff --git a/configs/spring_defconfig b/configs/spring_defconfig index 2bd45cb9d60..4b5a4e61896 100644 --- a/configs/spring_defconfig +++ b/configs/spring_defconfig @@ -101,3 +101,4 @@ CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_TPM=y CONFIG_ERRNO_STR=y +CONFIG_NET=y diff --git a/configs/ten64_tfa_defconfig b/configs/ten64_tfa_defconfig index 88609d8401f..5cb2c6070ad 100644 --- a/configs/ten64_tfa_defconfig +++ b/configs/ten64_tfa_defconfig @@ -97,3 +97,4 @@ CONFIG_WDT=y CONFIG_WDT_SP805=y CONFIG_TPM=y CONFIG_EFI_LOADER_BOUNCE_BUFFER=y +CONFIG_NET=y diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig index c62e0d04c9c..7b394a904cf 100644 --- a/configs/turris_mox_defconfig +++ b/configs/turris_mox_defconfig @@ -106,3 +106,4 @@ CONFIG_USB_ETHER_RTL8152=y CONFIG_USB_ETHER_SMSC95XX=y CONFIG_WDT=y CONFIG_WDT_ARMADA_37XX=y +CONFIG_NET=y diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index c8756a3a788..e82e1e727ed 100644 --- a/configs/turris_omnia_defconfig +++ b/configs/turris_omnia_defconfig @@ -129,3 +129,4 @@ CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y CONFIG_WDT=y CONFIG_WDT_ORION=y +CONFIG_NET=y diff --git a/configs/u200_defconfig b/configs/u200_defconfig index 879ae0defa7..6079f68d82a 100644 --- a/configs/u200_defconfig +++ b/configs/u200_defconfig @@ -63,3 +63,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xfada CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_NET=y diff --git a/configs/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig index 7ac70edc2ea..63647b0ff8d 100644 --- a/configs/vexpress_aemv8a_juno_defconfig +++ b/configs/vexpress_aemv8a_juno_defconfig @@ -36,3 +36,4 @@ CONFIG_SYS_FLASH_PROTECTION=y CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_SECT=259 CONFIG_USB=y +CONFIG_NET=y diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig index 29f8213e6e0..234d7d86cd1 100644 --- a/configs/vexpress_aemv8a_semi_defconfig +++ b/configs/vexpress_aemv8a_semi_defconfig @@ -31,3 +31,4 @@ CONFIG_SYS_FLASH_EMPTY_INFO=y CONFIG_SYS_FLASH_PROTECTION=y CONFIG_SYS_FLASH_CFI=y CONFIG_SYS_MAX_FLASH_SECT=256 +CONFIG_NET=y diff --git a/configs/vexpress_aemv8r_defconfig b/configs/vexpress_aemv8r_defconfig index 96fbef5fa19..2d8810782ff 100644 --- a/configs/vexpress_aemv8r_defconfig +++ b/configs/vexpress_aemv8r_defconfig @@ -14,3 +14,4 @@ CONFIG_SYS_PBSIZE=541 # CONFIG_DISPLAY_CPUINFO is not set CONFIG_SYS_PROMPT="VExpress64# " # CONFIG_MMC is not set +CONFIG_NET=y diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig index 67adba437bf..ec33e22a982 100644 --- a/configs/vexpress_ca9x4_defconfig +++ b/configs/vexpress_ca9x4_defconfig @@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_FLASH=y +CONFIG_NET=y CONFIG_CLK=y CONFIG_ARM_PL180_MMCI=y CONFIG_SYS_MMC_MAX_BLK_COUNT=127 diff --git a/configs/vexpress_fvp_defconfig b/configs/vexpress_fvp_defconfig index 7362c1fc35c..c054cbef539 100644 --- a/configs/vexpress_fvp_defconfig +++ b/configs/vexpress_fvp_defconfig @@ -3,3 +3,4 @@ CONFIG_ARCH_VEXPRESS64=y CONFIG_DEFAULT_DEVICE_TREE="arm_fvp" CONFIG_IDENT_STRING=" arm_fvp" # CONFIG_DISPLAY_CPUINFO is not set +CONFIG_NET=y diff --git a/configs/videostrong-kii-pro_defconfig b/configs/videostrong-kii-pro_defconfig index 7a5af234471..6f9b2f15e92 100644 --- a/configs/videostrong-kii-pro_defconfig +++ b/configs/videostrong-kii-pro_defconfig @@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig index e9deab38038..df41406a7ef 100644 --- a/configs/wandboard_defconfig +++ b/configs/wandboard_defconfig @@ -91,3 +91,4 @@ CONFIG_SPLASH_SCREEN=y CONFIG_SPLASH_SCREEN_ALIGN=y CONFIG_BMP_16BPP=y CONFIG_IMX_WATCHDOG=y +CONFIG_NET=y diff --git a/configs/wetek-core2_defconfig b/configs/wetek-core2_defconfig index c4b126c2b7e..2f601f8c008 100644 --- a/configs/wetek-core2_defconfig +++ b/configs/wetek-core2_defconfig @@ -76,3 +76,4 @@ CONFIG_VIDEO=y CONFIG_SYS_WHITE_ON_BLACK=y CONFIG_VIDEO_MESON=y CONFIG_VIDEO_DT_SIMPLEFB=y +CONFIG_NET=y diff --git a/configs/wetek-hub_defconfig b/configs/wetek-hub_defconfig index 85cff73f50f..6fd4cc1410a 100644 --- a/configs/wetek-hub_defconfig +++ b/configs/wetek-hub_defconfig @@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y diff --git a/configs/wetek-play2_defconfig b/configs/wetek-play2_defconfig index efdf820165b..fa270b4db66 100644 --- a/configs/wetek-play2_defconfig +++ b/configs/wetek-play2_defconfig @@ -69,3 +69,4 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_NET=y