Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp387028lqc; Thu, 7 Mar 2024 23:42:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV/h2H6Ndd+NnJ12RZGi7k2UQvSn4t3tZpR1i0MS7o0IU13YshBpRdD3LqHic4sGj3KqO8Gkp73nm7P4m70ghUYX4MImMljWXTgmE3bZw== X-Google-Smtp-Source: AGHT+IEQND+chjZ7A0AE74JMHLNLBnd5B+HnDigiLb6B+S0dnHJVYPNTQ+YwIlXvkRPMH0zYXBfQ X-Received: by 2002:a17:907:100a:b0:a44:4e9a:8cc2 with SMTP id ox10-20020a170907100a00b00a444e9a8cc2mr14151229ejb.58.1709883764172; Thu, 07 Mar 2024 23:42:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709883764; cv=pass; d=google.com; s=arc-20160816; b=GhRUSOVPE8U+ILG7Iujn+i25Jd/OWRdCnHQlBy8KjGXzdqaUaFw6MEvH6hbkD4sIOo 44UUD+Vpuf1VWQLRO6KePJD9YwuO/YCoKhGlQPzzdVeXHsxGicxG8rqLgfgvx8PBz0uy IxOQs0SIYyuqVzkjeim5emS4htarrc35isvcDC0AHRP45WxiU7u2U91cx+bIdK1QU5cz rw2RX12/IaTX3YVz9sk5kY5t/PB62LNMNmno0NNsEV0war40BhqwRKLDg1CIPWTk/yML 0A6pJRQKzB3U+IobsL5aAwdwQCcdGyJwlsI8ZN21aiXCvz/zzv/3kxZIhUdCnRwWneBx e7pg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=RkispZ2cSgHHvQHUKtQPYvm4JRgYfxl+31ZzbV0ajJQ=; fh=Ypu/x7uEIN1vY0eHkOudVm8p5NC/j5r2WeorchPiDaQ=; b=XdiBeP8/JDAKKEz7J1pOfMmCgBJbJJuAHtEIAU5tP8lLrqm2E0Cujq/WhRxhqAbYKf WhB5Tsml5D8hEF6mE36RA/ZCRxfEiH4nZfk9TjvDe06iZ7yp47wIxh/3C8usxZD1rN+I iHSvXqF22jZwGQlkKBM25eVN6sbERjTt2RJZUSgf2QFYiFe/jOpy1csOqKL6XQeOWUrs idudVzwO/BriJK6RsAVFq52W0vKUSPgYoi4uHuFbd5O3vqjDOyAqvX8xEFHPbht26n97 6POA5RVaAeLkznv4bFopK2qqTVWkMd+g5ZdOJE8yTeDMmXs0dlj/x/SQ9Q3rgJz4m2Pp fMpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gLlv8wGx; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-96597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id pk18-20020a170906d7b200b00a3e409474f0si7578951ejb.640.2024.03.07.23.42.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 23:42:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gLlv8wGx; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-96597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B8E9D1F2321B for ; Fri, 8 Mar 2024 07:42:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6B684F8A0; Fri, 8 Mar 2024 07:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="gLlv8wGx" Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A19262C1A0; Fri, 8 Mar 2024 07:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709883746; cv=none; b=ArhYVKkI+ebWTGT+usUxXc6JPQOIkrdMHStZYkj/+gPA8Quy0nTGUfhxNE+p+ABQblbYQ4hC9P0sV/+q5kXaTfQFMQCv6Qyg0saTAo0YaLUD05m6EvD/wgSLk1BW6MbcUNrSddqiLUTbXOBfDOO8riIdkx+6N7BRBQdDGY9TWhM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709883746; c=relaxed/simple; bh=TTtXyo/DiJN4A3MwPEwDAd8UEfHq/A17ZdBZkYFdH/E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BvYv1ovA23VffG3LNzwsR4P6Y30saZ+BoN9/yfuug65ELa355I9cUC4QdM8BPxyYrLiiD6EQjXx46Nvev+YxvFQ6jejj65nIP+zuuM8t5zTV2323DhRN6rracZp0ucLRpB7luPtvhUMdQtA/d1Bn6PV4L5zF8Lid/RaCXHyKIao= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=gLlv8wGx; arc=none smtp.client-ip=217.70.183.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id DBB4760005; Fri, 8 Mar 2024 07:42:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709883735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RkispZ2cSgHHvQHUKtQPYvm4JRgYfxl+31ZzbV0ajJQ=; b=gLlv8wGxjiogeG9C46oG5EgFoqN4SH1b9sabNz5g3QO62yEOKg3XJIQW0hFi2a4mlTo9/J wDoyd7Ks0a9nOehGgDBetroeoVaVTpjSUCvwUdrENEVJ9GDuL1UA1UNTIwOIUkdVv7PDl0 HLNnzR8Dn0hQvEKvIyQYWURylmHBn7971Bw1G7BDNxLq55CYjsQOW+BxO91WXoQ2oMPJVa BRg5CV53PmNRQlKzjl1MjxvhcrVmwlRk7/L9gakI8vPJfBh17Jt0/24YwSwpQHdYgAzNV6 1MSXvZT0koXMkeBdc5LURUgoUaMY53WPEDVkI+xX8/0aO6DbnEZN41o86mVc5A== Date: Fri, 8 Mar 2024 08:42:12 +0100 From: Miquel Raynal To: Simon Glass Cc: Rob Herring , devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, Tom Rini , Michael Walle , U-Boot Mailing List , Conor Dooley , Krzysztof Kozlowski , Pratyush Yadav , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , Richard Weinberger , Vignesh Raghavendra , linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 1/3] dt-bindings: mtd: partitions: Add binman compatible Message-ID: <20240308084212.4aa58761@xps-13> In-Reply-To: References: <20231116172859.393744-1-sjg@chromium.org> <20231208150042.GA1278773-robh@kernel.org> <20231214172702.GA617226-robh@kernel.org> <20240205085056.44278f2c@xps-13> <20240205131755.3462084f@xps-13> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi Simon, sjg@chromium.org wrote on Fri, 8 Mar 2024 15:44:25 +1300: > Hi Miquel, >=20 > On Tue, 6 Feb 2024 at 01:17, Miquel Raynal wr= ote: > > > > Hi Simon, > > =20 > > > > > > > > > > > > > > +description: | > > > > > > > > > > > > > > + The binman node provides a layout for firmwa= re, used when packaging firmware > > > > > > > > > > > > > > + from multiple projects. It is based on fixed= -partitions, with some > > > > > > > > > > > > > > + extensions, but uses 'compatible' to indicat= e the contents of the node, to > > > > > > > > > > > > > > + avoid perturbing or confusing existing insta= llations which use 'label' for a > > > > > > > > > > > > > > + particular purpose. > > > > > > > > > > > > > > + > > > > > > > > > > > > > > + Binman supports properties used as inputs to= the firmware-packaging process, > > > > > > > > > > > > > > + such as those which control alignment of par= titions. This binding addresses > > > > > > > > > > > > > > + these 'input' properties. For example, it is= common for the 'reg' property > > > > > > > > > > > > > > + (an 'output' property) to be set by Binman, = based on the alignment requested > > > > > > > > > > > > > > + in the input. > > > > > > > > > > > > > > + > > > > > > > > > > > > > > + Once processing is complete, input propertie= s have mostly served their > > > > > > > > > > > > > > + purpose, at least until the firmware is repa= cked later, e.g. due to a > > > > > > > > > > > > > > + firmware update. The 'fixed-partitions' bind= ing should provide enough > > > > > > > > > > > > > > + information to read the firmware at runtime,= including decompression if > > > > > > > > > > > > > > + needed. =20 > > > > > > > > > > > > > > > > > > > > > > > > > > How is this going to work exactly? binman reads t= hese nodes and then > > > > > > > > > > > > > writes out 'fixed-partitions' nodes. But then you= 've lost the binman > > > > > > > > > > > > > specifc parts needed for repacking. =20 > > > > > > > > > > > > > > > > > > > > > > > > No, they are the same node. I do want the extra inf= ormation to stick > > > > > > > > > > > > around. So long as it is compatible with fixed-part= ition as well, this > > > > > > > > > > > > should work OK. =20 > > > > > > > > > > > > > > > > > > > > > > How can it be both? The partitions node compatible ca= n be either > > > > > > > > > > > 'fixed-partitions' or 'binman'. =20 > > > > > > > > > > > > > > > > > > > > Can we not allow it to be both? I have tried to adjust = things in > > > > > > > > > > response to feedback but perhaps the feedback was leadi= ng me down the > > > > > > > > > > wrong path? =20 > > > > > > > > > > > > > > > > > > Sure, but then the schema has to and that means extending > > > > > > > > > fixed-partitions. =20 > > > > > > > > > > > > > > > > Can we cross that bridge later? There might be resistance t= o it. I'm > > > > > > > > not sure. For now, perhaps just a binman compatible works w= ell enough > > > > > > > > to make progress. =20 > > > > > > > > > > > > > > Is there any way to make progress on this? I would like to ha= ve > > > > > > > software which doesn't understand the binman compatible to at= least be > > > > > > > able to understand the fixed-partition compatible. Is that ac= ceptable? =20 > > > > > > > > > > > > There's only 2 ways that it can work. Either binman writes out > > > > > > fixed-partition nodes dropping/replacing anything only defined = for > > > > > > binman or fixed-partition is extended to include what binman ne= eds. =20 > > > > > > > > > > OK, then I suppose the best way is to add a new binman compatible= , as > > > > > is done with this v6 series. People then need to choose it instea= d of > > > > > fixed-partition. =20 > > > > > > > > I'm sorry this is not at all what Rob suggested, or did I totally > > > > misunderstand his answer? > > > > > > > > In both cases the solution is to generate a "fixed-partition" node.= Now > > > > up to you to decide whether binman should adapt the output to the > > > > current schema, or if the current schema should be extended to > > > > understand all binman's output. > > > > > > > > At least that is my understanding and also what I kind of agree wit= h. =20 > > > > > > I do want to binman schema to include all the features of Binman. > > > > > > So are you saying that there should not be a 'binman' schema, but I > > > should just add all the binman properties to the fixed-partition > > > schema? =20 > > > > This is my current understanding, yes. But acknowledgment from Rob is > > also welcome. =20 >=20 > I am trying again to wade through all the confusion here. >=20 > There is not actually a 'fixed-partition' node. So are you saying I > should add one? There is already a 'partitions' node. Won't they > conflict? Sorry for the confusion, there is a 'partitions' node indeed. This node shall declare it's "programming model" (let's say), ie. how it should be parsed. What defines this programming model today is the 'fixed-partitions' compatible. I think we (Rob and myself, but again, Rob, please confirm) agree on the fact that we don't want to duplicate the fixed-partitions compatible/logic and thus the binman compatible was rejected. Hence, in order to move forward, I would definitely appreciate an update of the fixed-partitions binding in order to support what binman can generate. We are here talking about the output of binman, not its input. TBH I haven't understood the point in having binman's input parsed by the generic yaml binding. I would advise to focus on binman's output first because it feels more relevant, at a first glance. > Would it be possible for you to look at my patches and suggest > something? I think at this point, after so many hours of trying > different things and trying to understand what is needed, I could > really use a little help. I hope the above details will help. Thanks, Miqu=C3=A8l