From patchwork Mon Dec 9 10:33:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1206108 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DdEDqFVq"; dkim-atps=neutral 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 (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47Wfh64mW6z9sP6 for ; Mon, 9 Dec 2019 21:34:30 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 73FA881682; Mon, 9 Dec 2019 11:33:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DdEDqFVq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DAFA981656; Mon, 9 Dec 2019 11:33:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 608DD8074A for ; Mon, 9 Dec 2019 11:33:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=igor.opaniuk@gmail.com Received: by mail-wm1-x32b.google.com with SMTP id p9so14916671wmg.0 for ; Mon, 09 Dec 2019 02:33:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WaNyBXwA1Rslq+nQ6plzcUTS3uyzKvObskHs5uU0CPg=; b=DdEDqFVqFPONW9h3nZYXPurFoVwBaNrirvkIdViBuAHXUp+YxhbxJn+wlOHwrrzCBI aUxIRSpW0MAQfslPTlOm6UuAIkLiwYQU81s8M4my0PWwaEuEl+fqnOQ8YMJ4fHCENOJu lTnJ5umbBbWfT8BhI+XVhMg5VVDgt0XNAAKNTyOXcO3rxJJKfjcT6Otwq0Ybz6cersZH Mw0yVt3HHPUHC1dolTjSPn/8ThQ46nZ8p71O2sYEnLstPzOo7GD1n0N7bIcfPy20AcYS DDqaPYESY8vc2pNnjtIcP7DuVHkzQ7WvVpFIM5s/zaZg9xJI5ypFVz3Xqdchg+EUMYbS 7+JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WaNyBXwA1Rslq+nQ6plzcUTS3uyzKvObskHs5uU0CPg=; b=uEMrGDkrWuLs+O5l/Jr/TfyEoYpHkHUefoY4bsmxhIYFvu/vdtw7w3PN/PLTKYzPUd k6dL6/a1r+buFfkXaUGGCA7AWq2nw28usr/nEucbrDvcNHcXo+9CZ6VAqnCAJXlPgi9V tgHhGCREAZ3t4Vhug1abzr+7euwYlE+DQuHCG6i7cYIl+UVE0w2Qf6WBR9LovsvsQriB +Jw0+gNQERXnYgF8d/CoifVDSBiM9d3b3r6YrjhQehiAEyECurA+yfL8tydWSFUVM4hD bMNkfKADiZ2zNFc4q4stK0fgOTZQ2UQEfEiG42QI4GGrSgRnDwmWuvqvsXPCvLM61+cR j03w== X-Gm-Message-State: APjAAAWAxE9h+svuyssKkFI2cvS4hPkDpzUwuhepZ7696IKK1KHrOyac GgKEHzKhfkrAx6cXvXKFY8PiCEoSFaM= X-Google-Smtp-Source: APXvYqzDcZIUGvmIxkfJFE6luO5wYJQR/7kDeu87DaWI927UbcyRUZuWURKO4NtYivwwZKOhFSusGA== X-Received: by 2002:a1c:6207:: with SMTP id w7mr24790411wmb.16.1575887623657; Mon, 09 Dec 2019 02:33:43 -0800 (PST) Received: from localhost ([194.105.145.90]) by smtp.gmail.com with ESMTPSA id l204sm13528220wmf.2.2019.12.09.02.33.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Dec 2019 02:33:43 -0800 (PST) From: Igor Opaniuk To: u-boot@lists.denx.de Subject: [PATCH v2 4/5] colibri-imx6ull: add update_uboot wrapper Date: Mon, 9 Dec 2019 12:33:31 +0200 Message-Id: <20191209103333.6754-5-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191209103333.6754-1-igor.opaniuk@gmail.com> References: <20191209103333.6754-1-igor.opaniuk@gmail.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Opaniuk , Stefan Agner , marcel.ziswiler@toradex.com, max.krummenacher@toradex.com Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean From: Igor Opaniuk Add universal update_uboot wrapper that helps to update U-Boot image on internal storage. Usage example: > tftpboot ${loadaddr} ${board_name}/u-boot-nand.imx > run update_uboot Signed-off-by: Igor Opaniuk --- include/configs/colibri-imx6ull.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 0c36a57a0e..ea5ba6bfce 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -47,6 +47,12 @@ "ramdisk_addr_r=0x82200000\0" \ "scriptaddr=0x87000000\0" +#define UBOOT_UPDATE \ + "update_uboot=nand erase.part u-boot1 && " \ + "nand write ${loadaddr} u-boot1 ${filesize} && " \ + "nand erase.part u-boot2 && " \ + "nand write ${loadaddr} u-boot2 ${filesize}\0" + #define NFS_BOOTCMD \ "nfsargs=ip=:::::eth0: root=/dev/nfs\0" \ "nfsboot=run setup; " \ @@ -83,6 +89,7 @@ MEM_LAYOUT_ENV_SETTINGS \ NFS_BOOTCMD \ UBI_BOOTCMD \ + UBOOT_UPDATE \ "console=ttymxc0\0" \ "defargs=user_debug=30\0" \ "dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \