From patchwork Tue Nov 7 13:25:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13448635 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 890C4C4332F for ; Tue, 7 Nov 2023 13:26:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234429AbjKGN0e (ORCPT ); Tue, 7 Nov 2023 08:26:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233882AbjKGN0d (ORCPT ); Tue, 7 Nov 2023 08:26:33 -0500 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6D4892 for ; Tue, 7 Nov 2023 05:26:30 -0800 (PST) Received: by mail-il1-x135.google.com with SMTP id e9e14a558f8ab-357ccaf982eso21569735ab.0 for ; Tue, 07 Nov 2023 05:26:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699363590; x=1699968390; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=9/mFjd0wgmEwKVxmYgWqnXsXQMR8jMmnZxMCOKykInw=; b=QxzwgS9jfl6qIrlOtdRLXW2dUQ3azVnHzTIYvtV4TVlJdJh4tWQYgyKpBTsP8/746A dmwk0PIn6wEu8iSHGSQQUB/lgLGay/BonAObLO3CPQ8jrwgY1OQYcaluqKyIYAaJOAd0 mH2TNXAxJ0kif2QG5s0vNGVgkStSo58t8Y2ms= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699363590; x=1699968390; 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=9/mFjd0wgmEwKVxmYgWqnXsXQMR8jMmnZxMCOKykInw=; b=qgKOGPmAA6oYKDcIBtKRt3BsnvCeK2EU3T7khqr0MIBlhkkBWShNrjvbGxYVo6vW5N 4yMS4d0vPnzZIfZhf7M8dDFJ90bD3PYq4jeGHme0sifgE3YGe0GSyYFDya7QAxkjEvvy XrnVPrFrKn/GL9aAEbnlTHojt/xWESRX97lomBF4M/qKjkiunDHZyIsqNg5m7nYNcY4Y bPSsWL0JrXIjMxlCVoHDPN1jv6M72oOHYly/AeERrXPn63gI3ihEcTCWbvUMhgsn/sl1 jzNWc/5m2DvGz5ae/YNXJNmUh+zqoajPEc/iGz+aDs3lYdxyiNx+ziuJJ3HK8pQPT+RY r3aQ== X-Gm-Message-State: AOJu0YzljIxF/yvhCUfOLbFi46JfPxGwLgtuwuCyfYgAZzUHkkEy15yR tPQRdU3f9EGlrSHelqLBIsDIYA== X-Google-Smtp-Source: AGHT+IEvK+ABpnW0xq6JBR04UWQ96UFjO7HkpTm4Tgs7DAO9KabFFzP3Z7DWsLQSuhCHCZEWm4Mydw== X-Received: by 2002:a92:c56c:0:b0:359:b467:e29e with SMTP id b12-20020a92c56c000000b00359b467e29emr3139219ilj.30.1699363590166; Tue, 07 Nov 2023 05:26:30 -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 db8-20020a056e023d0800b003596056a051sm3141589ilb.71.2023.11.07.05.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 05:26:29 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: U-Boot Mailing List , Tom Rini , Masahiro Yamada , 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 v3 0/2] arm64: Add a build target for Flat Image Tree Date: Tue, 7 Nov 2023 06:25:52 -0700 Message-ID: <20231107132619.34062-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.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 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 | 16 ++ scripts/make_fit.py | 289 +++++++++++++++++++++++++++++++++++++ 6 files changed, 324 insertions(+), 2 deletions(-) create mode 100755 scripts/make_fit.py