From patchwork Mon May 29 14:02:29 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: 686709 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp251167wru; Mon, 29 May 2023 07:04:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Rbv5h7prU/g9mwE0QLUS2PED2ka78PQDtYt46WCoiK0ULn6nmetYYeW6/uU8W6EGc6rV/ X-Received: by 2002:a05:6a00:150e:b0:64d:22db:1023 with SMTP id q14-20020a056a00150e00b0064d22db1023mr16018011pfu.22.1685369051018; Mon, 29 May 2023 07:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685369050; cv=none; d=google.com; s=arc-20160816; b=VswtMmOeVcs5/tRoik608NZZu+NjCg5c6deM7tnZkuGSoPVukhfaLgm79WyP5E0CzS k2TECAvHJBMP96RvDzym9zjATzPmFHvzJ77kG3b2jWaUqd/cAi+LRrBhIGVV5a4fbATQ fLhr9465TvoP6lXgouo5R+6fbxS58vyk/BMUfkQ/9mo2H/+Zqj0rbjwDO2go9X1Qu5hm TUlxWdrSVmgwDrbivkmCLCFK3uRIqyZkGbhjA538BZnvKxU0bluKxLDjT2eXylr/L72w 7SQtgbg2t++WG+NAtoxwoYigiB5ODa/zLm+L14fbPMbr5F0Hx9ORh+w52xe2cHX+mojo h1NA== 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=FSEYhmor4ZwcGjeR1eh1eKiSz4JU7osriWh5ow/TABY=; b=o37014zxiYtJ6qz44b8Z15Dtvgvc//WxnsB1EppDYqABNE1rCvrW+Pa8DuJ7yxj3a3 WiCsSyblBrafCaJVObw8sPW/e0CY5tBKhak4RFlOk7FY5T1bUU6FS1iI6yYsQk5MYt9E RircuBEna3gj24WBBSpkpyRQiwJR22KKC+/XkWbZhqtyc846gQ/bD8XkS+N/oUfDIBgk t0LoY+dginTCDHxbQguApIoKVoHBWzL2zzN8xgbTMZkNtEkE3wPQFWERdBEiRKCX57fZ Pz8+W5KzidGkPniZRSg7tWoBRgqKGe1rN8w8osdUfPaznxbfxeySVobdWnhcHDZQfhdi bSPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h03JzuOg; 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 z124-20020a633382000000b00517f7c24652si8122331pgz.890.2023.05.29.07.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:04:10 -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=h03JzuOg; 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 3545385DEA; Mon, 29 May 2023 16:02:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="h03JzuOg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 588538215F; Mon, 29 May 2023 16:02:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E96188267E for ; Mon, 29 May 2023 16:02:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rui.silva@linaro.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f6ef9a928fso19082015e9.3 for ; Mon, 29 May 2023 07:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368963; x=1687960963; 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=FSEYhmor4ZwcGjeR1eh1eKiSz4JU7osriWh5ow/TABY=; b=h03JzuOgKNfvBdfuU+mD9uPPposU0phsbuXSE37y1b0fB1V+T67RHBuxC3FpQvIVAJ jpVEozv0YqJ4e/Z3dsFZ7kJRs5hN5T/2k8l8fPQiIhQhORKt1VrdA4aUhJYt22fUZni8 p/Kl7puJC04iCCEyaaqj5aki6EKxHI/nECNEf2AeQimqh3n+sdvZplV3BpoBPDes60JD 8WdGmOy9OOfVGQgWDA9NUoDGd0s+/vpGMxk7JFuozqkGr+zkiolDclMZrdZmTI8s7Pc4 FBVxbIjWpYBFXwlY+l1aUnl10MrU4aFK+1g3TWP2WqQA/qWPOIRo5aYQpVPwZT6dw6J+ 5D/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368963; x=1687960963; 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=FSEYhmor4ZwcGjeR1eh1eKiSz4JU7osriWh5ow/TABY=; b=VOjZMNGYjeTIAJ4rDM4BiZob/d+/5q70Im/wOzs2OqsVL7YpKgacXZ5+rT4fvG9ofc lo5HNGrFmS/f31Ag73h6o8Ji1tztvvxiWyArYTZO4zf/6A/d8xH+0kPg3QfHZe2YJKo4 wUPn+MM/wRpFMNq1gZTlV3dEs0Yzo5245SaMnrTaQBiHh5mEZ75w81oQjlKeX3y6b+C2 Yi1n27+jH1DmWK0P4el2Tjk4wfU3izYN+IcAFqJAFFJyQtQmasyELZg/ufDEgZhD6Ov7 5rLgy7ilhtg87dlVXGee/cFh/D6LIz122IqGjFJHX5P0N+LXjaR8zvcO4Uyzg7b4bad5 kVCw== X-Gm-Message-State: AC+VfDyoKFY0U3FYlWxtl8JGiBselV3G2xHPIQZ08cxaXLiwzQ/BnYvh yY+6ia0a5kZgclN4lv19p7QQsRZ2v7ZN1fjG5ww= X-Received: by 2002:a1c:7205:0:b0:3f6:1063:e4fc with SMTP id n5-20020a1c7205000000b003f61063e4fcmr8829020wmc.40.1685368963258; Mon, 29 May 2023 07:02:43 -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 w12-20020a5d544c000000b002fed865c55esm54123wrv.56.2023.05.29.07.02.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 07:02:43 -0700 (PDT) From: Rui Miguel Silva To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Rui Miguel Silva Subject: [PATCH v2 6/6] corstone1000: add nvmxip, fwu-mdata and gpt options Date: Mon, 29 May 2023 15:02:29 +0100 Message-Id: <20230529140229.3225090-7-rui.silva@linaro.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529140229.3225090-1-rui.silva@linaro.org> References: <20230529140229.3225090-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