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 8077DC25B07 for ; Tue, 9 Aug 2022 16:07:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 232BF84A76; Tue, 9 Aug 2022 18:07:08 +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="APAzAWkc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D52684A77; Tue, 9 Aug 2022 18:07:07 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (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 6CE8084A14 for ; Tue, 9 Aug 2022 18:07:04 +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 0C1C4B815B8; Tue, 9 Aug 2022 16:07:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DB2DC433C1; Tue, 9 Aug 2022 16:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660061222; bh=9do4Ls5WWxBCsStH16UWOK2/eALInkSySCHW/lKTgjo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=APAzAWkc4hWiXdnB2Mf+D1/hk5s+zvnVcNhn8keihuLFWNIiZsZnTTJ5blc7PK/ug 0q3y1QsAGP+YKO1ngGxEe20XWPI7zEJBhfF/lWtrFuoknZZ5gHw156Cz4hXYFCgT0U FOgieAU7H09ceqSPnPAxGSv28bFmNdHNU58my7CESGvk/qqVuEzer9t+rurOr59XoQ +x7ejzo7Jjtg6/3/xg8M51cs5LJtu0WB7eepQmPhSlauQ08tqJV0+kWY6UGhxQU9ig RbDPMxuIcNfRJyxd65I9PisKlJqu3wqnpp5QZx5ySBVYmVqpdsSoMCFIC3M/9JlLgl 6boCYgTzaafSw== Received: by pali.im (Postfix) id A3806C1F; Tue, 9 Aug 2022 18:06:59 +0200 (CEST) Date: Tue, 9 Aug 2022 18:06:59 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Ralph Siemsen Cc: u-boot@lists.denx.de, AKASHI Takahiro , Andre Przywara , Heiko Thiery , Samuel Holland , Simon Glass , Stefan Roese Subject: Re: [RFC PATCH v1 9/9] tools: Add tool to create Renesas SPKG images Message-ID: <20220809160659.a4t4hyvbhj2f52o7@pali> References: <20220809125959.217333-1-ralph.siemsen@linaro.org> <20220809125959.217333-10-ralph.siemsen@linaro.org> <20220809130348.hhtdgnytufppni72@pali> <20220809130726.iikcgrqnnts55fyi@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 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.6 at phobos.denx.de X-Virus-Status: Clean Hello! On Tuesday 09 August 2022 11:54:30 Ralph Siemsen wrote: > Hi Pali, > > On Tuesday 09 August 2022 15:03:48 Pali Rohár wrote: > > > > Hello! You can use for example config file, like it has kwbimage.c which > > is integrated into mkimage and has support for NAND ECC settings. > > Thank you, I was unaware of this config file approach. From a quick > look at doc/README.kwbimage it seems quite reasonable for > device-specific parameters. This documentation is not probably up-to-date. List of all kwbimage config options can be visible in kwbimage_generate_config() function. > On Tue, Aug 9, 2022 at 9:07 AM Pali Rohár wrote: > > > > Or another option could be to extend mkimage tool to accept new argument > > for specifying NAND settings. As we can see more image formats have > > support for it, so some abstraction in mkimage makes sense here. > > In principle I agree. But practically speaking I see two problems: > 1) mkimage already has far too many options I know. But for nand there can be just --nand suboption1,suboption2,... format. For other non-nand vendor specific option it would be an issue. Maybe something like --vendor option or --image-options ... could be used? > 2) covering all possible vendor-specific values/encodings of NAND > parameters would be quite a task Yea, it is problematic. But... is not everything related to NAND just common to what can be specified in device tree properties for nand node? And de-facto already known and well-defined? Because I cannot imagine what else for what there is not already device tree binding, could be required for vendor bootrom. (But maybe I just do not see it...) > So I am inclined to keep it simple for now, and try using a config file. > > Ralph Keep it simple is the best option! In the worst case, in the future, some of the options introduced by your config file format, would be possible to specify also via command line arguments. So I do not see any issue with this config file approach. Just one suggestion: It is a good idea to also implement "verify_header" mkimage callback. Build process then use it to verify that generated image is really correct.