Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4799853rdh; Wed, 29 Nov 2023 10:59:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHRs0u+0w9MeUo9zC6e+1q+0HF+Cc1mxtkZ6CZXH+Y67G8PTtjErTVxe15fq1Zu7HAACgxZ X-Received: by 2002:a17:903:41cf:b0:1cf:cece:e96d with SMTP id u15-20020a17090341cf00b001cfcecee96dmr16594016ple.0.1701284362958; Wed, 29 Nov 2023 10:59:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701284362; cv=none; d=google.com; s=arc-20160816; b=kI0hyQtFWBMNSig8gvXQR1So3qvjy4CmnotCmCm2ai2lCfuP/0AnvgijP0WApZAeYi xOIzIjUyduY416FwmEG33uagklIVaQc1YT0PURey5BFiQmB27st5HVFBNyDyrq8Ij0ra kETZCmKJFCJ2QgMrcQRclHGTN7beFLsi3NFMoLncLfiT8RAr9H7YmPMFKwLnMVgmfr+q EskX9A32kM1SB7FZ6gQ25n54fr+zI07M81fSwj7O4OXUbmrMZ0ryycR1wfnUgdEECm/m hy1EhkUHABYMAjdmuQM+DgjVLT9/0Oy3ge0hk0LHIj7Pcq8aiOwKJKHyv8KqQwcSqZqu /8Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=+i31kWPmPALqaNhXcRmNYNXXoiQz+liFFrgnQIpKJBE=; fh=7Jw7Hb7YFauXJ1O1cbEKFk9rYjd7l1qZgRJSx2qM8cQ=; b=oM7h5VwjvdshFJysRI//+RmozTeUwegdGMSrrIeNiDaX5QZHYMta5GdiY0kpWHSxwF nbZdMvAoqQf2vytsRFGTGjUJH/FoJrYN6uQ0je2i3YVsyoAcWsOAhd5M/KyAwr3mEHPC lAZPXAAkh+xpcKkinkaLDncl4UOdw4zHJwJMl+mlfamo9CzJe4NTNUjMhQYXrCiycMGt iDrq08IBtgfKkx+ivV8BZJUYJXEm/jW9tMDa5GhMeV5OuwEEtFNxTkhfdA/csDMArXRB ktb4WvdgsUucTmzRKrgjaVZodGJT9IwXkH3a5MOBDQ27lmZG6NJenEBGXF2GGH9ZniPM BUVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id n4-20020a170902d2c400b001cfafa3a897si11635061plc.646.2023.11.29.10.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 10:59:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 62272804196B; Wed, 29 Nov 2023 10:59:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbjK2S7E (ORCPT + 99 others); Wed, 29 Nov 2023 13:59:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbjK2S7D (ORCPT ); Wed, 29 Nov 2023 13:59:03 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C2ECD5E for ; Wed, 29 Nov 2023 10:59:10 -0800 (PST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1r8Pm3-0000qX-8i; Wed, 29 Nov 2023 19:59:03 +0100 Message-ID: <30f32467-51ea-47de-a272-38e074f4060b@pengutronix.de> Date: Wed, 29 Nov 2023 19:59:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 2/2] arm64: boot: Support Flat Image Tree Content-Language: en-US To: Simon Glass , linux-arm-kernel@lists.infradead.org Cc: 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 References: <20231129172200.430674-1-sjg@chromium.org> <20231129172200.430674-3-sjg@chromium.org> From: Ahmad Fatoum In-Reply-To: <20231129172200.430674-3-sjg@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 29 Nov 2023 10:59:20 -0800 (PST) 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. > + 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? > + 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? Cheers, Ahmad -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |