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 B0488C6FD18 for ; Wed, 29 Mar 2023 19:28:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C520285E30; Wed, 29 Mar 2023 21:28:30 +0200 (CEST) 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="M0r6Rhry"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A7C586039; Wed, 29 Mar 2023 21:28:16 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::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 C43EF85D74 for ; Wed, 29 Mar 2023 21:28:06 +0200 (CEST) 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 ams.source.kernel.org (Postfix) with ESMTPS id B9351B82421; Wed, 29 Mar 2023 19:28:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39EB3C4339B; Wed, 29 Mar 2023 19:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680118084; bh=iX2v/CiA7eAAg2/soIZ+BcPH842GERfsc4zFA8gzHW4=; h=From:To:Cc:Subject:Date:From; b=M0r6Rhry6IUL8INr9Q1kVvQa+V2OPzySKbXw1I39uLTuAdYE0Xpvq8K3Jh0nMeuAc xgkcNVPoIZFdVwe6+b7zH43dC/OiyN/vr6e2CAIwQAO+g4CC29LxElxN/kopHyjMOU L4+bdDVJKWlUmIoD9Sa/vj8lFcO+VeVb7A8OkG1kQofBhx8YL2sH2YYGBrEFY3xg2K /P3BJfETgZ58acyIsP7Up9ppXF5tEVp70rW6BxhgSAVlv8GKY+2ys5PYWkNXvm4j8L uG1bDHT65IrTv6PTiWJ18tDHKHmFgP7iplaXXqNP7VgaupbGtw3slVTAKAFvE3ltNY 9HkuxLTeID2hw== Received: by pali.im (Postfix) id 86D7929F; Wed, 29 Mar 2023 21:28:01 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Martin Rowe , Tony Dinh , Stefan Roese , Chris Packham , Baruch Siach Cc: u-boot@lists.denx.de Subject: [PATCH u-boot-mvebu 0/7] arm: mvebu: Boot support for 4K Native disks Date: Wed, 29 Mar 2023 21:25:51 +0200 Message-Id: <20230329192558.12417-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.8 at phobos.denx.de X-Virus-Status: Clean This patch series allows to build SATA kwbimage for disks which do not have sector size 512 bytes long. For example 4K Native disks. SATA kwbimage differs from other kwbimage types in that way, that offset in its header is stored in SATA sectors units instead of byte units. Therefore image generator needs to know sector size of the target SATA disk. Currently both kwbimage and mkimage has hardcoded SATA sector size to 512 bytes. This patch series allows to specify custom SATA sector size via a new config option CONFIG_MVEBU_SPL_SATA_BLKSZ. And add autodetection of the sector size into kwboot to allow parsing such images. Maximal theoretical sector size is 32 kB because ATA IDENTIFY command returns sector size as 16-bit number and sector size should be power of two. Pali Rohár (7): arm: mvebu: spl: Do not hardcode SATA block size to 512 cmd: mvebu/bubt: a38x: Do not hardcode SATA block size to 512 tools: imagetool: Extend print_header() by params argument tools: kwbimage: Simplify align code tools: kwbimage: Add support for SATA images with non-512 byte block size tools: kwboot: Add support for parsing SATA images with non-512 block size arm: mvebu: spl: Allow to build SATA kwbimage for 4K Native disks arch/arm/mach-mvebu/Kconfig | 10 ++ arch/arm/mach-mvebu/Makefile | 5 + arch/arm/mach-mvebu/kwbimage.cfg.in | 3 + arch/arm/mach-mvebu/spl.c | 11 ++- cmd/mvebu/bubt.c | 7 +- tools/aisimage.c | 2 +- tools/atmelimage.c | 2 +- tools/default_image.c | 7 +- tools/fit_common.c | 5 + tools/fit_common.h | 2 + tools/fit_image.c | 2 +- tools/gpimage.c | 2 +- tools/imagetool.c | 4 +- tools/imagetool.h | 2 +- tools/imx8image.c | 2 +- tools/imx8mimage.c | 2 +- tools/imximage.c | 2 +- tools/kwbimage.c | 144 ++++++++++++++++++---------- tools/kwboot.c | 35 ++++++- tools/lpc32xximage.c | 2 +- tools/mkimage.c | 2 +- tools/mtk_image.c | 2 +- tools/mxsimage.c | 2 +- tools/omapimage.c | 2 +- tools/pblimage.c | 2 +- tools/rkcommon.c | 2 +- tools/rkcommon.h | 2 +- tools/socfpgaimage.c | 2 +- tools/stm32image.c | 2 +- tools/sunxi_egon.c | 2 +- tools/sunxi_toc0.c | 2 +- tools/ublimage.c | 2 +- tools/vybridimage.c | 2 +- tools/zynqimage.c | 2 +- tools/zynqmpimage.c | 2 +- tools/zynqmpimage.h | 2 +- 36 files changed, 199 insertions(+), 84 deletions(-) -- 2.20.1