From patchwork Mon May 16 03:25:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Derald D. Woods" X-Patchwork-Id: 1631277 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Wu3LyGu5; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4L1l664bSdz9s2R for ; Mon, 16 May 2022 13:26:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4C528424A; Mon, 16 May 2022 05:26:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="Wu3LyGu5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 41E4A84203; Mon, 16 May 2022 05:26:18 +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,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (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 A358184245 for ; Mon, 16 May 2022 05:26:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=woods.technical@gmail.com Received: by mail-io1-xd32.google.com with SMTP id s23so14576196iog.13 for ; Sun, 15 May 2022 20:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wUTNQjZrGXHNRK9P6OZrwXlfD9t9e1Q7p46pu0GjT+k=; b=Wu3LyGu5zYzMQ7U8XNxfpUzylXchRf0F9EN3fNFMw71QjWRdHsqzo/I38ByzMuro6E ErlKhSN2Xr1nnsQgqLiAnv6h9IP0s8nB5LA9XNGOXYctOHfM5uMS0r9Pgl9SBT4LHSiR 5SDWGW1J+R3mbP7srTKHRndMUg5csvEXkkV5jvDLIjM4zc8AdmAy1pQqnyeCrzoxBEHZ gdkWT+y7ZuCMAjXS+YQOPBvTVjOpAIQcRcVR02doD/aHkgY4byF9Kzmegk/oWWZsa6sT XrMpq+ovh+CbYw2VROcYVifrOA7+PqplMmoCKjqtXBO59Id+JfN6YWbW0z6RNmB3f0TB a/vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wUTNQjZrGXHNRK9P6OZrwXlfD9t9e1Q7p46pu0GjT+k=; b=TcvTFivKqElTt6AM7BVKJuDD3laVlyBnagr9Qtc30YF7R73bg0bIj+oE6msRUISdLe IAcHvHnk2pTm18IRT1jmrWkFehMZ7XG9GLmSmhQ3C4e2UuDVaUuTZ7FnBEfI9MOg4b5W wTzdibx+mEFgAhd7xXzL/2uW/OC7qsWaQuZpHFKJEuwwSrbbatYgRC60TPojnO2OFHy9 boA592Pb2mbpuyFj41vCQFUCRbBB5+aFzo6P/yRyv5hOL3irrzzh9xzCa/3SMBVKVKHt DJ91eR0vS+NbvXVazpJPQ3rMsc77JaC0Ix/CNKfVnnYwqVHLqllLIOGC217fP8LJb4jG IPQg== X-Gm-Message-State: AOAM531+BU9lGRYU/9kat7jH+1CqMQGH9keN8yhOh0uDil6aroXo75TR 9ILOxy4NVBIB6r7C7lLXFybmN+ELX0Q= X-Google-Smtp-Source: ABdhPJxMCrmsPl7NWC3vusakh+lFaKIvGEUG6fLKBobuldcRdvvRpM0jz+bBBO05Zy75f2ARdD80tA== X-Received: by 2002:a05:6638:3f12:b0:32e:29e9:f065 with SMTP id ck18-20020a0566383f1200b0032e29e9f065mr2285903jab.67.1652671567959; Sun, 15 May 2022 20:26:07 -0700 (PDT) Received: from exodus.woodsts.org (c-98-212-63-248.hsd1.il.comcast.net. [98.212.63.248]) by smtp.gmail.com with ESMTPSA id g13-20020a02770d000000b0032b3a781740sm2538644jac.4.2022.05.15.20.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 May 2022 20:26:07 -0700 (PDT) From: "Derald D. Woods" To: u-boot@lists.denx.de Cc: trini@konsulko.com, "Derald D. Woods" Subject: [PATCH 3/3] ARM: omap3: evm: Fix 'fitImage' booting Date: Sun, 15 May 2022 22:25:05 -0500 Message-Id: <20220516032505.183211-4-woods.technical@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516032505.183211-1-woods.technical@gmail.com> References: <20220516032505.183211-1-woods.technical@gmail.com> 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.5 at phobos.denx.de X-Virus-Status: Clean This commit sets two additional variables in the default BOOTCOMMAND. Adding 'boot=mmc' and 'addr_fit=0x8b000000' removes the need for a special 'uEnv.txt' to be created. The 'addr_fit' variable is the key piece here. It is normally defined as 0x90000000, in the macro DEFAULT_FIT_TI_ARGS. For this OMAP34XX board, 0x8b000000 works without touching other varibles. This was tested with a 'fitImage' created using the following FIT source: ---------------------------------------------------------------------- /dts-v1/; / { description = "Simple image with single Linux kernel and FDT blob"; #address-cells = <1>; images { kernel { description = "Linux kernel: omap2plus"; data = /incbin/("./zImage"); type = "kernel"; arch = "arm"; os = "linux"; compression = "none"; load = <0x80008000>; entry = <0x80008000>; hash-1 { algo = "sha256"; }; }; fdt-omap3-evm.dtb { description = "FDT: omap3-evm.dtb"; data = /incbin/("./omap3-evm.dtb"); type = "flat_dt"; arch = "arm"; compression = "none"; load = <0x8ff00000>; hash-1 { algo = "sha256"; }; }; }; configurations { default = "conf-omap3-evm.dtb"; conf-omap3-evm.dtb { description = "Boot Linux kernel with FDT blob"; kernel = "kernel"; fdt = "fdt-omap3-evm.dtb"; }; }; }; ---------------------------------------------------------------------- Additionally, the default environment is now stored in "uboot.env" on the FAT partition of MMC '0'. Fixes: 11e2ab3f0b ("ARM: omap3: evm: Enable booting 'fitImage' with DEFAULT_FIT_TI_ARGS") Signed-off-by: Derald D. Woods --- configs/omap3_evm_defconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configs/omap3_evm_defconfig b/configs/omap3_evm_defconfig index 2d8e627171..e2e29e2eb6 100644 --- a/configs/omap3_evm_defconfig +++ b/configs/omap3_evm_defconfig @@ -10,7 +10,7 @@ CONFIG_TARGET_OMAP3_EVM=y CONFIG_SPL_SYS_MALLOC_F_LEN=0x400 CONFIG_SPL=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run envboot; run distro_bootcmd" +CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then setenv boot mmc; setenv addr_fit 0x8b000000; run update_to_fit; run mmcboot; fi; run envboot; run distro_bootcmd" CONFIG_USE_PREBOOT=y CONFIG_DEFAULT_FDT_FILE="omap3-evm.dtb" CONFIG_SYS_CONSOLE_INFO_QUIET=y @@ -48,7 +48,10 @@ CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="clocks clock-names interrupt-parent" CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_IS_IN_FAT=y +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_VERSION_VARIABLE=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y