From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1F36C433F5 for ; Tue, 15 Feb 2022 19:00:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE21582DB7; Tue, 15 Feb 2022 19:59:53 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.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=kernel.org header.i=@kernel.org header.b="Wp8ij+a3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C868D83A46; Tue, 15 Feb 2022 19:59:51 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 42EAA81DB4 for ; Tue, 15 Feb 2022 19:59:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 81CBB616B8; Tue, 15 Feb 2022 18:59:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4644C340EB; Tue, 15 Feb 2022 18:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644951582; bh=VDT4dixXmpmmmsZvYcX0fTnfEN9WWHGlKcDJmXSv2tA=; h=From:To:Cc:Subject:Date:From; b=Wp8ij+a3bFz+/jcJo3pPBOl/g+Qj03afHGlj7rhSgYRft3Sxg3OPdG+2/1KB4KBZm YsCrifHZaQiZUntj0XDjzCego3kkXvTefKYfcL1wsdmm0XFhHTBu/Ms3MQjPdy8sDm KSOQ67H7MGNKrF6jgJ6x8XDL47btI4gUzaGLzq7BlBuiEVSGj2LY1HsIa4ImPX6VlO C6qXeZdLbmhqk6VDAuwqoe9dcD/9NlC8cl2W+Vm1gburOpfjLrWz0eypg9TJHY7Tn0 zzBMBIdU4IZD6s4EcYLGScCvlQOhwrPsz/soZsezEu7TCFOkK2PpeN8SL3sn5kD87y +4M0Ex1b/e+yA== Received: by pali.im (Postfix) id 1F478F13; Tue, 15 Feb 2022 19:59:40 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Tony Dinh Cc: u-boot@lists.denx.de Subject: [PATCH u-boot-marvell 0/7] tools: kwbimage: Support for parsing extended v0 format Date: Tue, 15 Feb 2022 19:59:18 +0100 Message-Id: <20220215185925.16060-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 patch series extends kwbimage v0 format support by providing ability to dump content of Dove boot images (extension of v0 format). It also fixes recognition of these images in kwboot utility (as it uses macros and inline functions from kwbimage.h header file). Implementation is based on 88AP510 Functional Specifications, Chapter 5.2 Boot Image Format, which is publicly available at: https://web.archive.org/web/20120130172443/https://www.marvell.com/application-processors/armada-500/assets/Armada-510-Functional-Spec.pdf Printing information about image.kwb is possible by: $ ./tools/dumpimage -l image.kwb Dumping image.kwb is possible by commands: $ ./tools/dumpimage -T kwbimage -p -1 -o image.cfg image.kwb $ ./tools/dumpimage -T kwbimage -p 0 -o data.bin image.kwb $ ./tools/dumpimage -T kwbimage -p 1 -o binary1.bin image.kwb $ ./tools/dumpimage -T kwbimage -p 2 -o binary2.bin image.kwb ... (where -p N is Nth binary executable header, e.g. SPL) Dove images contains more sections which in config file begins with line "MATCH ADDRESS 0xaddr MASK 0xmask VALUE 0xval" and means that section is executed only when check ((readl(addr) & mask) == (val & mask)) passes. Support for generating these kind of images is not provided. I hope that this patch series helps somebody else to implement it. Pali Rohár (7): tools: kwbimage: Define structures for extended kwbimage v0 headers tools: kwbimage: Fix calculating size of kwbimage v0 header tools: kwbimage: Add support for dumping extended and binary v0 headers tools: kwbimage: Do not show mkimage error message in dumpimage tools: kwbimage: Add support for NAND_BLKSZ and NAND_BADBLK_LOCATION for v0 images tools: kwbimage: Fix help how to extract DDR3 training code tools: kwbimage: Add me as an author of kwbimage tools/kwbimage.c | 139 ++++++++++++++++++++++++++++++++++++++++++----- tools/kwbimage.h | 116 +++++++++++++++++++++++++++++++++++---- 2 files changed, 231 insertions(+), 24 deletions(-) -- 2.20.1