From patchwork Mon Aug 5 08:42:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1968953 X-Patchwork-Delegate: festevam@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=yASLnRd3; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=t8tYUD+Z; dkim-atps=neutral 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=patchwork.ozlabs.org) 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 (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wcqgp4hCwz1yYD for ; Mon, 5 Aug 2024 18:42:30 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E9808886FC; Mon, 5 Aug 2024 10:42:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1722847347; bh=ALv2S9UvlDhQwCehYMvpj8oo0k7S4cXjDH+JGdmKb0g=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=yASLnRd3m0+qC9xItyr5Iw3sU1GiPY9APaPyqjk2ET7wAUKJsKemCmk1tLaXrPmEU ih1Jhu1voI6V43jzmCo5FRU6fS8nQRC7vtbXci/lXav7ENq4vVEcocFSo/tyj3099K +0yMsKOqwQT0AhvFgUqyrBNxXtKTl+ooF8BjB/WgAD0OWpUUPSNeG3etUhgomyb73H eSiCUSgj2SZPoUFLHx3eJXxHosvJ48fAL2W58ZEtJ4oqdLZLcvp2qQ2dZ+p8oWHnSZ yoskbVWwuTEccAc7ou2AxTgM2wsFIztwKZaMLY5pYiUUyhNXRUjTvrFJiYb1QlZUXJ P+hxnK2ELNePA== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B567B8889C; Mon, 5 Aug 2024 10:42:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1722847347; bh=ALv2S9UvlDhQwCehYMvpj8oo0k7S4cXjDH+JGdmKb0g=; h=From:To:Cc:Subject:Date:From; b=t8tYUD+ZPUNZPmW9hSYw6ZdcPrFS2VJxfwd0jTH2TlKOxb4Q5DNdx4HY2PjfYsMQk VGecb2JYklZhV88Uky4r1XPNJ9g//m5BcVmhTBbbgZYK0tg6YQXXe8qb/6Hwxta+J6 +47EFpeYFcgiGndPYA2GfvyFebMlVtnZYLBHhLtg8jp4330KQK/be0QEmB3LXbP9KX qXFCB9dhOBo+uXzyjckxdaeZeE2I1zT+EiUdQAOsuM2BRbvEwyUy/k7JQ/325BVhBG 076A78QyuTHsoaSWRz9EjOa+m4cZrdvcrbKKfFLetlBoo7IgGxgxZFf8EL8OTuIZqW C3XL9MR5r36vw== From: Lukasz Majewski To: Teresa Remmet , u-boot@lists.denx.de Cc: Tom Rini , Benjamin Hahn , Cem Tenruh , Martyn Welch , Simon Glass , Fabio Estevam , Lukasz Majewski Subject: [PATCH v2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm Date: Mon, 5 Aug 2024 10:42:02 +0200 Message-Id: <20240805084202.3530203-1-lukma@denx.de> X-Mailer: git-send-email 2.39.2 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 This command allows easy update on SD card or eMMC of the flash.bin generated (with binman) during u-boot build. Signed-off-by: Lukasz Majewski --- Changes for v2: - Remove 'update_mmc_part' variable - Change path for hostname - Use full version of dhcp command (${loadaddr} added) --- include/configs/phycore_imx8mm.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h index ce6dc87c69..361e665676 100644 --- a/include/configs/phycore_imx8mm.h +++ b/include/configs/phycore_imx8mm.h @@ -29,6 +29,16 @@ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ "mmcroot=2\0" \ + "update_offset=0x42\0" \ + "update_filename=flash.bin\0" \ + "hostname=/srv/tftp/\0" \ + "update_bootimg=" \ + "mmc dev ${mmcdev} ; " \ + "if dhcp ${loadaddr} ${hostname}/${update_filename} ; then " \ + "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \ + "setexpr fw_sz ${fw_sz} + 1 ; " \ + "mmc write ${loadaddr} ${update_offset} ${fw_sz} ; " \ + "fi\0" \ "mmcautodetect=yes\0" \ "mmcargs=setenv bootargs console=${console} " \ "root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw\0" \