Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1370245lql; Tue, 12 Mar 2024 15:28:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZ50d2W62CqQVWhJKAAmZDwjMW+unZARIEC7FnOccLqQuToBsDv05foMvzxeO+61u/kL2hLUwP6vfyE5W+DliSGqBPG4oyofevljWbuA== X-Google-Smtp-Source: AGHT+IHWi2IlfqT4WeFCI8ezC+ddnVsFW5tZCOUvaM59vTE8afwGd7GciGFpOn4AM0i7n12I1SnX X-Received: by 2002:a17:906:ba84:b0:a46:13a0:2e5c with SMTP id cu4-20020a170906ba8400b00a4613a02e5cmr800302ejd.25.1710282488102; Tue, 12 Mar 2024 15:28:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710282488; cv=pass; d=google.com; s=arc-20160816; b=FNlifpC9w4gpoNu5QDjC55uO2i0FF+m+rdOVE/XD7VLac/TaXBB2uhUwFbQD+Ts8D0 PgU+MUv1KT/AYLFlpX7Iq3sHh4spqaxr63VRW/HW74y06shPpXl4NXEAnTkXShbtP2df LSa7sjHhMMPTAmVJIcmvcxphC4y4jjv1DRuDOM0vVJwi70Sxek5sF1TyAi154QFZa4h4 /jGt/cTmieAFw2S1X6Rs/koeHIZkTh1IQUVD1I67Y3eYqulFJEFIBQjHaTODpy88jFaU HDJbdUmKL+Qj+38z3XT85/DjLEf2hDLb6wLi6uCnV7aU0sxGK7CG08G90VVpwXLbRbH/ ELKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=OzQZAVQefo3mI7JaOv3i9HOffYntNfvUVWBj/1pTaQU=; fh=RB0BwFXg0NLsmS2uGI7pbWt7syT/oq7mmuJ0ZsMjwNw=; b=sCsp0GQPpekUWpjSXPfhdvl9YDE26tGDBDBx12/VRgRjNDSG4HCDEw75f1pjOqqLt1 5Djlq0btQ4OBgvmIkJwK8mx1xxRoqAfgZvMVFQ1+rgKGuJJ64yzh2dzxx0DK9aYHWkL/ kMNlxY82xi+14GS88jQC/5VuzgILVw4mwyfrqYscE0Cm1kv/lxD69xkg68yt//fVEnYS hcGUJJcqVy/7SQVmSx/gyP8mNwR6L22j3jDHBooJrXmLvRrlgiqU13asBm52eGmle9EE ivqboAG2ZU7LYPTuXnxeIi3p3AM6esA3uwPCxAO178D86HMReDhrTpRJVEeNFkVRr2ev P+9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KvjyGu41; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-100885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gf22-20020a170906e21600b00a462692a3d8si2211301ejb.889.2024.03.12.15.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 15:28:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KvjyGu41; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-100885-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100885-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 A9ECD1F23485 for ; Tue, 12 Mar 2024 22:28:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73F2C1448FF; Tue, 12 Mar 2024 22:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KvjyGu41" Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 954BA1448EF for ; Tue, 12 Mar 2024 22:25:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710282357; cv=none; b=QYckYjZrBbz5eIipEP/PPLQKpfJPTUe9R1v9oAfeuMNFKf5tAPUWiuQfvmtwkqgvHGx2osXqf1FWtyHh/G8BerS2GDyCnaO4ENDX33sDnWqC1PCADvDt9pzAlfxGx6Y2EM9HviW+yLcfeqfSfWPGTS2CcRsia8kRk7wYGy0NxVg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710282357; c=relaxed/simple; bh=NLduQ1qqi8G4d7ARUwsnkK5vON8Crq0A2u8yvVgVLio=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VORpUScplCgidpprrOwUtxq8D4uB5yrbNinsQRgBdV2aKwJzq8Y0vzU1aY20SPhv5ya1pVtfO2urwFWstFB4uqXwldJzdykmGTF/KUPwMh3G7DXaMbFO/Z3pndmUd5wnJ33NWXDOnlCpkv4a45sC3EyXCbe3Z4CSPcNN/9PTE6Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=KvjyGu41; arc=none smtp.client-ip=209.85.219.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-690b24973beso2631026d6.0 for ; Tue, 12 Mar 2024 15:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1710282354; x=1710887154; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OzQZAVQefo3mI7JaOv3i9HOffYntNfvUVWBj/1pTaQU=; b=KvjyGu41fyxAaBplH63kSqctY+kOsTiquLwH4ZBvO31IBw7LuQuPPLloV8kQvv5HmA 5b6bVFPPs2IfNusicO15hXr6S4vGMPAKtK6FjGh+CZ6T1Rm01opWxu2v9nciP+9LBOjp vrou5mo/njzUEYnN0Xq0MYopSSPbwak5Bw6Sg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710282354; x=1710887154; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OzQZAVQefo3mI7JaOv3i9HOffYntNfvUVWBj/1pTaQU=; b=VJ23FWrZC5LRJjRKLLAvPE0o5CdDdUpFvN/YU3Vc7R9EARd6L4Z2sAbZqD1v7ZuU2/ 2l9KgrtC5kCatFgvs/H7Yp4lm5+xgccF7/V7L+5lOFQxdTvm8k2TpFYdG2aIeTPBhQ8e zv1ph2ldSITSFsspV0mQ30Irg5ssmW1sqVaNOkFjvr2cmNyWhQz5Ss82qNZllaH7/3yK HYVzjiJLZ4ESkV6WH2ru6xmeY0swutnTPRLb7OTHwQH8XU9oNkme5kbBToDbUtO2JjFh 2E8Guj9EYnDCsY50KbTEdmRp8sB4F661AHdYSQO6r9/hYl+jdHurh3E25zuYsVWKrqrZ bQLA== X-Forwarded-Encrypted: i=1; AJvYcCXkE3QIeP7O5A52ZGmEDxh5n1bHtM+FoVNTpbRFZbyk8koi3H21bzOzOJ9A36R4jFwnyKW7uIkpITl/M1CY4MqmMCeznJnrdyR6AiCE X-Gm-Message-State: AOJu0Yy47Yxh2vcwXewOIDJ7fbd/F3UAULElnAOeAnClCZKTw5BPeOrm A9PyJ5yj9W8zfRtdaWyO0JvGp50K9F/dsNbV4NWAsz95p7s6yrStsrv2bkoVDMsICVD5xyQEIZi Af5qoiq7N0vgQYHp5qDvmbVBXGg5GQjmIMe2p X-Received: by 2002:ad4:5c48:0:b0:68f:dde4:fb12 with SMTP id a8-20020ad45c48000000b0068fdde4fb12mr1707180qva.9.1710282354445; Tue, 12 Mar 2024 15:25:54 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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> <20240308084212.4aa58761@xps-13> In-Reply-To: <20240308084212.4aa58761@xps-13> From: Simon Glass Date: Wed, 13 Mar 2024 11:25:42 +1300 Message-ID: Subject: Re: [PATCH v6 1/3] dt-bindings: mtd: partitions: Add binman compatible To: Miquel Raynal 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 Content-Type: text/plain; charset="UTF-8" Hi Miquel, On Fri, 8 Mar 2024 at 20:42, Miquel Raynal wrote: > > Hi Simon, > > sjg@chromium.org wrote on Fri, 8 Mar 2024 15:44:25 +1300: > > > Hi Miquel, > > > > On Tue, 6 Feb 2024 at 01:17, Miquel Raynal wrote: > > > > > > Hi Simon, > > > > > > > > > > > > > > > > > > +description: | > > > > > > > > > > > > > > > + The binman node provides a layout for firmware, used when packaging firmware > > > > > > > > > > > > > > > + from multiple projects. It is based on fixed-partitions, with some > > > > > > > > > > > > > > > + extensions, but uses 'compatible' to indicate the contents of the node, to > > > > > > > > > > > > > > > + avoid perturbing or confusing existing installations 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 partitions. 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 properties have mostly served their > > > > > > > > > > > > > > > + purpose, at least until the firmware is repacked later, e.g. due to a > > > > > > > > > > > > > > > + firmware update. The 'fixed-partitions' binding should provide enough > > > > > > > > > > > > > > > + information to read the firmware at runtime, including decompression if > > > > > > > > > > > > > > > + needed. > > > > > > > > > > > > > > > > > > > > > > > > > > > > How is this going to work exactly? binman reads these nodes and then > > > > > > > > > > > > > > writes out 'fixed-partitions' nodes. But then you've lost the binman > > > > > > > > > > > > > > specifc parts needed for repacking. > > > > > > > > > > > > > > > > > > > > > > > > > > No, they are the same node. I do want the extra information to stick > > > > > > > > > > > > > around. So long as it is compatible with fixed-partition as well, this > > > > > > > > > > > > > should work OK. > > > > > > > > > > > > > > > > > > > > > > > > How can it be both? The partitions node compatible can be either > > > > > > > > > > > > 'fixed-partitions' or 'binman'. > > > > > > > > > > > > > > > > > > > > > > Can we not allow it to be both? I have tried to adjust things in > > > > > > > > > > > response to feedback but perhaps the feedback was leading me down the > > > > > > > > > > > wrong path? > > > > > > > > > > > > > > > > > > > > Sure, but then the schema has to and that means extending > > > > > > > > > > fixed-partitions. > > > > > > > > > > > > > > > > > > Can we cross that bridge later? There might be resistance to it. I'm > > > > > > > > > not sure. For now, perhaps just a binman compatible works well enough > > > > > > > > > to make progress. > > > > > > > > > > > > > > > > Is there any way to make progress on this? I would like to have > > > > > > > > software which doesn't understand the binman compatible to at least be > > > > > > > > able to understand the fixed-partition compatible. Is that acceptable? > > > > > > > > > > > > > > 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 needs. > > > > > > > > > > > > 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 instead of > > > > > > fixed-partition. > > > > > > > > > > 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 with. > > > > > > > > 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? > > > > > > This is my current understanding, yes. But acknowledgment from Rob is > > > also welcome. > > > > I am trying again to wade through all the confusion here. > > > > 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. OK, so I think my confusion is that I thought you were referring to a 'partitions' compatible. But you are just referring to the name of the node being 'partitions', with the compatible string being 'fixed-partitions'. I believe I can make this work by adding a new 'binman.yaml' with the compatibles that I want to introduce. I cannot change partition.yaml since it does not itself specify a compatible. > > 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. Yes that is fine. > > > 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. I think so, thank you. I will send another version. Regards, Simon