Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4787497rdh; Wed, 29 Nov 2023 10:35:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IE62fuzjlKMF9dNTwIjg58QCTQbVN2rPRHmDboQ/OKL8/KDxkqX50o+xSgyBfvOrBVt81Yn X-Received: by 2002:a17:90b:3a90:b0:285:8cb6:6153 with SMTP id om16-20020a17090b3a9000b002858cb66153mr25830823pjb.17.1701282923600; Wed, 29 Nov 2023 10:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701282923; cv=none; d=google.com; s=arc-20160816; b=L99yD5SQ0m9mVbqh5iENPLPaoEOmh3Ji9HLNGIQF7WXXxIbgoxcZk03bDI2nCNnXPn Zm1uiCO9P+0RybhUZVrxznuFd5Djn7CvV2A5EvS+onFh0sz59KFQwPCkmn+kFMHSs7UQ 7wG1H4g8SU7BWJdQFgxYIQ7qPT4fPv1643Dnty+4jf+K/SCjKBKjOHawyxTVVz3BMsQm D4EoaNFqa3J/a036cdH+PrIVCRrFgwFwAtYwUvd2JHEI5yeALKi/W7sJ/Cbnhs2sri9e +AWB6D7LK9dleO/DROPRlezFec4WiV2W/yk+05yuWSWISI6ONWbN7woiEkRtRhITQ6fY gTSg== 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=qPo+B0rUGL+xJ/l34xZeTMJ4/y0Bij/sKNQIoR5k2II=; fh=7Jw7Hb7YFauXJ1O1cbEKFk9rYjd7l1qZgRJSx2qM8cQ=; b=k9pgKIr3c1u+XD/T7oqaKZZh5jvwLFMJRYdEYg8boJY+NMeQb71LwVrsdGcMzh+ndF rt7oXnfsCnZuk4oRa79SvvzC1PC4MoPfRgKjlVBMwNIQAdxSJ9O/8AEya8P1GwjhxsXy CvDZs24FyLNEEDT6u8PQVen7QPs0R5hW18WyR9gFKH2GxUvqq0Yi4mGntfnupsPFDkbQ eBoXztwgTiB9ItB33JMckrmpSEDmDPkxtpuJAmpYvfzSj9kzbOzB+0DbI5YQNdhYzmgv 8D7qforCYJXul4SuM5RyCwsN/BaWrmjdckZc31iTh3i9AYbjNaJ4h/0Mu+EE6JMbiyfV c1Fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q20-20020a17090aa01400b002806cdeecc6si1788981pjp.35.2023.11.29.10.35.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 10:35:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 5B88D80725FE; Wed, 29 Nov 2023 10:35:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231304AbjK2SfL (ORCPT + 99 others); Wed, 29 Nov 2023 13:35:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbjK2SfK (ORCPT ); Wed, 29 Nov 2023 13:35:10 -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 288D4122 for ; Wed, 29 Nov 2023 10:35:16 -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 1r8POr-0006HJ-Mr; Wed, 29 Nov 2023 19:35:05 +0100 Message-ID: <03595817-4698-46d3-b2d8-3bc40c7e723e@pengutronix.de> Date: Wed, 29 Nov 2023 19:35: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=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 10:35:22 -0800 (PST) Hello Simon, On 29.11.23 18:21, Simon Glass wrote: > Add a script which produces a Flat Image Tree (FIT), a single file > containing the built kernel and associated devicetree files. > Compression defaults to gzip which gives a good balance of size and > performance. Thanks for working on this. I think it's useful to have the kernel generate a FIT image out of the box. More complex use cases are always free to call mkimage with a custom ITS. > The files compress from about 86MB to 24MB using this approach. > > The FIT can be used by bootloaders which support it, such as U-Boot > and Linuxboot. It permits automatic selection of the correct > devicetree, matching the compatible string of the running board with > the closest compatible string in the FIT. There is no need for > filenames or other workarounds. > > Add a 'make image.fit' build target for arm64, as well. not that it matters much, but should this maybe called Image.fit as the other Image types are capitalized too? > EFI_ZBOOT_PAYLOAD := Image > EFI_ZBOOT_BFD_TARGET := elf64-littleaarch64 > EFI_ZBOOT_MACH_TYPE := ARM64 > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index 1a965fe68e01..e1c06ca3c847 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -496,6 +496,19 @@ quiet_cmd_uimage = UIMAGE $@ > -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \ > -n '$(UIMAGE_NAME)' -d $< $@ Doesn't hardcoding a load address and entry address here defeat the point of having FIT as generic portable image format? At least barebox will try to place the kernel image at physical address 0 and will exit with an error message if no SDRAM is located at that address. The recommendation in that case is to omit load and entry address altogether to have barebox find a suitable location, but I see now that the FIT specification requires a load and entry address. What would happen if U-Boot tries to load this FIT image on a board that has no DRAM at address 0? Please Cc me on subsequent revisions. I am interested in testing that this works for barebox too. Thanks, 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 |