From patchwork Sun Nov 19 15:01:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13460473 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2291C072A2 for ; Sun, 19 Nov 2023 15:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ICYtJ5B+pI3Rg2CPCJ4JBcMGd7S4+/7g28JeYlq4zos=; b=VtbVB7VZyNKnOZ nK4lClQgDM7cx6iypt8jpyZScJZVX7U3vIJRkPqS0b1O5gPLKnN0wLuuQXArar2qIz1yRtUG2Xwz/ Fwp3k8S5uLcuAEN/XiMCWsUHE0aDlyA7QDusNVjhkdDiVaNOzWIpNqVxDtCFmPsvlBfEbcolyiKIQ Vq/mxoCwmJywZrKpPXErLs8vAOCScQ+Fjocc1MxS+V8dldKaWfXEbwyh7O/AaqYN/82LwhdU2Abgu ywckefc30uViR5yzBIxdJfTKrY1X+Zj1t+hOcZSBT1pstStHKx+eRGS8jaJn14wgZfmh1OuYWnG36 z1dXiF1IWlzXMZrSU8rA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r4jJm-00AJSL-20; Sun, 19 Nov 2023 15:02:38 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r4jJj-00AJRD-0o for linux-arm-kernel@lists.infradead.org; Sun, 19 Nov 2023 15:02:36 +0000 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7a683bd610dso131259539f.1 for ; Sun, 19 Nov 2023 07:02:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1700406153; x=1701010953; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=N51tl/zj6hx3y8C/i7pvWONxuVI4d2CkVjaNAa9KVfw=; b=XRBRxUdWBVK15QOTQi3Xm1pVstkzJKWHHxpKmwa/CN20zIgGUetlCl11wW2glO8U8F R3Kf+Gnb1sK3vdj8xyYo8zAF21FOlq/AR+ujXpcScoMSXufdNwIxLLCTl1Km/FQXjPgC GKhtROf3Ikhu18gOx1fNBG2R7YkzqlaxmdE/s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700406153; x=1701010953; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N51tl/zj6hx3y8C/i7pvWONxuVI4d2CkVjaNAa9KVfw=; b=on1Efys+GKTQMSKD/sW99Iw8y0/U7znHgp0m+fVTnohByB0gzembG1s+5OldH5crHK gb8M4OXhrqONwtkUOxcX+FC1qm77O+i5tMJkHHGEVoKFALhoNDbA3/4asBtFN+iTyugU lICiVSiQFj28/U0SojsJrJF42ifNj3C7OJsnFdMnvdn4/87PKl63XnKBGmJgtqWrAwFp 2QP9K6aJayttR1NzUpu8RMv9ZAn+1sacZC+83zb3wSOo8exLKKA+Dix3Wor+Knf8JlIi dF+jwkMelI4p8LVxTyTsJlA1JXXIxvxrYukDmSkWkTBKzDsk4T1oHN6dIMMExdRs0X10 pheg== X-Gm-Message-State: AOJu0Yw2UowILD+pnzLI2YQCZOQoPjkrjKv/QdR12E62ABQOmgcGNjD/ BpUJPh76igaK0m2FF19ua9txnMicQaC59cfF5+RwVg== X-Google-Smtp-Source: AGHT+IHKjO+9V/Ov2s/qDvhWacbsJZSlSMrqQojB8Glj0ndNWo7mxL+WGv1jtXPHhdXCO+WYlSj6Lg== X-Received: by 2002:a6b:c505:0:b0:7b0:aee5:f9c2 with SMTP id v5-20020a6bc505000000b007b0aee5f9c2mr3285969iof.14.1700406153095; Sun, 19 Nov 2023 07:02:33 -0800 (PST) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id w24-20020a056638379800b004665bec29d1sm79923jal.128.2023.11.19.07.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 07:02:32 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: U-Boot Mailing List , Masahiro Yamada , Tom Rini , Simon Glass , Catalin Marinas , Nathan Chancellor , Nick Desaulniers , Nick Terrell , Nicolas Schier , Will Deacon , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 0/2] arm64: Add a build target for Flat Image Tree Date: Sun, 19 Nov 2023 08:01:13 -0700 Message-ID: <20231119150229.634424-1-sjg@chromium.org> X-Mailer: git-send-email 2.43.0.rc0.421.g78406f8d94-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231119_070235_352993_D6EABA75 X-CRM114-Status: GOOD ( 18.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Flat Image Tree (FIT) is a widely used file format for packaging a kernel and associated devicetree files[1]. It is not specific to any one bootloader, as it is supported by U-Boot, coreboot, Linuxboot, Tianocore and Barebox. This series adds support for building a FIT as part of the kernel build. This makes it easy to try out the kernel - just load the FIT onto your tftp server and it will run automatically on any supported arm64 board. The script is written in Python, since it is easy to build a FIT using the Python libfdt bindings. For now, no attempt is made to compress files in parallel, so building the 900-odd files takes a while, about 6 seconds with my testing. The series also includes a few minor clean-up patches. [1] https://github.com/open-source-firmware/flat-image-tree Changes in v6: - Drop the unwanted .gz suffix Changes in v5: - Drop patch previously applied - Correct compression rule which was broken in v4 Changes in v4: - Use single quotes for UIMAGE_NAME Changes in v3: - Drop temporary file image.itk - Drop patch 'Use double quotes for image name' - Drop double quotes in use of UIMAGE_NAME - Drop unnecessary CONFIG_EFI_ZBOOT condition for help - Avoid hard-coding "arm64" for the DT architecture Changes in v2: - Drop patch previously applied - Add .gitignore file - Move fit rule to Makefile.lib using an intermediate file - Drop dependency on CONFIG_EFI_ZBOOT - Pick up .dtb files separately from the kernel - Correct pylint too-many-args warning for write_kernel() - Include the kernel image in the file count - Add a pointer to the FIT spec and mention of its wide industry usage - Mention the kernel version in the FIT description Simon Glass (2): kbuild: arm64: Add BOOT_TARGETS variable arm64: boot: Support Flat Image Tree MAINTAINERS | 7 + arch/arm64/Makefile | 7 +- arch/arm64/boot/.gitignore | 1 + arch/arm64/boot/Makefile | 6 +- scripts/Makefile.lib | 13 ++ scripts/make_fit.py | 289 +++++++++++++++++++++++++++++++++++++ 6 files changed, 321 insertions(+), 2 deletions(-) create mode 100755 scripts/make_fit.py