From patchwork Sat Nov 4 19:42:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13445579 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 953C8C4332F for ; Sat, 4 Nov 2023 19:43:08 +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=bdFfuiyHS6GujOIcFX4gckjR9JdY2Z5fS5k2QA4MxDM=; b=nLxO+21TcT74MA sq6asI2+sT4FUFs1SNJiZnwZLPdXopwVlu1c6PN7biN1BtGfT6WJgJiuBT6Mj0Z2gKKVyNb8LDulD TX1l7hTKH/UC9MbRheGMdfywFaVdzggoXLxT6zonCzwjN7GLvYjM6EAr1YG1fIr2iy4BsOcx/sK97 T0+wDIfPUry10t0BimzOqVUvoFRmP5ObXt/cvN3rcg8b3UbEYGJSfo2Adcdyb/y2F/xscCbXcppKv wR5dMZ4ouEuPEhKDjFyQrI6/jRa3wHXJ8Ec9yrni91XFBMvsKd3iOqCmRJN+TAG4mhuG3O9ULUu5s fOr9osy5poNygSltJtEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qzMXT-00DuIx-2X; Sat, 04 Nov 2023 19:42:35 +0000 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qzMXP-00DuFT-33 for linux-arm-kernel@lists.infradead.org; Sat, 04 Nov 2023 19:42:33 +0000 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-7a694a365d9so134220739f.0 for ; Sat, 04 Nov 2023 12:42:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699126945; x=1699731745; 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=S2OX4Eo9v+rQhNr2FvX3vObjPM79OTe5nhhahXKdqeM=; b=N3QPOcQ9MiUNL4do69TnwT3RIayqJ5UlHUlgGn/HAkRbJRH2VtvlB53qU1mlvZMAmE SUA72O4heXsJfYP1gfinBFI3EHYjn50OdEwPq0TSZgSQ/rO036nvaGX/oZe+eSmOR0Qa HXcZK/0MoB7dYSWZLiJuEMcwJQ5x/05gNquZQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699126945; x=1699731745; 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=S2OX4Eo9v+rQhNr2FvX3vObjPM79OTe5nhhahXKdqeM=; b=Jhpjsv9nu8EpYn9G/nToUNsoVXvckLKDIEqMiyp7SNz9IfUoTcEW8yEo0oIfGMyUjD WXIKyuYutPP8G5in64rvhNOwzJoNEhFuxNLAlnhl+cpUt9qyYgE1JbvXR+JhhPpt9BHr vWeuAW5Pgyt82Mu/Ts5AwxPioGXecQ5F0IRPPe5jreSlLexydw/8A/nLK3DFRSFlDceX +uF/UdXibnJ0AwKKJhbe0Q7ZI6DRHGGcH9Z8kIV0Y/XCXMdFJGw1l3tgFq6Xiy18pv44 FZHN1qK/nTQz7Ap1j+bvdwQI4BjbAfKFWFBPCtEvxVO+TQ+GJyoBFhvHCxL7MdmNyTkQ L+iQ== X-Gm-Message-State: AOJu0YyEiJBqqG7ckl2V5SDGnRnmDCB+T8e0aaSxlhorbNrkJN9Kt2MG CR44xUyLYLK9m0lb0aNNygO9IDtxbCLUH0JNc9esmw== X-Google-Smtp-Source: AGHT+IEQmOlHpL29TdFXJFPMr5evJiymQwNEjalBxAKtB6JFDUpkecBI6UNYhrYY+8vXDuE77TuE4Q== X-Received: by 2002:a05:6602:3419:b0:7a9:4b18:4c89 with SMTP id n25-20020a056602341900b007a94b184c89mr31619795ioz.6.1699126945152; Sat, 04 Nov 2023 12:42:25 -0700 (PDT) Received: from sjg1.united_club.lax.united.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id o4-20020a6b5a04000000b0079fbb834232sm1293318iob.19.2023.11.04.12.42.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 12:42:24 -0700 (PDT) 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 v2 0/3] arm64: Add a build target for Flat Image Tree Date: Sat, 4 Nov 2023 13:42:01 -0600 Message-ID: <20231104194207.3370542-1-sjg@chromium.org> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231104_124231_988446_92EA392D X-CRM114-Status: GOOD ( 17.30 ) 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 v2: - Split double-quote change out into its own patch - 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 to-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 (3): kbuild: arm64: Add BOOT_TARGETS variable arm: boot: Use double quotes for image name arm64: boot: Support Flat Image Tree MAINTAINERS | 7 + arch/arm64/Makefile | 7 +- arch/arm64/boot/.gitignore | 2 + arch/arm64/boot/Makefile | 9 +- scripts/Makefile.lib | 20 ++- scripts/make_fit.py | 288 +++++++++++++++++++++++++++++++++++++ 6 files changed, 329 insertions(+), 4 deletions(-) create mode 100755 scripts/make_fit.py