From patchwork Sat Nov 11 00:27:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13452869 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 85807C4167B for ; Sat, 11 Nov 2023 00:30:06 +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=CQDjBFC8J9vzITUIyshgk3tBvmxO3N/yF0VP3RTYTTc=; b=uX2aQeQH4veTs9 m/QqZYxmF0pE2FzezKPi7qnWSW0rwMZbj3PLqHf5aeLEC0VyS6po9tNC22P6PlVpIhTpqMOITQhjm LyQU/L3iRonnQrHWSGia3nmT0OJtZZwXADZtE4ycUnud2BlzP5uUTDs09r1VXoIckEH/lisacyjF4 dn/Y7kvD+o6Ot7WXbQp5Eu5lGKBBeeOsjd8cmn6I6xkVZxH1e9VdYLuIkhBK9QJzcsHg9KD4Pihih vzA8JbhfOyRUUKImDNQ/AlYpWLATSPz2V2fzORirtVc0cmILE/ehGXh6HbS4WWtDyn4QrMu2YtcXV 9LEaKS9AKnLGIj/eTYFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r1bsW-009j8O-34; Sat, 11 Nov 2023 00:29:36 +0000 Received: from mail-qv1-xf30.google.com ([2607:f8b0:4864:20::f30]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r1bsT-009j7e-1w for linux-arm-kernel@lists.infradead.org; Sat, 11 Nov 2023 00:29:35 +0000 Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-66d24ccc6f2so31609256d6.0 for ; Fri, 10 Nov 2023 16:29:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699662571; x=1700267371; 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=M3FqWqpMvGy3I/j1a0yonrCNkExrkTlpaTzYW4XHQH8=; b=CnLgG6MKKUej/qbviPZOTPs3WqdWW2BabrwH17hf0XSbJfqwVDf+cHyGlmQ+Z25w/V IZF5XQOXUqlP/AWZo/cH1wT6C2KZb3NErYa1wBb//J31YwqCDHtT9X7CCBLczX/GSXFB pw1646ecf6Vi2R8StUqzgRk8mAgENJ9cIwj/I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699662571; x=1700267371; 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=M3FqWqpMvGy3I/j1a0yonrCNkExrkTlpaTzYW4XHQH8=; b=EZCsBdFFPjEzT8du7oZkyhF5MMzuVplXoOeqHJAsIEUfB4ALLumzAHuWxmfcHs1aiu j8ok6fGg2efIoTTwZqmRahOvMSvtoCefxp/Jz9qNIoDLbfzHFE6HeH5JnhN7/lpaqn9C rlYsBCR8wvna2hR98uPTAMlIVRp1rdj/RBFXCfp2AFBbS0C79a0HVGZMEu/qvUt4nPBd F7uY1dr6rwl9KJEJ8SWsXCmeQaEG/dWBpqgCDURS1W8Tf6C/H9W24q3N7QeWgCro1Yb1 74ktGIO6+lMBTqCbq0l5bKg7YYiY4aI3t5wzINtjDKxxmlrw48fB4CmPTzb2R6FoxqTf kp1g== X-Gm-Message-State: AOJu0YzJ3EWm33llxcWkzRTSEjNKTuYYkiV2+0aO5QVLA3SF5Qqp2aUz 4rtpNwutbr9IVdvmpskLI6cv7yi85/lQAQgVsdSwNQ== X-Google-Smtp-Source: AGHT+IFKxCzqkIhj/4+puQidciJwVE6cx36K5j318gXTxCtNqzPsItFD1CVurLoJ+T7KVdksSn3fvA== X-Received: by 2002:a05:6214:125:b0:66c:fa89:a894 with SMTP id w5-20020a056214012500b0066cfa89a894mr5337035qvs.10.1699662571162; Fri, 10 Nov 2023 16:29:31 -0800 (PST) Received: from kea.bld.corp.google.com ([2620:15c:183:200:5104:5a27:f95d:21d1]) by smtp.gmail.com with ESMTPSA id l16-20020a056214029000b00677adcfd261sm55898qvv.89.2023.11.10.16.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 16:29:30 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: lkml , Tom Rini , Masahiro Yamada , U-Boot Mailing List , Simon Glass , Catalin Marinas , Nathan Chancellor , Nick Desaulniers , Nick Terrell , Nicolas Schier , Will Deacon , linux-kbuild@vger.kernel.org Subject: [PATCH v5 0/3] arm64: Add a build target for Flat Image Tree Date: Fri, 10 Nov 2023 17:27:59 -0700 Message-ID: <20231111002851.1293891-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-20231110_162933_682038_B46E8F0C X-CRM114-Status: GOOD ( 17.90 ) 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 v5: - Correct compression rule which was broken in v4 Changes in v4: - Add a patch to move the single quotes for image name - 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 (3): kbuild: arm64: Add BOOT_TARGETS variable arm: boot: Move the single quotes for image name 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 | 17 ++- scripts/make_fit.py | 289 +++++++++++++++++++++++++++++++++++++ 6 files changed, 323 insertions(+), 4 deletions(-) create mode 100755 scripts/make_fit.py