From patchwork Wed Nov 29 17:21:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13473254 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 46999C4167B for ; Wed, 29 Nov 2023 17:23:21 +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=38crzXSLJ16oG5lH/slBJ3IZRmLxkLkFR1WciARC3HY=; b=Luu6zhKy4np4hA GgAO4QOflSv8cFvEVM933eJ4n5J+5uhNm7iFvu0G3G+d95r2qLb9klj0rVTet+ksIhUhlHrApI71D 7C5BH/7A7JliMYIVg8nUULjjuZcJuEQjUdVLXGic1YK/hOt2Y05B4HYMZqs57nqQx0o3kYt/R+ijb QAPV/eVJXYUKS7MjzgmC1zMT3zLUniJOOVJHZ99KguHCnIs1n3zZ4h30DsX/Y8t6rcjr+b1ozGEHk yWR9VfeI/7qJnaepYik2fBTTc5DFCb/Raer6YRiZtuLEOmCSQ2D/mROnPZ3kxEtfPY1Yk3yTa+54W LBtl3zvaXA9z85XEzJFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8OH0-008zg4-0l; Wed, 29 Nov 2023 17:22:54 +0000 Received: from mail-il1-x136.google.com ([2607:f8b0:4864:20::136]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8OGx-008zdu-1X for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2023 17:22:53 +0000 Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-35ca48d48d6so2979585ab.0 for ; Wed, 29 Nov 2023 09:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701278568; x=1701883368; 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=FmMU4E/b+uSxcWr7/YV1tz9g4DZ7LEAYA6oOOjTn5rY=; b=OIWgBIrVQobg4jjA9S3LvBDxvXVmKSOMcRpcRG4URoSueIw5/5zTnfn7pNuUF2ekzb 8dqZZkKIH03eDNs6nJky41KIX4hULdM1XP4m1As5vzn0M19h3s915as0ny3vU9Ur1Crg P5kFvvUJvIjDwhWba3xEIRkQpwZwoNgwv4as8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701278568; x=1701883368; 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=FmMU4E/b+uSxcWr7/YV1tz9g4DZ7LEAYA6oOOjTn5rY=; b=s/+K1izAargT698kJuyupNWkl6hz5mBcwb6GIFAFUXU5c/ZqcEFBWU52V1P8VCO6eR 5PSQ3pvVYcahn+xhm/EHovHdPR3yuFUDrR11aAsFQ+4Kcn7f1A6KPy0CnzFNUNCaU0aa /n8RxER0+z/n2mCrb0sqpmOoLjL3PTsgFDpQ8ZPuxm/OkGcduWewtxV2vnUqt6FQ5g31 J5usrKBLQq+amA1Axb17a74PBRCRpoE6uA+Wi/a5IGpTB4CzUnc6L6I1HEeC9lBBcLNV SJXU2JS/lfS0LFgs+aVQl2QlBf244oEFljujSF80K6431W9MaBYazpe9ra38v06nE+Y5 xc7g== X-Gm-Message-State: AOJu0YyEsXVOPQpxQV1NQ44H+NYwZ7m2q5acOyy7ajW783bPIY+fxRfK g4WuEqEaVAY1i2O5n5zEGfsyV/3vkr3zFHhwyCs= X-Google-Smtp-Source: AGHT+IGBxziXrcPo8J6ti14stg5UnqZ33EBytnwprKYBbSzdEFUFDixLcVYV2vqJhDc547Ifaf7fVQ== X-Received: by 2002:a05:6e02:1c88:b0:35c:c82c:c79c with SMTP id w8-20020a056e021c8800b0035cc82cc79cmr9781849ill.7.1701278567855; Wed, 29 Nov 2023 09:22:47 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:f4fd:5056:45a8:b749]) by smtp.gmail.com with ESMTPSA id di5-20020a056e021f8500b0035d2fc4ce47sm471212ilb.9.2023.11.29.09.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 09:22:47 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: Masahiro Yamada , Tom Rini , lkml , U-Boot Mailing List , Simon Glass , Catalin Marinas , Nathan Chancellor , Nick Terrell , Nicolas Schier , Will Deacon , linux-kbuild@vger.kernel.org Subject: [PATCH v7 0/2] arm64: Add a build target for Flat Image Tree Date: Wed, 29 Nov 2023 10:21:51 -0700 Message-ID: <20231129172200.430674-1-sjg@chromium.org> X-Mailer: git-send-email 2.43.0.rc2.451.g8631bc7472-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_092251_540322_E7F91CF7 X-CRM114-Status: GOOD ( 18.23 ) 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 v7: - Drop the kbuild tag - Add Image as a dependency of image.fit - Drop kbuild tag - Add dependency on dtbs - Drop unnecessary path separator for dtbs - Rebase to -next 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): arm64: Add BOOT_TARGETS variable arm64: boot: Support Flat Image Tree MAINTAINERS | 7 + arch/arm64/Makefile | 13 +- arch/arm64/boot/.gitignore | 1 + arch/arm64/boot/Makefile | 6 +- scripts/Makefile.lib | 13 ++ scripts/make_fit.py | 289 +++++++++++++++++++++++++++++++++++++ 6 files changed, 326 insertions(+), 3 deletions(-) create mode 100755 scripts/make_fit.py