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: 691627 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp17132wru; Mon, 12 Jun 2023 01:15:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6V1V8qvQRlm0O48w/rqGmNB9OoA8ptzPGNfCM4nlmaWcLxBOmigey8VBOVKT95fKHASYC1 X-Received: by 2002:a05:6a20:43ac:b0:10c:6dbc:2806 with SMTP id i44-20020a056a2043ac00b0010c6dbc2806mr8505224pzl.46.1686557703573; Mon, 12 Jun 2023 01:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686557703; cv=none; d=google.com; s=arc-20160816; b=1BrIgU8W2TbdiwxEs/mb4Brl7R+7CRCxjjQUakgGh8TIWsgbhhlVVryE6LdOu8mmdz sIG5WmGjYjAyppKtg4beszVFqbUlwpCfFAEzMwMd7r7veqjrCgi0HuAwwVj9ejnFqVR0 0UH05GrIk0yM1A727HaNO1lnKMfBjVGG1Q4TmYg3X8rc92gbcCPmTriV34Bbm9YF0rv6 36VWI5EIpaK8aGLpCzfgmcEyrbm9/OKFIL7LOcGAKi+xy4MiPb4OjkvTnBgrtew7od0K zltXsa1Sw3FkI3dwokB3C4XrLtudL5SX4WaOm7hcCjpbFMz2FpdeiFO2JuJzUkggKHKl LbsA== 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=bumfp8O7XAdHeMTkY7Md+UNfLCPBaWNtgU9uikTvGtk=; b=k5zuGZYWtx4dmn9uDz8qnb796/e84AU6HfWILR21XoR3sWUoqtePg1FfpQBoY1WirH OQ+CW6Epz/YFfmAHrQnbc3KJEhoJqhxKvnWYX7dTaUq+heBh7Z+Zs+zKKMyXFXLdiJrP iS0kexvqT1AXP+SFp32DGSOiACnr2eGtrspN7/6gW81ynnB0TUWRI5IIN5QMdT7wpWNv 6YbMfmkhC12TPo7208xO6IYIiCYG8U6PndWqdmUECyacP8p8AUGCGGXkbVLykTwJuwNP oHyeKQE3hHTEtx+b5U4qGOGnzBRVGTF5yoQM3cYztMkM9VwGpGikv3vjRPodONqEIAgP iOvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xZTSgAwA; 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 w30-20020a63935e000000b005401008809bsi3862121pgm.752.2023.06.12.01.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 01:15:03 -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=xZTSgAwA; 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 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-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