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: 13448637 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 45E23C4332F for ; Tue, 7 Nov 2023 13:27:12 +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=PBX8W5VNZXW2Xj8HSvH9OigMu9JTTobfU6c3rWgr7yA=; b=AsjaDsUs2+uyY9 WgxsjoLZK5QnFihgpV7DBAsxJ/66TIp8L+IacmgNQepjt4i/H2weZt0JBlKCzu/w9qLPEx7VPeyZ4 KaHEkQd95X2lvJ2/JZqIcPYLEBNo6LmsVEPFLN9x6fglLpZYNUTVrCDTpqhk2fe+ATg8SO+NFUkKx Dg7ESSraE2P0UYz9djV8O50+o6E0R3L2DNu1r8JiXSqUKoib3qD690HQRIpMUIxiFJ1lSbsWXICgH iqDkPubhUfUIw/RcBhZTSpWG5h0JS1zOi9Gg1lD5eIwKc8yV9GJ5eYRSOoRY8V9q7hNCRzmpS3o59 Dojgfdr/F8Ei9rr54slw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0M6L-001bvQ-06; Tue, 07 Nov 2023 13:26:41 +0000 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0M6I-001bsz-06 for linux-arm-kernel@lists.infradead.org; Tue, 07 Nov 2023 13:26:39 +0000 Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-357ccaf982eso21569765ab.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=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=9/mFjd0wgmEwKVxmYgWqnXsXQMR8jMmnZxMCOKykInw=; b=oAJAmHctFiuA+u8pr0wuXPKQaAZOvasbvWqGr6MSUyIRxTrmeumVJznBelGw7PwVNr 2prK62u0RihDcTVQuZDNqjpNfuYM9OwmzoBoW1ENstNp/gxTXIDKuDPrOX4geb17TKtC ItJcRT9k7x8p99YCmOGf0sDhImDwN1/s97r0Q= 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=mpHL/gv75InHmu/naeIFLo04t3tFekjQqF+oNn64VnjX/IExqsnTyn1+SzH6QaOUCl Gu+zbTMWzWpYH66QufVSlezr3+XdxtjiQABKQNV5MmUa9oNlGNkhdMxclFL6HFn47isK 9ZEUBvGqHvR7HYWK7e7Iy/SlaA8YkEdJp1VPMBerNujqdC7u5nNq6sMZwRf+NP/428xr grNRC2AqIVgRsBOJynVFb8B7AjjfrWV5Umr/W4QzY0A3DW6jl7fiQIZdy7C0gV+VZqxL yfEFhRyrg2w4dBLy6CEsrT0VKLcwYhdRFD7GU4joyr7+R7z6b5/4EWbiqGBWzDsbb/8S WdxQ== X-Gm-Message-State: AOJu0YwMbjCNX/3M13tEXRlNQvhRWmc8d9SHsbUawYTrUgCJ9goxkMiM eqyqWJfX7gq7otQAO1qgjX+8Mo2ZD/5RSv0u0dJLfw== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231107_052638_070565_AF380689 X-CRM114-Status: GOOD ( 18.99 ) 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 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