Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4803406rdh; Wed, 29 Nov 2023 11:03:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVSrKxw6L58rG7zmJ8O3SrA/UI/YOX/flNIYhvZzmKoyxqFQH6x13w55WKRxgu7ZC1HxFz X-Received: by 2002:a17:903:454:b0:1ce:65e9:29bb with SMTP id iw20-20020a170903045400b001ce65e929bbmr22180124plb.54.1701284624647; Wed, 29 Nov 2023 11:03:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701284624; cv=none; d=google.com; s=arc-20160816; b=vyonHnjPSflYUNVWcM9tyWGWiICu534cdIuEdgvRQY+6mgy6/pRBGt8ZMCdMiXhNDi TZocx9D1//oSHmB5YwJvMQwT8ojSNOSXggfpwKgsqn57LcGooznnO3si52ICMSXuwNTe qYhEwwQAfmJtdjtR8aPT45NkQvmU4/sFKnA/ddDI1HY1OQQ8SLhB8Vvv88tmHtxkxP8f gasOv66/GVAXO5MumEFJnXJXCuWMKnauMC7IS3hvvYvLIcSs8kextTKWo9yKeDjOrVr8 rWAxo3Jx6PvgAa82Al8PplzGlaSJyONx3f0LbErWj60c6XnaQMHz57tMS14GCYLq047Z jDuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=eqFuufKBS903oC+09D1OgJlE8YGZvK320Etdppu6ukQ=; fh=hE818ivoe0UZgus+AMQyIn64tEUoOmlIpLc/j3V+Ylg=; b=JHvx2ApbRzHFPEAnfzGm+pPZ+nKwrkwM+uUHi4H/kVXkeQAva0qWJsSdEo5OrjvXTt GCrGEP7TfGqzR8UFwjmO8l7W5AE7Uzp8pkk25mutfbZh2Z/jv1WE75rMqSvEo2taaikV ix1+Bn/ZhxSima7z1ssQJvv/6DsFTMFPliZ0HSxdh2QjryhMNg6n4OMFDHorvF2h3X8V wM3GgXt/tUHjYYe9TCAMQq1JktGK3Bo70ivzHL1DMVsb33k5vdDeO50GT7pJMmtxQ5yC Z2C7uHePtCUZRIzdpXWvj/S1IhnRNs6saMuNZqHfpBW9xt/f+6It60v6B8SWzxu0s05C e7gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="OLxi/U9X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id h3-20020a170902704300b001cf7c3a22c9si5359568plt.276.2023.11.29.11.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 11:03:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="OLxi/U9X"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id B5DC980C5C9A; Wed, 29 Nov 2023 11:03:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233728AbjK2TD0 (ORCPT + 99 others); Wed, 29 Nov 2023 14:03:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234353AbjK2TDN (ORCPT ); Wed, 29 Nov 2023 14:03:13 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8954A10FD for ; Wed, 29 Nov 2023 11:03:10 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50bca79244fso206006e87.3 for ; Wed, 29 Nov 2023 11:03:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701284589; x=1701889389; 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=eqFuufKBS903oC+09D1OgJlE8YGZvK320Etdppu6ukQ=; b=OLxi/U9XBNwHTtVxzR3ob93N6V3VET6+XiUhjek4TZASdl1k+KBqk/qk7IoenpU/Uy IkzvqGyyteioAAIRemANxOQeJIHV7jmoJJp4ib71axLBQ2obiivVZHZ/DNZ+htpfSZ3o Ej78sGPZ++yXwnsDSwE7tGXpBEBCAUZFDPLDQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701284589; x=1701889389; 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=eqFuufKBS903oC+09D1OgJlE8YGZvK320Etdppu6ukQ=; b=SiA+3KDwbwaYuYykPl2tUP4PzOwopOwMQoogT6tHfM5E7/x9mSAhGb252DypYQ7Ai2 Y/5/Lz48EbReBkEohSmmAnnQqyK+xbXs+zRWrK9nNrDjm5xQorUKf+cE4WvDioNbWgN+ lrR/8QQOQjmfNin8GNf9B/F8fpMvdkryxdn4aee11o3nvi3ln/1m3qCaFijuqu17FN6D zP+awX0jDbCsaIrB9hFh/c/Gf86w3n+7Z8fga/pH8nxUCTAE8pKtOHelM+HDtiD3W60R g3CaEkl7Q3MPgd71rHYmFRWSKGB8EWiKGFTeLFpXomyhQ/xQf9EgbwouWJ3qj5cpfNMW UGOA== X-Gm-Message-State: AOJu0YwKjKdyMkJieZeSbIUQTWapdnJPjfsOk62BOs/KITp4LnEbtq7j oaI23Od9cTrIIf0z8sdQrgcI5CeFshIVOPwd6fQeZg== X-Received: by 2002:a05:6512:2343:b0:509:455c:9e3d with SMTP id p3-20020a056512234300b00509455c9e3dmr12103134lfu.18.1701284588464; Wed, 29 Nov 2023 11:03:08 -0800 (PST) MIME-Version: 1.0 References: <20231129172200.430674-1-sjg@chromium.org> <20231129172200.430674-3-sjg@chromium.org> <30f32467-51ea-47de-a272-38e074f4060b@pengutronix.de> In-Reply-To: <30f32467-51ea-47de-a272-38e074f4060b@pengutronix.de> From: Simon Glass Date: Wed, 29 Nov 2023 12:02:57 -0700 Message-ID: Subject: Re: [PATCH v7 2/2] arm64: boot: Support Flat Image Tree To: Ahmad Fatoum Cc: linux-arm-kernel@lists.infradead.org, Masahiro Yamada , Tom Rini , lkml , U-Boot Mailing List , Catalin Marinas , Nathan Chancellor , Nick Terrell , Nicolas Schier , Will Deacon , linux-kbuild@vger.kernel.org, Pengutronix Kernel Team Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 29 Nov 2023 11:03:42 -0800 (PST) Hi Ahmad, On Wed, 29 Nov 2023 at 11:59, Ahmad Fatoum wrote: > > Hi, > > a few more comments after decompiling the FIT image: > > On 29.11.23 18:21, Simon Glass wrote: > > + with fsw.add_node('kernel'): > > + fsw.property_string('description', args.name) > > + fsw.property_string('type', 'kernel_noload') > > The specification only says no loading done, but doesn't explain what it > means for a bootloader to _not_ load an image. Looking into the U-Boot commit > b9b50e89d317 ("image: Implement IH_TYPE_KERNEL_NOLOAD") that introduces this, > apparently no loading means ignoring load and entry address? > > I presume missing load and entry is something older U-Boot versions > were unhappy about? Please let me know if the semantics are as I understood, > so I can prepare a barebox patch supporting it. Oh, see my previous email. > > > + fsw.property_string('arch', args.arch) > > + fsw.property_string('os', args.os) > > + fsw.property_string('compression', args.compress) > > + fsw.property('data', data) > > + fsw.property_u32('load', 0) > > + fsw.property_u32('entry', 0) > > + > > + > > +def finish_fit(fsw, entries): > > + """Finish the FIT ready for use > > + > > + Writes the /configurations node and subnodes > > + > > + Args: > > + fsw (libfdt.FdtSw): Object to use for writing > > + entries (list of tuple): List of configurations: > > + str: Description of model > > + str: Compatible stringlist > > + """ > > + fsw.end_node() > > + seq = 0 > > + with fsw.add_node('configurations'): > > + for model, compat in entries: > > + seq += 1 > > + with fsw.add_node(f'conf-{seq}'): > > + fsw.property('compatible', bytes(compat)) > > The specification says that this is the root U-Boot compatible, > which I presume to mean the top-level compatible, which makes sense to me. > > The code here though adds all compatible strings from the device tree though, > is this intended? Yes, since it saves needing to read in each DT just to get the compatible stringlist. > > > + fsw.property_string('description', model) > > + fsw.property_string('type', 'flat_dt') > > + fsw.property_string('arch', arch) > > + fsw.property_string('compression', compress) > > + fsw.property('compatible', bytes(compat)) > > I think I've never seen a compatible for a fdt node before. > What use does this serve? It indicates the machine that the DT is for. Regards, Simon