From patchwork Mon Jun 12 08:09:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 1793808 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=xZTSgAwA; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qfkxx72kyz20X6 for ; Mon, 12 Jun 2023 18:15:01 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EC95686199; Mon, 12 Jun 2023 10:13:54 +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="xZTSgAwA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A76D885FD2; Mon, 12 Jun 2023 10:13:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, 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 C04F186172 for ; Mon, 12 Jun 2023 10:13:30 +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=rui.silva@linaro.org Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30e56fc9fd2so3841755f8f.0 for ; Mon, 12 Jun 2023 01:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686557610; x=1689149610; 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=bumfp8O7XAdHeMTkY7Md+UNfLCPBaWNtgU9uikTvGtk=; b=xZTSgAwAbU6FE63/0+w87AeMtnMW/DubNf2wQinYAN/OLLlP9ih/d3rmlPfmGBfk8I cGo9nWShKsvBmbp7gnoCU0Hr2Wvc9O67nOumqcRCSE+5uCdLGLCY449RfFFtAH4fA7+m 2nD0Wk7hEpxA7HWBRGSW8V1NLnSApail2IY830ol+94ejQrDRXqH1YiaiuobTVpWtk5P fEdeFB3fCRz+fCOvEnt5CGjDp9lj2ptlUqkDXUwNS2g7KvoQ3t2Q8SR+VHsyoYkiUcn5 XRhSVHlQ2r6dNT2ZVIDIovF0tVgkEmU2CJZGa+A75d/gp0LNv4EdvAhLimAUsyKF+hZV O06Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686557610; x=1689149610; 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=bumfp8O7XAdHeMTkY7Md+UNfLCPBaWNtgU9uikTvGtk=; b=KS4eNDv4bNhh2L0jxXGe4xTDTA+hna1xFUXUz0sUWQjkJxHltk27YCbn6gb9QhyIKy XRS3pwiBczdYsWFR2HI7rUbpNYAKtk0+1EtChzLkhUTupvFTQiQGXkmKWchQEZUkT4No Ne9HQQ8T1HLsl9oEhdvoxsP+RRlk4HPjsS2BSLSOsa+dHw9FKuCmcKEgoLAGvbD8+ntP 0mJDoOfs2GjQWuMsXF5hD2We1vmiH88Sy3/8b0MCi5LncZaimrGPuqYCl0749vKfezOY 7mDDw3W7j46EiF3i4obEibvzHDxO9glvrq2roE0Br4FlPhnVJLg9acsaDS9lKTAGyT6m 3uig== X-Gm-Message-State: AC+VfDxC2IX1QdzmWSXxV4ZWH8nS6OYchBd2XQazUrFo6hy4FV8pQYlX cZdL1W3e6c9MUJ4D1UB/h4PZCPhdk+r5H0OS1Iw= X-Google-Smtp-Source: ACHHUZ4A8Omjdz7UInA8g6ZD+scFCao2DDyZ0fqq+Tl9AKvlkFp7w4p3QcsNAu85PBq0nGdrdZrTGA== X-Received: by 2002:a5d:44d2:0:b0:30f:c012:b529 with SMTP id z18-20020a5d44d2000000b0030fc012b529mr2147510wrr.56.1686557610053; Mon, 12 Jun 2023 01:13:30 -0700 (PDT) Received: from arch-thunder.local (a109-49-33-111.cpe.netcabo.pt. [109.49.33.111]) by smtp.gmail.com with ESMTPSA id m9-20020a056000008900b0030ae499da59sm11637390wrx.111.2023.06.12.01.13.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:13:29 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v3 6/6] corstone1000: add nvmxip, fwu-mdata and gpt options Date: Mon, 12 Jun 2023 09:09:20 +0100 Message-ID: <20230612081314.723786-7-rui.silva@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230612081314.723786-1-rui.silva@linaro.org> References: <20230612081314.723786-1-rui.silva@linaro.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 Enable the newest features: nvmxip, fwu-metadata and gpt. Commands to print the partition info, gpt info and fwu metadata will be available. Adjust also env boot script the address of the bootbank with the new gpt layout, and also remove the not needed kernel address bank0 and bank1 and retrieve function that would test the bank flag before and now we are getting the info from the fwu metadata. Signed-off-by: Rui Miguel Silva --- board/armltd/corstone1000/corstone1000.c | 1 + board/armltd/corstone1000/corstone1000.env | 10 +--------- configs/corstone1000_defconfig | 13 ++++++++++++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/board/armltd/corstone1000/corstone1000.c b/board/armltd/corstone1000/corstone1000.c index a4567449f1be..01c80aaf9d77 100644 --- a/board/armltd/corstone1000/corstone1000.c +++ b/board/armltd/corstone1000/corstone1000.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/armltd/corstone1000/corstone1000.env b/board/armltd/corstone1000/corstone1000.env index b24ff07fc6bd..ee318b1b1c30 100644 --- a/board/armltd/corstone1000/corstone1000.env +++ b/board/armltd/corstone1000/corstone1000.env @@ -1,13 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0+ */ usb_pgood_delay=250 -boot_bank_flag=0x08002000 -kernel_addr_bank_0=0x083EE000 -kernel_addr_bank_1=0x0936E000 -retrieve_kernel_load_addr= - if itest.l *${boot_bank_flag} == 0; then - setenv kernel_addr $kernel_addr_bank_0; - else - setenv kernel_addr $kernel_addr_bank_1; - fi; +boot_bank_flag=0x08005006 kernel_addr_r=0x88200000 diff --git a/configs/corstone1000_defconfig b/configs/corstone1000_defconfig index 5be5335bdfc1..a8a79fd10568 100644 --- a/configs/corstone1000_defconfig +++ b/configs/corstone1000_defconfig @@ -15,7 +15,7 @@ CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyAMA0 loglevel=9 ip=dhcp earlyprintk" -CONFIG_BOOTCOMMAND="run retrieve_kernel_load_addr; echo Loading kernel from $kernel_addr to memory ... ; loadm $kernel_addr $kernel_addr_r 0xc00000; usb start; usb reset; run distro_bootcmd; bootefi $kernel_addr_r $fdtcontroladdr;" +CONFIG_BOOTCOMMAND="echo Loading kernel from $kernel_addr to memory ... ; loadm $kernel_addr $kernel_addr_r 0xc00000; usb start; usb reset; run distro_bootcmd; bootefi $kernel_addr_r $fdtcontroladdr;" CONFIG_CONSOLE_RECORD=y CONFIG_LOGLEVEL=7 # CONFIG_DISPLAY_CPUINFO is not set @@ -24,11 +24,16 @@ CONFIG_BOARD_LATE_INIT=y CONFIG_SYS_MAXARGS=64 CONFIG_SYS_CBSIZE=512 # CONFIG_CMD_CONSOLE is not set +CONFIG_CMD_FWU_METADATA=y CONFIG_CMD_BOOTZ=y CONFIG_SYS_BOOTM_LEN=0x800000 # CONFIG_CMD_XIMG is not set +CONFIG_CMD_NVMXIP=y +CONFIG_CMD_GPT=y +# CONFIG_RANDOM_UUID is not set CONFIG_CMD_LOADM=y # CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set # CONFIG_CMD_NFS is not set @@ -40,6 +45,8 @@ CONFIG_OF_CONTROL=y CONFIG_VERSION_VARIABLE=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_REGMAP=y +CONFIG_FWU_MDATA=y +CONFIG_FWU_MDATA_GPT_BLK=y CONFIG_MISC=y # CONFIG_MMC is not set CONFIG_NVMXIP_QSPI=y @@ -51,6 +58,10 @@ CONFIG_RAM=y CONFIG_DM_RTC=y CONFIG_RTC_EMULATION=y CONFIG_DM_SERIAL=y +CONFIG_SYSRESET=y CONFIG_USB=y CONFIG_USB_ISP1760=y +CONFIG_EFI_CAPSULE_ON_DISK=y +CONFIG_EFI_IGNORE_OSINDICATIONS=y +CONFIG_FWU_MULTI_BANK_UPDATE=y CONFIG_ERRNO_STR=y