From patchwork Tue May 2 13:12:00 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: 678400 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp500062wrs; Tue, 2 May 2023 06:13:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5LbOi/PcklH2c8M5fTF4dwwIkAk7aypgzjQyAd+JJACyZwPla/IQd3HRu/A+c25K8Uazvg X-Received: by 2002:a17:903:1c5:b0:1a6:77b8:23e0 with SMTP id e5-20020a17090301c500b001a677b823e0mr20840893plh.60.1683033224450; Tue, 02 May 2023 06:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683033224; cv=none; d=google.com; s=arc-20160816; b=lS8alsIAzctHofy6HbCGXBPiMwwdia4udMhqrz7U0CMLmjuHArpfrml2k3gA8h/zAz p8U81YID44Y//HQvXfqLkg/6Oa6gdUx5TG3mPB4XddGRhprw8/pinbH6q2c8KyDL3hWa 1Qh45UG5LMnr1GJPKkPzfK1GXxEucyDOCgFwKvWcLl/E9wEBooaFoLvF+hjPIf2m8JY2 nk2o0rXOnkzoQprA7V8nNSgQS4JhpHo0csJWbFAD4Is+YNR+Wy/JVrg9zDIYZNBcMKMR WRkN2uZT2T2ZpuA4aJU777CQ1EE4d8ZP6CNn6wWq6xipTun12E8Kg5JN/IoAlsaPpHNb dv5g== 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=Xxs8lJsVS2Tdiw1Eq8/YtsKOZ8Y7K7wM++EQTjGHcR8=; b=l1D4fqSlcedMkdEBDH9GF5StagKtl1SjUJVm6AiiaC7WOyEYRXyRmRhCjwv4z6g9aj wzPkkoW24YhYc8iQ/S6cyPOcBXvjCM9umhIBnUVGzJKfSohJrA6pWIa/EGWP4uGRzkud oZlS5WBgxkFUkRGprQwrl3PZUkyghKjgVQm+KgJaBowC+AtRr9BLn85OOgqxnFt9s6Yw TiclCvzuP7r+qBs4nLWLW3Ilm1ffme7woNEzLzA0ll8OqQLuNWTdllEDAgi07cdKTL06 v7j65HbHzUP2YKSygVqG6z1AKFWgYVIGrvNap0HYhuRGrOO/Owrt/kajfPipRpN0d3iK lgfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JDKSMPgV; 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 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 q16-20020a17090a2e1000b0024bccf6609dsi19425926pjd.114.2023.05.02.06.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:13:44 -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=JDKSMPgV; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D091E8475C; Tue, 2 May 2023 15:12:32 +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="JDKSMPgV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 91DAB84735; Tue, 2 May 2023 15:12: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=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 4CFEE84772 for ; Tue, 2 May 2023 15:12: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=rui.silva@linaro.org Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f19ab994ccso38987305e9.2 for ; Tue, 02 May 2023 06:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683033147; x=1685625147; 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=Xxs8lJsVS2Tdiw1Eq8/YtsKOZ8Y7K7wM++EQTjGHcR8=; b=JDKSMPgVYAW84xJplVZ4RZdrHSYPrfTxrxdprZE8V2LEd5zeJJESNHakTSL9uMQfMt cIcStAa4Y3vJsYvyLBPZ6je504R61YDzYmQ6vAVlANCrwxfjDppmINMXyiM/YQLEMHF0 e2IO1q8IDgReARIHCCHvg7C+osb485xi/r4OE5U07T2rZgRuryWKOG+oM7LdekTlyK5l uAJF8kiPRaaPRtOBoyIfo8Pi8/ohkZSFMkmthHHypbFBTf2dERj+H3QTflT29Ioq5hL6 Mck1jTe0xuzvMGSpv9UG3HJfnMvaxp6vH6qgHiEGxmPa9fMgwKvpIFNpD5H9YWXXw8Pe F0GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683033147; x=1685625147; 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=Xxs8lJsVS2Tdiw1Eq8/YtsKOZ8Y7K7wM++EQTjGHcR8=; b=lBJ2fUSidvGHcQMlabnNNAfbKowg4lyQE6GHo45JSkPE3MqMhiA6fZtxC13Mcywr2K W0l5eVA1N9aOe8Ar1fdZiSqp2lHUkQPSoOCQE9pJZnSwhGsPCb3TwFrpPlvI0hOfUyGm XRrRiPSF+SsrrABGIbH6R6chWxQxVgsdqLLm8soPTa3LfESBA8dqbSREUvr3ua9DH86j 1vvHNp0fa7ANkEf7GZKzcVvB+DGacvU3sfr26x7Af1uZgbzvY9RRixEzIO1qRL6atEIu lwpjAwjTMnzK0g1UN5Up4ZOvqfDb4Q/sCEnTPNlOvDm9lTjHngNtq7QliHxUiJh6eSQB pTtQ== X-Gm-Message-State: AC+VfDx5ZXuI5ii9/zYvTwu4AUA6z/1wTpDVxw5SbK0SX1sdVpu2PYMC cF7qcde54vpHuxKaWKxwrGpHuLLiTmcb7rebybc= X-Received: by 2002:a1c:4c0e:0:b0:3f0:7f4b:f3c0 with SMTP id z14-20020a1c4c0e000000b003f07f4bf3c0mr12917437wmf.19.1683033147494; Tue, 02 May 2023 06:12:27 -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 c21-20020a7bc855000000b003f17300c7dcsm35277121wml.48.2023.05.02.06.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 06:12:26 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH 6/6] corstone1000: add nvmxip, fwu-mdata and gpt options Date: Tue, 2 May 2023 14:12:00 +0100 Message-Id: <20230502131200.2551513-7-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502131200.2551513-1-rui.silva@linaro.org> References: <20230502131200.2551513-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