From patchwork Fri Aug 23 20:48:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976263 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=DwqsOXYu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrBxn0VsKz1yXY for ; Sat, 24 Aug 2024 06:49:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 60B7088B36; Fri, 23 Aug 2024 22:48:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="DwqsOXYu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C3D4388C53; Fri, 23 Aug 2024 22:48:42 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (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 A4CEA88915 for ; Fri, 23 Aug 2024 22:48:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-39d22965434so11300215ab.0 for ; Fri, 23 Aug 2024 13:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446119; x=1725050919; 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=Hc+1pDb3T997e3xWxn6N4GlwPK2NzA4NIJcJfzVUClY=; b=DwqsOXYuzrrCP+QDqrc1i9xEbTleqMIwaRUEWHFmywJ4SarZbxZg7GpQSIurYNLiIn 8kjX4zk0iC9RZVTCA3JlLqKP9CBuaeHf0JTjx+L9X3wiQ9d5/K6CbtGC/ZSQxsjA8ZEZ xulRpwhL5ViKXF15nwVaG/rpnjK5Ld60EQWmc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446119; x=1725050919; 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=Hc+1pDb3T997e3xWxn6N4GlwPK2NzA4NIJcJfzVUClY=; b=XilVDKgmnoOrKWxg5byZNIRoZd20Lvj026cihoybAYFH+uyspE72LW4pVqQB2SLzr2 Axdf7vZ1mCjgYIZXGgIc2FuCYuPPDYTq7hNXdNazMOXqkUxLZhMTPQGRfSKBhU28nhcU PFkPFmP6Piq3HYR+XiWgVsh8kLG89QFniJJdJEqWjV3Q4WwuBZz7Vln2MdAzJj8jMwnK 2lYaXLs5kx1jczl3STZ5Yg6fLZwDIP4mCmQiEAgYOR9vnpra5/kyNWTdRQy+h9VFIgih afyuIV9JQMtsSJhrKIuoiD7G2U2v1u9o9AsSBVRYTMTEloP9Wjfy5nW0maGge790/SL8 VB6Q== X-Gm-Message-State: AOJu0YyTAoAVLDCvQU/1YzjwJhpRXaHIyEMRgxHUhwOgvkxurK5VaHbY n2BrxFo7Fu7QL+6bi/G13PWoi3AjjcygXPDaVcnZm/RAmGVqIPM+qirHBMYTBXYc+NHe2JN9Xg0 = X-Google-Smtp-Source: AGHT+IHRuG8EePTroxbWebgTuusMjwzbM/NwWzw0nk0yI98soT5oQdQaLVmn3Z6yyWWw0I4xFdpsrQ== X-Received: by 2002:a05:6e02:152b:b0:39b:35d8:dc37 with SMTP id e9e14a558f8ab-39e3bf5175emr31997465ab.13.1724446119232; Fri, 23 Aug 2024 13:48:39 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:39 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass , Bin Meng , Johan Jonker , Kever Yang , Marek Vasut Subject: [PATCH v2 1/8] blk: Make functions available unconditionally Date: Fri, 23 Aug 2024 14:48:17 -0600 Message-Id: <20240823204824.443631-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Some boards still don't enable BLK but we want to be able to at least compile the code which relies on this. For example, bootstd includes calls to blk_...() functions, albeit with a check for BLK so that the code is eliminated by the compiler. Reduce the scope of the BLK #ifdef to help with this. Signed-off-by: Simon Glass --- (no changes since v1) include/blk.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/blk.h b/include/blk.h index 7c7cf7f2b10..a4aa7dd34df 100644 --- a/include/blk.h +++ b/include/blk.h @@ -197,7 +197,6 @@ static inline void blkcache_free(void) {} #endif -#if CONFIG_IS_ENABLED(BLK) struct udevice; /* Operations on block devices */ @@ -278,6 +277,8 @@ struct blk_ops { #endif /* CONFIG_BOUNCE_BUFFER */ }; +#if CONFIG_IS_ENABLED(BLK) + /* * These functions should take struct udevice instead of struct blk_desc, * but this is convenient for migration to driver model. Add a 'd' prefix @@ -291,6 +292,8 @@ unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t start, unsigned long blk_derase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt); +#endif /* BLK */ + /** * blk_read() - Read from a block device * @@ -528,8 +531,10 @@ struct blk_desc *blk_get_by_device(struct udevice *dev); */ int blk_get_desc(enum uclass_id uclass_id, int devnum, struct blk_desc **descp); -#else +#if !CONFIG_IS_ENABLED(BLK) + #include + /* * These functions should take struct udevice instead of struct blk_desc, * but this is convenient for migration to driver model. Add a 'd' prefix From patchwork Fri Aug 23 20:48:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976264 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=aw4j1VVI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrBy146jgz1yXY for ; Sat, 24 Aug 2024 06:49:13 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B921788C72; Fri, 23 Aug 2024 22:48:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="aw4j1VVI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 834A388C72; Fri, 23 Aug 2024 22:48:43 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) (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 68E8D88BB8 for ; Fri, 23 Aug 2024 22:48:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-81fd925287eso81655439f.3 for ; Fri, 23 Aug 2024 13:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446120; x=1725050920; 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=CanB/Gvo8puF3XkUGNW8QcP2kttXCr7Cr53gforT/YU=; b=aw4j1VVIUoQgoWMPpwUDakg36M4JaupCSlDNp5ziAG80YGocGRYeKurbEC4HSId5Nv L2w3SQnIDDiTdreiAZ0Z+rKdG+uy7vksdyHrvdbQIhGWGa28SUVbdpYTnyhDrSmIqtjZ JLUyOzuRKjFJ5BoBhyg3VQAGEvANd31Rnl+NQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446120; x=1725050920; 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=CanB/Gvo8puF3XkUGNW8QcP2kttXCr7Cr53gforT/YU=; b=cgPgoz+foFrAGJynUks/NBBEstvu66oSi84MHFe3k1/M962cYtGY7ranYaOTr+P4gS +LmkS9XllTP+3W3KRZrsJlPn/pkD7oeemTO8SMFhtMCmXlqTwmxzOUnp+3hogQ8WWgIP doy46zX9+RbplwfVNshVDj9Bi40jdhzebpaXj8Xz/nYofNzjqz7gJwts3hfjrUskcLB0 mwY+19FTAIw0EdNWqok9PsS7jZgAZlAEYyTGpCbOLlnxUsCSg1emZsYQIlHn7hkpC+Ro eeO2cJvcrnyYewcT5DPhj9m531bCtvIwN8ULocRx5MiSVsZ93u8J+TDFa+wacGuui1LL jsmw== X-Gm-Message-State: AOJu0YwBIa+d+eQej3wshbiX9QeIvuowx50pn6eOM2V8+F9wEdSSWnHy bzr1qwCb6MuYbm7986/roqnCa0Al+B/squ1i5ip8k8cCQfW1FpEs6bG/8Tf+Qt4nrtQ5r7c+M4k = X-Google-Smtp-Source: AGHT+IHjh0ZZlY2gZIKBjK586JS7fRd5CDU8lcqMcu3CyVaH075C2PwjsRgN0b9KN++yig6L3kdvvg== X-Received: by 2002:a05:6e02:1947:b0:39b:4ec2:c5c1 with SMTP id e9e14a558f8ab-39e3c9c06a6mr32066455ab.18.1724446120094; Fri, 23 Aug 2024 13:48:40 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:39 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass , Caleb Connolly , Dragan Simic , Nam Cao , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Tony Dinh Subject: [PATCH v2 2/8] bootstd: Avoid calling unavailable block functions Date: Fri, 23 Aug 2024 14:48:18 -0600 Message-Id: <20240823204824.443631-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean When BLK is not enabled but BOOTSTD is, some features of standard boot become unavailable. Add a check for this in the only site that is currently apparent. Signed-off-by: Simon Glass --- (no changes since v1) boot/bootdev-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index 7c7bba088c9..e10be2baa30 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -434,6 +434,9 @@ int bootdev_find_by_label(const char *label, struct udevice **devp, struct uclass *uc; enum uclass_id id; + if (!CONFIG_IS_ENABLED(BLK)) + return -ENOSYS; + ret = label_to_uclass(label, &seq, &method_flags); if (ret < 0) return log_msg_ret("uc", ret); From patchwork Fri Aug 23 20:48:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976265 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Jma/JkE8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrByC1BHjz1yXY for ; Sat, 24 Aug 2024 06:49:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A8E188CC9; Fri, 23 Aug 2024 22:48:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Jma/JkE8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BBD3688C73; Fri, 23 Aug 2024 22:48:44 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 6451488C13 for ; Fri, 23 Aug 2024 22:48:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-39d26a8f9dbso8240335ab.1 for ; Fri, 23 Aug 2024 13:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446121; x=1725050921; 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=787ngcmRvCP5UuNtCXgeAyEI77RCaBcMsJAtZ9GljkU=; b=Jma/JkE8XMo3Ga8ev684FncxXlCneqp3PJVB+5EpWmLLVlb7Zpu9y1ulWAYBb2jb9/ k20BlQid6RUkIZo/Zvs7PMpFpiWT2ydIHec17DvRrtXUGF4f4/ziEbKOHcIuF3SZ+gvC 9FytGlSQHf6O6Tr21bzpmH36jpp/JY87my/rA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446121; x=1725050921; 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=787ngcmRvCP5UuNtCXgeAyEI77RCaBcMsJAtZ9GljkU=; b=P2gN4H6C85BkoK6cImhTohajKvB6SQeX62OCy/icBx6risWrFgmWPzHbqasMn9TQu5 eTheAct+setYEksODvSSNMsJqKGcXoXMMbt+1L2YWYciYlUgH1EmkYTZm0S+CxUkjC3q 75BsrxQDJJzHG+RjkZdaSLMEwVNfamUMWz/BADuEprQAFX1fb5cle/oRhuneKVeWna6B l4hP9N7Lcd07OsUlqx5XZxJfVZTt28SFQytxzxF1Zv9ez1sMvD+CKA9oLphsv7VA7wEa kYr6RGCboA2ZN8ocI5150V6BFgTBmDUDg/xc69jmPlHnSfct/YD/rHLC/ZGeH6M8wBZt A3rw== X-Gm-Message-State: AOJu0YyfHXJjQk3PEQ1qfld2nuJMhgl/YqUDa3zQC3ubs+61UCQwik14 iaGxI9XLOOz18NSFJGsCODfpuG0Vj0lfS8K0lhYbiwqPRSHemlbTjDaekdVlY8R2H4RLB328MyE = X-Google-Smtp-Source: AGHT+IFiv/msZmLG9O0yiTCIooYkOLhbar5cRAAlfYz5fxFYQ3u0rmKzZ7d45tB9cnU/1OHP4tMUqw== X-Received: by 2002:a05:6e02:1a81:b0:39e:3952:6dd4 with SMTP id e9e14a558f8ab-39e3c9c03c2mr43999085ab.20.1724446120934; Fri, 23 Aug 2024 13:48:40 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:40 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass , Eddie James , Heinrich Schuchardt , Ilias Apalodimas , Mattijs Korpershoek , Stefan Roese Subject: [PATCH v2 3/8] bootstd: Avoid depending on BLK Date: Fri, 23 Aug 2024 14:48:19 -0600 Message-Id: <20240823204824.443631-4-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean In principle bootstd can work without block devices, even if it does require driver model to be enabled in that case. The use of a 'depends on BLK' for BOOTSTD conflicts with the way 'BLK' is now defined, producing recursive errors through multiple different paths, one of which is this (with Linksprite_pcDuino3 and BOOTSTD_DEFAULTS enabled): arch/arm/Kconfig:7:error: recursive dependency detected! arch/arm/Kconfig:7: symbol ARM64 is selected by ARCH_UNIPHIER_V8_MULTI arch/arm/mach-uniphier/Kconfig:17: symbol ARCH_UNIPHIER_V8_MULTI is part of choice arch/arm/mach-uniphier/Kconfig:6: choice contains symbol ARCH_UNIPHIER_V8_MULTI arch/arm/mach-uniphier/Kconfig:17: symbol ARCH_UNIPHIER_V8_MULTI is part of choice SPL arch/arm/mach-stm32mp/Kconfig:3: symbol SPL depends on SUPPORT_SPL common/spl/Kconfig:1: symbol SUPPORT_SPL is selected by ASPEED_AST2600 arch/arm/mach-aspeed/Kconfig:26: symbol ASPEED_AST2600 is part of choice arch/arm/mach-aspeed/Kconfig:12: choice contains symbol ASPEED_AST2500 arch/arm/mach-aspeed/Kconfig:17: symbol ASPEED_AST2500 is part of choice DM_RESET arch/arm/mach-renesas/Kconfig.rcar3:197: symbol DM_RESET is selected by CLK_RCAR_GEN3 drivers/clk/renesas/Kconfig:53: symbol CLK_RCAR_GEN3 depends on CLK_RENESAS drivers/clk/renesas/Kconfig:1: symbol CLK_RENESAS depends on CLK drivers/clk/Kconfig:3: symbol CLK is selected by IMX8M_POWER_DOMAIN drivers/power/domain/Kconfig:35: symbol IMX8M_POWER_DOMAIN depends on POWER_DOMAIN drivers/power/domain/Kconfig:3: symbol POWER_DOMAIN is selected by BCM6318_USBH_PHY drivers/phy/Kconfig:83: symbol BCM6318_USBH_PHY depends on PHY drivers/phy/Kconfig:4: symbol PHY is selected by USB_EHCI_MX7 drivers/usb/host/Kconfig:211: symbol USB_EHCI_MX7 depends on USB drivers/usb/Kconfig:1: symbol USB is selected by BOOTSTD_DEFAULTS boot/Kconfig:455: symbol BOOTSTD_DEFAULTS depends on BOOTSTD boot/Kconfig:398: symbol BOOTSTD depends on BLK drivers/block/Kconfig:1: symbol BLK is selected by PVBLOCK drivers/xen/Kconfig:1: symbol PVBLOCK depends on XEN Kconfig:176: symbol XEN depends on ARM64 We don't want to revert the change to BLK, which has been in place for a year now. We don't want to select BLK in BOOTSTD since it should support booting without block devices. The only realistic option is to remove BOOTSTD's dependency on BLK. Disable standard boot on the one board which fails. Signed-off-by: Simon Glass wip --- Changes in v2: - Add new patch to resolve BOOTSTD->BLK recursion with Kconfig boot/Kconfig | 2 +- configs/gardena-smart-gateway-mt7688_defconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/boot/Kconfig b/boot/Kconfig index 7ac34574079..291919ea1ef 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -398,7 +398,7 @@ config BOOT_DEFAULTS menuconfig BOOTSTD bool "Standard boot" default y - depends on DM && OF_CONTROL && BLK + depends on DM && OF_CONTROL help U-Boot supports a standard way of locating something to boot, typically an Operating System such as Linux, provided by a distro such diff --git a/configs/gardena-smart-gateway-mt7688_defconfig b/configs/gardena-smart-gateway-mt7688_defconfig index f4642e3fcff..36bf5f11d9a 100644 --- a/configs/gardena-smart-gateway-mt7688_defconfig +++ b/configs/gardena-smart-gateway-mt7688_defconfig @@ -30,6 +30,7 @@ CONFIG_HAS_BOARD_SIZE_LIMIT=y CONFIG_BOARD_SIZE_LIMIT=655360 CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y +# CONFIG_BOOTSTD is not set CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_STOP_STR="x" From patchwork Fri Aug 23 20:48:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976266 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=PddURKPi; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrByN5xGMz1yXY for ; Sat, 24 Aug 2024 06:49:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8915688CCD; Fri, 23 Aug 2024 22:48:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="PddURKPi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E633E88CA2; Fri, 23 Aug 2024 22:48:45 +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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 66DA088C53 for ; Fri, 23 Aug 2024 22:48:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-39d4161c398so10277475ab.3 for ; Fri, 23 Aug 2024 13:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446122; x=1725050922; 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=eyhJ+R09/yj3MbPGE6e353C0s56hfCnQG2o+hVBYtlU=; b=PddURKPi6bDHpQWqszmQCRQKysqibljz+YU8tBOAjE/3HZNyzTcRU8p9iPKtzxq2Vx mXJWVNtDKoto4j0PXZeNJvR33Koka/1OA0KxyQi2zUyhsICFI16XYUhq1IvWPhtZETVs 4phnzu7lej0nRYKITpceKmAg5btzRJ50V1nso= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446122; x=1725050922; 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=eyhJ+R09/yj3MbPGE6e353C0s56hfCnQG2o+hVBYtlU=; b=Tqvifn3FLJEWJwhnzUVjCWaa1E5AEFW0bvgMzR0KWqHlqKg//hfitTdkQ6ssnk/pUk J6HnbisaHts5qg048GhbLuVb9kuC2AAYImUNFElVMkQZ2dIE4dblxn8lMENp36K5zARu Oy/PEDLfxZUKPkQDxmOfiwqQmygCOuVCBU6ioww6dvas8R355PiNE0/fOvoRewyAC6Qu Pju0AJ1jGmiaSI0VyOxuK1Csa1irqfFQWA4qGU6zIsVe87IExZbPt2UcsfipfvHImYjg ajLGK+HvAVMslniSx5Ki2x7GcOvZ2a3YqzWnNWocaVry0aLVI2xlkFofYReIXd6G2azN MUgQ== X-Gm-Message-State: AOJu0YzpIB3vGuzCXrIKBMwD2yF2zd6gsrl+JPQmacY6D1J+vaDCjcJE TclUVXS55Le4lgM2Mi7a4WviIeX6nHy2xoTgTop4aGHRG27Clebm67qBKWkHQRqePCaQ/Zt+74c = X-Google-Smtp-Source: AGHT+IEVwVbmiY6kKP0Tja6SYe2/1Nr87o0MxKPzESS8FiUicc3//TMaidgRzPdCQv8eSLZt/38V6g== X-Received: by 2002:a05:6e02:1a66:b0:376:410b:ae69 with SMTP id e9e14a558f8ab-39e3c98dd3emr36536795ab.15.1724446121835; Fri, 23 Aug 2024 13:48:41 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:41 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass , Mattijs Korpershoek , AKASHI Takahiro , Eddie James , Heinrich Schuchardt , Ilias Apalodimas , Julien Masson Subject: [PATCH v2 4/8] sunxi: Add a bootmeth for FEL Date: Fri, 23 Aug 2024 14:48:20 -0600 Message-Id: <20240823204824.443631-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add support for booting from a script loaded over FEL. This mirrors the bootcmd_fel provided by distro boot. Signed-off-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- Changes in v2: - Put the FEL bootmeth before all other global bootmeths boot/Kconfig | 14 ++++++++ boot/Makefile | 1 + boot/bootmeth_fel.c | 81 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 boot/bootmeth_fel.c diff --git a/boot/Kconfig b/boot/Kconfig index 291919ea1ef..7d6e819bde6 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -585,6 +585,20 @@ config BOOTMETH_EFI_BOOTMGR the EFI binary to be launched is determined. To set the EFI variables use the eficonfig command. +config BOOTMETH_FEL + bool "Bootdev support for Sunxi FEL" + depends on ARCH_SUNXI + default y + help + Enables support for booting over USB on a Sunxi device. This uses + the FEL protocol and obtains the script address from the + 'fel_scriptaddr' environment variable. + + This method is only available if booting from FEL, i.e. the + 'fel_booted' environment variable is set. + + See https://linux-sunxi.org/FEL/Protocol for more information. + config BOOTMETH_QFW bool "Boot method using QEMU parameters" depends on QFW diff --git a/boot/Makefile b/boot/Makefile index f4675d6ffd5..295f27dfd39 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -30,6 +30,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX) += bootmeth_extlinux.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX_PXE) += bootmeth_pxe.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_CROS) += bootm.o bootm_os.o bootmeth_cros.o +obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_FEL) += bootmeth_fel.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_QFW) += bootmeth_qfw.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o diff --git a/boot/bootmeth_fel.c b/boot/bootmeth_fel.c new file mode 100644 index 00000000000..160ba6eb827 --- /dev/null +++ b/boot/bootmeth_fel.c @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Bootmethod for sunxi FEL loading + * + * Copyright 2024 Google LLC + * Written by Simon Glass + */ + +#define LOG_CATEGORY UCLASS_BOOTSTD + +#include +#include +#include +#include +#include +#include + +static int fel_check(struct udevice *dev, struct bootflow_iter *iter) +{ + return 0; +} + +static int fel_read_bootflow(struct udevice *dev, struct bootflow *bflow) +{ + if (!env_get("fel_booted") || !env_get("fel_scriptaddr")) + return -ENOENT; + + bflow->state = BOOTFLOWST_READY; + + return 0; +} + +static int fel_read_file(struct udevice *dev, struct bootflow *bflow, + const char *file_path, ulong addr, ulong *sizep) +{ + return -ENOSYS; +} + +static int fel_boot(struct udevice *dev, struct bootflow *bflow) +{ + ulong addr; + int ret; + + addr = env_get_hex("fel_scriptaddr", 0); + ret = cmd_source_script(addr, NULL, NULL); + if (ret) + return log_msg_ret("boot", ret); + + return 0; +} + +static int fel_bootmeth_bind(struct udevice *dev) +{ + struct bootmeth_uc_plat *plat = dev_get_uclass_plat(dev); + + plat->desc = IS_ENABLED(CONFIG_BOOTSTD_FULL) ? + "Sunxi FEL boot over USB" : "FEL"; + plat->flags = BOOTMETHF_GLOBAL; + + return 0; +} + +static struct bootmeth_ops fel_bootmeth_ops = { + .check = fel_check, + .read_bootflow = fel_read_bootflow, + .read_file = fel_read_file, + .boot = fel_boot, +}; + +static const struct udevice_id fel_bootmeth_ids[] = { + { .compatible = "u-boot,fel-bootmeth" }, + { } +}; + +U_BOOT_DRIVER(bootmeth_2fel) = { + .name = "bootmeth_fel", + .id = UCLASS_BOOTMETH, + .of_match = fel_bootmeth_ids, + .ops = &fel_bootmeth_ops, + .bind = fel_bootmeth_bind, +}; From patchwork Fri Aug 23 20:48:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976267 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=IDdj/csD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrByZ3vBvz1yXY for ; Sat, 24 Aug 2024 06:49:42 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E711388B84; Fri, 23 Aug 2024 22:48:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IDdj/csD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 926B988915; Fri, 23 Aug 2024 22:48: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (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 37E7E88C72 for ; Fri, 23 Aug 2024 22:48:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-39d31d16d39so8666825ab.0 for ; Fri, 23 Aug 2024 13:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446123; x=1725050923; 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=9T8Fnwnw1unBrZVbfatUhdSZjLgpwMkl4MIYJvm/rXc=; b=IDdj/csDGUp/eZxn900SEHW5O8ExTGhkZ9QSnS4FLA4IMDtFx9FIQ9I5qvefhXodcx jUDWN9M/KObdMxfxhagJPcaUgpJBkrtht9xyqCfy6yDhIQm5ipvUwf7xKxVf6S21KT/w zGvsLfnS8KGAY8QJgmwREYVUCIM7yEzjeuQWk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446123; x=1725050923; 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=9T8Fnwnw1unBrZVbfatUhdSZjLgpwMkl4MIYJvm/rXc=; b=VXD5DpCz58JBczRpa7vvT+ru+TPNNUHiYJYm7rhrwb89pny5AaOxYgzYC7QsoNgcPb XzcbRNFOuGE8gf/61wlBI0x06ObNKttvi+GoLpuahuufQWq23ffoFNy7ZW5MQg8KkuCa +oKM33wb6B70i3Dlgkmd8Mjc8jJW5uCA28QNlX9TcKajL/sGQnrqux4tY2BMyR+9m1tk lPceBKyDITPZn11RJJ/McZD6uf624fr0+52FZIaY9N+v46NfkgWxUu+2kFuDevCqvkDf 4qyqOHP3zIWcgf1sCIJFRZpCyLqRxE25NNXzhNEbn1UezDjJU5ZVZXPeoR/XEO77Nvqw LqGQ== X-Gm-Message-State: AOJu0YxEmvK1Ubjo6bCWpQGSgAHuLC1toYEPl/rU4ds18DRbHUflLBMN 2JufoiVS2pug67/booIVLspWEKTmtLqQ5ptQ0HnJw6r4mNEa6Gq0+eSWrMvH71hE1RJIK/2cc5o = X-Google-Smtp-Source: AGHT+IFoHBjerXq6rxQJzHQ9H2RJqjqINBBhkU/cECHsYgQ32O0qj3XoCDfpuN//2hzV1Ggau3r7iQ== X-Received: by 2002:a92:c569:0:b0:39d:47cf:2c7f with SMTP id e9e14a558f8ab-39e3c9e9965mr36722845ab.24.1724446122834; Fri, 23 Aug 2024 13:48:42 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:42 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass , Alper Nebi Yasak , Andrew Davis , Caleb Connolly , =?utf-8?b?Q3PDs2vDoXMgQmVuY2U=?= , Marek Vasut , Michal Simek , Peter Robinson , Rayagonda Kokatanur , Sumit Garg , Venkatesh Yadav Abbarapu Subject: [PATCH v2 5/8] sunxi: Move to bootstd Date: Fri, 23 Aug 2024 14:48:21 -0600 Message-Id: <20240823204824.443631-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Drop support for distroboot and move to using bootstd instead. Signed-off-by: Simon Glass --- Changes in v2: - Convert the other DISTRO_DEFAULTS in the Kconfig too arch/arm/Kconfig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 656f588a97c..4e36a4814b8 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1147,7 +1147,7 @@ config ARCH_SUNXI select BINMAN select CMD_GPIO select CMD_MMC if MMC - select CMD_USB if DISTRO_DEFAULTS && USB_HOST + select CMD_USB if BOOTSTD_DEFAULTS && USB_HOST select CLK select DM select DM_GPIO @@ -1169,9 +1169,9 @@ config ARCH_SUNXI select SUNXI_GPIO select SYS_NS16550 select SYS_THUMB_BUILD if !ARM64 - select USB if DISTRO_DEFAULTS - select USB_KEYBOARD if DISTRO_DEFAULTS && USB_HOST - select USB_STORAGE if DISTRO_DEFAULTS && USB_HOST + select USB if BOOTSTD_DEFAULTS + select USB_KEYBOARD if BOOTSTD_DEFAULTS && USB_HOST + select USB_STORAGE if BOOTSTD_DEFAULTS && USB_HOST select SPL_USE_TINY_PRINTF if SPL select USE_PREBOOT select SYS_RELOC_GD_ENV_ADDR @@ -1179,7 +1179,7 @@ config ARCH_SUNXI imply CMD_DM imply CMD_GPT imply CMD_UBI if MTD_RAW_NAND - imply DISTRO_DEFAULTS + imply BOOTSTD_DEFAULTS imply DM_REGULATOR imply DM_REGULATOR_FIXED imply FAT_WRITE From patchwork Fri Aug 23 20:48:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976268 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=oQfuT3mG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrByl3wkxz1yXY for ; Sat, 24 Aug 2024 06:49:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4DCB888C73; Fri, 23 Aug 2024 22:48:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oQfuT3mG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 076B988C73; Fri, 23 Aug 2024 22:48: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 0163688C4A for ; Fri, 23 Aug 2024 22:48:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-81fd1e05a5aso101541139f.0 for ; Fri, 23 Aug 2024 13:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446123; x=1725050923; 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=7YlvqTU+7iaCKO8cXZCpPZ8cKdNsWuW30LbujZ1j/dY=; b=oQfuT3mGo/EOk9nO1Xunc+9gsmb3rC3YYUnc5Dbj/RI+EtOe7O9BCJ2iYpfhwmDRG5 MhfnhyFCP2767h/f8yyG9Ubs0Y1t0FxuNWLCE+ajm9TgFIm4Ph0dd+3oJVLBtToELZZK dYCYedIkCqlz3UIdX8ZkELK+w1YBjiF/Jkc1Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446123; x=1725050923; 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=7YlvqTU+7iaCKO8cXZCpPZ8cKdNsWuW30LbujZ1j/dY=; b=QXWQIQLLe+JVfvx9EHvXeKrsKBHvnadiphwacvlvJy2gwmOoE7/ekXBXWQCm4FCFEo kCjNsHGMRKe9ZNXX+0h9CVjLKHtIr9CA984MAI0SThhr3Z+cQdfFRZJPjkcyYYUAz7Gi vhYNoJof2eKjWZX0RAlDWL7NTFUbYFGtU02E+0sJDDjnAxUAVEVcm7ILBEwlE7hEFMWr otxpsNK+lniu0MXe8UqQ6QedNu19Y2/YSQwbhAwLW/JDWODhwoaTFWf+iF9RrBD3Sp8n +OVvG3pwsl1ey3e76mXverZB6ZaeTrme/aa0zwxKQcxtzHDkKnxwSQOFVGRnAzaebgyz q+kg== X-Gm-Message-State: AOJu0YxqL8EqtW+02yZ0QROm5jl2MOkpXkKpn0av2puBk0dSBiNs7cHV Z42yfw+tAiaZ/p2JtEoQrlQt3oRWbyrsy5ghoBLSXBcyvHYZutLT393tXfaK6gYPMinUBSnvCDU = X-Google-Smtp-Source: AGHT+IGQn94UMZSeGOS31Ypcp7eePZhOcFG2BQSEVDW3pplhOmghx3bQYegHgK6OWJbeP5xK/BoNxA== X-Received: by 2002:a05:6e02:b2c:b0:397:2dcd:80e5 with SMTP id e9e14a558f8ab-39e3c9ee72cmr33090025ab.27.1724446123583; Fri, 23 Aug 2024 13:48:43 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:43 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass Subject: [PATCH v2 6/8] sunxi: Drop old distro boot variables Date: Fri, 23 Aug 2024 14:48:22 -0600 Message-Id: <20240823204824.443631-7-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean These are not needed as bootstd handles the boot now. Drop them. Keep BOOTCMD_SUNXI_COMPAT for now since it does not relate to distro boot. Signed-off-by: Simon Glass --- Changes in v2: - Keep BOOTCMD_SUNXI_COMPAT include/configs/sunxi-common.h | 75 +--------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index b29a25d5617..666553ccadb 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -156,76 +156,6 @@ "fdt ram " FDT_ADDR_R " 0x100000;" \ "ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0" -/**************************************************************************** - * definitions for the distro boot system * - ****************************************************************************/ -#ifdef CONFIG_MMC -#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1 -#define BOOTENV_DEV_MMC_AUTO(devtypeu, devtypel, instance) \ - BOOTENV_DEV_MMC(MMC, mmc, 0) \ - BOOTENV_DEV_MMC(MMC, mmc, 1) \ - "bootcmd_mmc_auto=" \ - "if test ${mmc_bootdev} -eq 1; then " \ - "run bootcmd_mmc1; " \ - "run bootcmd_mmc0; " \ - "elif test ${mmc_bootdev} -eq 0; then " \ - "run bootcmd_mmc0; " \ - "run bootcmd_mmc1; " \ - "fi\0" - -#define BOOTENV_DEV_NAME_MMC_AUTO(devtypeu, devtypel, instance) \ - "mmc_auto " - -#define BOOT_TARGET_DEVICES_MMC(func) func(MMC_AUTO, mmc_auto, na) -#else -#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) -#endif -#else -#define BOOT_TARGET_DEVICES_MMC(func) -#endif - -#ifdef CONFIG_AHCI -#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) -#else -#define BOOT_TARGET_DEVICES_SCSI(func) -#endif - -#ifdef CONFIG_USB_STORAGE -#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) -#else -#define BOOT_TARGET_DEVICES_USB(func) -#endif - -#ifdef CONFIG_CMD_PXE -#define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) -#else -#define BOOT_TARGET_DEVICES_PXE(func) -#endif - -#ifdef CONFIG_CMD_DHCP -#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) -#else -#define BOOT_TARGET_DEVICES_DHCP(func) -#endif - -/* FEL boot support, auto-execute boot.scr if a script address was provided */ -#define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \ - "bootcmd_fel=" \ - "if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then " \ - "echo '(FEL boot)'; " \ - "source ${fel_scriptaddr}; " \ - "fi\0" -#define BOOTENV_DEV_NAME_FEL(devtypeu, devtypel, instance) \ - "fel " - -#define BOOT_TARGET_DEVICES(func) \ - func(FEL, fel, na) \ - BOOT_TARGET_DEVICES_MMC(func) \ - BOOT_TARGET_DEVICES_SCSI(func) \ - BOOT_TARGET_DEVICES_USB(func) \ - BOOT_TARGET_DEVICES_PXE(func) \ - BOOT_TARGET_DEVICES_DHCP(func) - #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT #define BOOTCMD_SUNXI_COMPAT \ "bootcmd_sunxi_compat=" \ @@ -242,8 +172,6 @@ #define BOOTCMD_SUNXI_COMPAT #endif -#include - #ifdef CONFIG_USB_KEYBOARD #define CONSOLE_STDIN_SETTINGS \ "stdin=serial,usbkbd\0" @@ -296,7 +224,6 @@ "uuid_gpt_esp=" UUID_GPT_ESP "\0" \ "uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \ "partitions=" PARTS_DEFAULT "\0" \ - BOOTCMD_SUNXI_COMPAT \ - BOOTENV + BOOTCMD_SUNXI_COMPAT #endif /* _SUNXI_COMMON_CONFIG_H */ From patchwork Fri Aug 23 20:48:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976269 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=FHpJx9wP; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrByy0frgz1yXY for ; Sat, 24 Aug 2024 06:50:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A674788C13; Fri, 23 Aug 2024 22:48:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="FHpJx9wP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E436488C4A; Fri, 23 Aug 2024 22:48: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 EC41688BB8 for ; Fri, 23 Aug 2024 22:48:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-39d31d16d39so8666975ab.0 for ; Fri, 23 Aug 2024 13:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446124; x=1725050924; 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=T3NGysIURVfwegCzeA/xdhxgn3RIbBvvtjgVsniddSU=; b=FHpJx9wPIIgCM1a3ckM1Y3bXNu8e3pvhbJA1noRKKfPoX2raINT+jRx9HLe2wOVuRE DkKV2dGziGMMMUsmOev9HH7IFoyk8l9pHo5zCt/6zEtaQ9rvAgcwrAM0pJUOmfS44NXr UDy5b7W8w2GXbq9+V7osaBcuRqlsTlLHoV3iE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446124; x=1725050924; 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=T3NGysIURVfwegCzeA/xdhxgn3RIbBvvtjgVsniddSU=; b=dMdfowJhZG6NlJ8D64WTNT0y5A9nEkorsAL0IO11UPxdyVcVicGWQLJVXNzplJRh90 JV9vo2vrYscNh1HR8AeK0y0MnHpwhX13VKQ0yj9hJTLgcH+2I8S6CzPhaIXFzZbMjn60 TQxR3OkEcBSfGilHJtGwlVGMbgnd5xMQDAfOuzln1FT6dtZhfGeBuNwrVaAXJX+qbiS/ 3oK6TfRgtxz+F6K33w+SMmHPJOlsnwDmYbZAfPw/myHmjACzS9lN7Lpk4nbY3a9MCHcp oFs4us6Gh+PcfEM/5BRgAPHuKMd8oLq+pm75mdSFeqYkyp8HQf+mM482qI+kh9P2CnLD VdQw== X-Gm-Message-State: AOJu0YzLG8H6YqOlYjrGcyVrCtn+Fh4WatV+cHy7XWKflokeKBpuGQYB 82/ZnTPCdgN/VIavOmJZfAtxE6B3L8toY3FXiU/DD3da21rS3AskWj6gLF1W5BHOpDH9CnR14ak = X-Google-Smtp-Source: AGHT+IFLdOZU8Uf7KUWrCBrjcHGYislw7x1q6fWdDSNpF3mec46iR/P1dJ8ApenEqRibgxz6r0uL6Q== X-Received: by 2002:a05:6e02:1b08:b0:39b:2aec:6729 with SMTP id e9e14a558f8ab-39e3c9848d4mr41415855ab.12.1724446124624; Fri, 23 Aug 2024 13:48:44 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass , Andrew Davis , Bryan Brattlof , Caleb Connolly , Heinrich Schuchardt , Janne Grunau , Jesse Taube , Joe Hershberger , "Leon M. Busch-George" , Marek Vasut , Michal Simek , Quentin Schulz , Ramon Fried , Rasmus Villemoes , Sumit Garg Subject: [PATCH v2 7/8] env: Provide a work-around for unquoting fdtfile Date: Fri, 23 Aug 2024 14:48:23 -0600 Message-Id: <20240823204824.443631-8-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Some boards use a CONFIG option to specify the value of this variable. This is normally handled by efi_get_distro_fdt_name() but in the case of sunxi this does not work, since 'soc' is sunxi, but the files are in the allwinner directory. Provide a work-around for this particular case. Signed-off-by: Simon Glass --- (no changes since v1) Makefile | 1 + doc/usage/environment.rst | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/Makefile b/Makefile index 9a52cc8d0b4..2452a916244 100644 --- a/Makefile +++ b/Makefile @@ -1844,6 +1844,7 @@ quiet_cmd_gen_envp = ENVP $@ $(CPP) -P $(cpp_flags) -x assembler-with-cpp -undef \ -D__ASSEMBLY__ \ -D__UBOOT_CONFIG__ \ + -DDEFAULT_DEVICE_TREE=$(subst ",,$(CONFIG_DEFAULT_DEVICE_TREE)) \ -I . -I include -I $(srctree)/include \ -include linux/kconfig.h -include include/config.h \ -I$(srctree)/arch/$(ARCH)/include \ diff --git a/doc/usage/environment.rst b/doc/usage/environment.rst index cc33d3ec0f2..eaebf61742a 100644 --- a/doc/usage/environment.rst +++ b/doc/usage/environment.rst @@ -87,6 +87,18 @@ settings. For example:: #include +Quotes are not supressed, for example:: + + fdtfile=CONFIG_DEFAULT_DEVICE_TREE.dtb + # produces: fdtfile="sun7i-a20-pcduino3.dtb" + +For this particular issue you can use DEFAULT_DEVICE_TREE instead:: + + fdtfile=DEFAULT_DEVICE_TREE.dtb + # produces: fdtfile=sun7i-a20-pcduino3.dtb + +There is no general way to remove quotes. + If CONFIG_ENV_SOURCE_FILE is empty and the default filename is not present, then the old-style C environment is used instead. See below. From patchwork Fri Aug 23 20:48:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1976270 X-Patchwork-Delegate: andre.przywara@arm.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Eb68LBZp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WrBz82Vzvz1ydn for ; Sat, 24 Aug 2024 06:50:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06D4488C91; Fri, 23 Aug 2024 22:48:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Eb68LBZp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 351B788C4A; Fri, 23 Aug 2024 22:48: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.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (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 02FEA88CC6 for ; Fri, 23 Aug 2024 22:48:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-39d2ac2a9d9so7720345ab.0 for ; Fri, 23 Aug 2024 13:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1724446125; x=1725050925; 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=V13Cb7NKqFATvUo0haWqc9U7q4tNtke+ZOWkLXEooyc=; b=Eb68LBZpr/RNY7kqCeIwnPMQSnsDCqse6WRW4HAAvtHmZWJcd0UmMXEoM9eWfhJht/ UNCNY1Yq5it+1ymh4s80CptdjnWUn9aFxQ3YHCrEazkgiljee3KIUSWj5slHtTRLZkZk mBwpev5FRtzxcvjO3su1AnANfnOkz/AZ2uZ60= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724446125; x=1725050925; 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=V13Cb7NKqFATvUo0haWqc9U7q4tNtke+ZOWkLXEooyc=; b=D5PFQC8ZkWXoQRbtz9Zur2gLXFKmFUp6sAlD8A2d6RmuEBohAIcMhQx47a5B2yYlMf 85M7S+lBz6SLMRjmjF87cwOtmdRmBIoAUgiJ4itY+yilk2w0TQxr2L0WXF7yHA7l0j17 Q6aM0GZ1Puyi0Xle+dhopkbHDT8M5IrfbPf/ESSnvExH4RSzWWF7lQIoR3ZwJG3PpUwb pF/NcuuV46xsaH9ENK6WQXKGfQIXiYFm1S70xjkN//Cs2jR1nMbhk+rCmPfjpWI0/WpC +cx+58oG1Ny21Qew6bbvTcEsMcE14I9iIsDwGKHXzPDJdyD/ydU6PIj0FXhnfpn/CSuS Exfg== X-Gm-Message-State: AOJu0Ywi06bxKQlKNhbgb11zmmzSzeS4e9K4LiHPcWt04aqyYhwngf7j 4+P3A3uKveqUSQa8mJqEouqpfhSfEvvFsPGXErU0H6A2a53NxQN1pNf4dKpKxM85K0BQBpkvRgQ = X-Google-Smtp-Source: AGHT+IGNxqu2MBOIi4M2dmda9cKjyhtfL4ldWuqD1WpPsvKhRDqmA2M2dFU40kwsigwtwPoZWy/ulA== X-Received: by 2002:a05:6e02:1b08:b0:39b:388c:3697 with SMTP id e9e14a558f8ab-39e3c9ee3b3mr39103615ab.28.1724446125431; Fri, 23 Aug 2024 13:48:45 -0700 (PDT) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-39d73e67addsm15698375ab.4.2024.08.23.13.48.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2024 13:48:45 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Jagan Teki , Andre Przywara , Simon Glass , Hans de Goede Subject: [PATCH v2 8/8] sunxi: Move to text environment Date: Fri, 23 Aug 2024 14:48:24 -0600 Message-Id: <20240823204824.443631-9-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240823204824.443631-1-sjg@chromium.org> References: <20240823204824.443631-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Convert these boards to use a text environment. For the boards check, the only differences are extra spaces after the semicolons in 'dfu_alt_info_ram' and 'partitions', both of which are permitted. Add in the special boot command for old kernels, dropping the unnecessary and confusing hex prefixes. Signed-off-by: Simon Glass --- Changes in v2: - Keep bootcmd_sunxi_compat if OLD_SUNXI_KERNEL_COMPAT is enabled board/sunxi/sunxi.env | 152 ++++++++++++++++++++++++++++++ include/configs/sunxi-common.h | 165 --------------------------------- 2 files changed, 152 insertions(+), 165 deletions(-) create mode 100644 board/sunxi/sunxi.env diff --git a/board/sunxi/sunxi.env b/board/sunxi/sunxi.env new file mode 100644 index 00000000000..6f28e720081 --- /dev/null +++ b/board/sunxi/sunxi.env @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Common sunxi environment + * + * Copyright 2024 Google LLC + * Written by Simon Glass + / + +/**************************************************************************** + * environment variables holding default load addresses * + ****************************************************************************/ +/* + * We cannot use expressions here, because expressions won't be evaluated in + * autoconf.mk. + */ +#ifdef CONFIG_ARM64 +/* + * Boards seem to come with at least 512MB of DRAM. + * The kernel should go at 512K, which is the default text offset (that will + * be adjusted at runtime if needed). + * There is no compression for arm64 kernels (yet), so leave some space + * for really big kernels, say 256MB for now. + * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(0080000) +#define KERNEL_COMP_ADDR_R SDRAM_OFFSET(4000000) +#define KERNEL_COMP_SIZE 0xb000000 +#define FDT_ADDR_R SDRAM_OFFSET(FA00000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(FC00000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(FD00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(FE00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(FF00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 256) +/* + * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. + * 32M uncompressed kernel, 16M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0xa000000 +#define KERNEL_ADDR_R SDRAM_OFFSET(2000000) +#define FDT_ADDR_R SDRAM_OFFSET(3000000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(3100000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(3200000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(3300000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(3400000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 64) +/* + * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. + * 16M uncompressed kernel, 8M compressed kernel, 1M fdt, + * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. + */ +#define BOOTM_SIZE 0x2e00000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1800000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1900000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1A00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1B00000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1C00000) + +#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 32) +/* + * 32M RAM minus 2.5MB for u-boot, heap, stack, etc. + * 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script, + * 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB) + */ +#define BOOTM_SIZE 0x1700000 +#define KERNEL_ADDR_R SDRAM_OFFSET(1000000) +#define FDT_ADDR_R SDRAM_OFFSET(1d50000) +#define SCRIPT_ADDR_R SDRAM_OFFSET(1d40000) +#define PXEFILE_ADDR_R SDRAM_OFFSET(1d00000) +#define FDTOVERLAY_ADDR_R SDRAM_OFFSET(1d20000) +#define RAMDISK_ADDR_R SDRAM_OFFSET(1800000) + +#else +#error Need at least 32MB of DRAM. Please adjust load addresses. +#endif + +#define UUID_GPT_ESP "" + +#ifdef CONFIG_ARM64 +#define UUID_GPT_SYSTEM b921b045-1df0-41c3-af44-4c6f280d3fae +#else +#define UUID_GPT_SYSTEM 69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endif + +stdin=serial +#ifdef CONFIG_USB_KEYBOARD +stdin+=,usbkbd +#endif + +stdout=serial +stderr=serial +#ifdef CONFIG_VIDEO +stdout+=,vidconsole +stderr+=,vidconsole +#endif + +bootm_size=BOOTM_SIZE +kernel_addr_r=KERNEL_ADDR_R +fdt_addr_r=FDT_ADDR_R +scriptaddr=SCRIPT_ADDR_R +pxefile_addr_r=PXEFILE_ADDR_R +fdtoverlay_addr_r=FDTOVERLAY_ADDR_R +ramdisk_addr_r=RAMDISK_ADDR_R + +#ifdef CONFIG_ARM64 +kernel_comp_addr_r=KERNEL_COMP_ADDR_R +kernel_comp_size=KERNEL_COMP_SIZE +#endif + +dfu_alt_info_ram= + kernel ram KERNEL_ADDR_R 0x1000000; + fdt ram FDT_ADDR_R 0x100000; + ramdisk ram RAMDISK_ADDR_R 0x4000000 + +#ifdef CONFIG_ARM64 +fdtfile=allwinner/DEFAULT_DEVICE_TREE.dtb +#else +fdtfile=DEFAULT_DEVICE_TREE.dtb +#endif + +console=ttyS0,115200 + +uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b +#ifdef CONFIG_ARM64 +uuid_gpt_system=b921b045-1df0-41c3-af44-4c6f280d3fae +#else +uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3 +#endif + +partitions= + name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1}; + name=loader2,size=984k,uuid=${uuid_gpt_loader2}; + name=esp,size=128M,bootable,uuid=${uuid_gpt_esp}; + name=system,size=-,uuid=${uuid_gpt_system}; + +/* support booting a very old kernel */ +#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT +bootcmd_sunxi_compat= + setenv root /dev/mmcblk0p3 rootwait; + if ext2load mmc 0 44000000 uEnv.txt; then + "echo Loaded environment from uEnv.txt; + "env import -t 44000000 ${filesize}; + fi; + setenv bootargs console=${console} root=${root} ${extraargs}; + ext2load mmc 0 43000000 script.bin && + ext2load mmc 0 48000000 uImage && + bootm 48000000 +#endif diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 666553ccadb..ceea26494ad 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -61,169 +61,4 @@ #define PHYS_SDRAM_0 CFG_SYS_SDRAM_BASE #define PHYS_SDRAM_0_SIZE 0x80000000 /* 2 GiB */ -/**************************************************************************** - * environment variables holding default load addresses * - ****************************************************************************/ -/* - * We cannot use expressions here, because expressions won't be evaluated in - * autoconf.mk. - */ -#ifdef CONFIG_ARM64 -/* - * Boards seem to come with at least 512MB of DRAM. - * The kernel should go at 512K, which is the default text offset (that will - * be adjusted at runtime if needed). - * There is no compression for arm64 kernels (yet), so leave some space - * for really big kernels, say 256MB for now. - * Scripts, PXE and DTBs should go afterwards, leaving the rest for the initrd. - */ -#define BOOTM_SIZE __stringify(0xa000000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(0080000)) -#define KERNEL_COMP_ADDR_R __stringify(SDRAM_OFFSET(4000000)) -#define KERNEL_COMP_SIZE __stringify(0xb000000) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(FA00000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(FC00000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(FD00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(FE00000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(FF00000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 256) -/* - * 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. - * 32M uncompressed kernel, 16M compressed kernel, 1M fdt, - * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. - */ -#define BOOTM_SIZE __stringify(0xa000000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(3300000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3400000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 64) -/* - * 64M RAM minus 2MB heap + 16MB for u-boot, stack, fb, etc. - * 16M uncompressed kernel, 8M compressed kernel, 1M fdt, - * 1M script, 1M pxe, 1M dt overlay and the ramdisk at the end. - */ -#define BOOTM_SIZE __stringify(0x2e00000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1800000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1900000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1A00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1B00000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1C00000)) - -#elif (CONFIG_SUNXI_MINIMUM_DRAM_MB >= 32) -/* - * 32M RAM minus 2.5MB for u-boot, heap, stack, etc. - * 16M uncompressed kernel, 7M compressed kernel, 128K fdt, 64K script, - * 128K DT overlay, 128K PXE and the ramdisk in the rest (max. 5MB) - */ -#define BOOTM_SIZE __stringify(0x1700000) -#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(1000000)) -#define FDT_ADDR_R __stringify(SDRAM_OFFSET(1d50000)) -#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(1d40000)) -#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(1d00000)) -#define FDTOVERLAY_ADDR_R __stringify(SDRAM_OFFSET(1d20000)) -#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(1800000)) - -#else -#error Need at least 32MB of DRAM. Please adjust load addresses. -#endif - -#define MEM_LAYOUT_ENV_SETTINGS \ - "bootm_size=" BOOTM_SIZE "\0" \ - "kernel_addr_r=" KERNEL_ADDR_R "\0" \ - "fdt_addr_r=" FDT_ADDR_R "\0" \ - "scriptaddr=" SCRIPT_ADDR_R "\0" \ - "pxefile_addr_r=" PXEFILE_ADDR_R "\0" \ - "fdtoverlay_addr_r=" FDTOVERLAY_ADDR_R "\0" \ - "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" - -#ifdef CONFIG_ARM64 -#define MEM_LAYOUT_ENV_EXTRA_SETTINGS \ - "kernel_comp_addr_r=" KERNEL_COMP_ADDR_R "\0" \ - "kernel_comp_size=" KERNEL_COMP_SIZE "\0" -#else -#define MEM_LAYOUT_ENV_EXTRA_SETTINGS "" -#endif - -#define DFU_ALT_INFO_RAM \ - "dfu_alt_info_ram=" \ - "kernel ram " KERNEL_ADDR_R " 0x1000000;" \ - "fdt ram " FDT_ADDR_R " 0x100000;" \ - "ramdisk ram " RAMDISK_ADDR_R " 0x4000000\0" - -#ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT -#define BOOTCMD_SUNXI_COMPAT \ - "bootcmd_sunxi_compat=" \ - "setenv root /dev/mmcblk0p3 rootwait; " \ - "if ext2load mmc 0 0x44000000 uEnv.txt; then " \ - "echo Loaded environment from uEnv.txt; " \ - "env import -t 0x44000000 ${filesize}; " \ - "fi; " \ - "setenv bootargs console=${console} root=${root} ${extraargs}; " \ - "ext2load mmc 0 0x43000000 script.bin && " \ - "ext2load mmc 0 0x48000000 uImage && " \ - "bootm 0x48000000\0" -#else -#define BOOTCMD_SUNXI_COMPAT -#endif - -#ifdef CONFIG_USB_KEYBOARD -#define CONSOLE_STDIN_SETTINGS \ - "stdin=serial,usbkbd\0" -#else -#define CONSOLE_STDIN_SETTINGS \ - "stdin=serial\0" -#endif - -#ifdef CONFIG_VIDEO -#define CONSOLE_STDOUT_SETTINGS \ - "stdout=serial,vidconsole\0" \ - "stderr=serial,vidconsole\0" -#else -#define CONSOLE_STDOUT_SETTINGS \ - "stdout=serial\0" \ - "stderr=serial\0" -#endif - -#define PARTS_DEFAULT \ - "name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};" \ - "name=loader2,size=984k,uuid=${uuid_gpt_loader2};" \ - "name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};" \ - "name=system,size=-,uuid=${uuid_gpt_system};" - -#define UUID_GPT_ESP "c12a7328-f81f-11d2-ba4b-00a0c93ec93b" - -#ifdef CONFIG_ARM64 -#define UUID_GPT_SYSTEM "b921b045-1df0-41c3-af44-4c6f280d3fae" -#else -#define UUID_GPT_SYSTEM "69dad710-2ce4-4e3c-b16c-21a1d49abed3" -#endif - -#define CONSOLE_ENV_SETTINGS \ - CONSOLE_STDIN_SETTINGS \ - CONSOLE_STDOUT_SETTINGS - -#ifdef CONFIG_ARM64 -#define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb" -#else -#define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb" -#endif - -#define CFG_EXTRA_ENV_SETTINGS \ - CONSOLE_ENV_SETTINGS \ - MEM_LAYOUT_ENV_SETTINGS \ - MEM_LAYOUT_ENV_EXTRA_SETTINGS \ - DFU_ALT_INFO_RAM \ - "fdtfile=" FDTFILE "\0" \ - "console=ttyS0,115200\0" \ - "uuid_gpt_esp=" UUID_GPT_ESP "\0" \ - "uuid_gpt_system=" UUID_GPT_SYSTEM "\0" \ - "partitions=" PARTS_DEFAULT "\0" \ - BOOTCMD_SUNXI_COMPAT - #endif /* _SUNXI_COMMON_CONFIG_H */