From patchwork Tue Nov 7 14:48:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13448916 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 0B389C4332F for ; Tue, 7 Nov 2023 14:49:56 +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=/PO9s8PjtuNzjv3hetDNyl3kO8PSoC48BcQvMeKYiPo=; b=plDs5EfGJzF6iO qr0ro9IWExmKzAMKBkYkdrd81iB7sdIkcAtEd/AEz+vHNw1wAWcSRhby2AXXthOSM1E/93uFzp3Pl nsvNyxpGiqDwXSVt4pu1TOlC6Mm0y4NPg5z1pMrKb1r/jcKZOOOrOsQ1diopxng5ltSJQpixsp84i dFaU462tmqxxG5y6hePlAsc+n9W2RXimLpyC5eVdvl5XTUqiK9HFeSxsJY1itfmBXIvgHcsX6j4VV 9ATLZL7XohlGJQgPQOSz7+yw7qL+yF1nwjl98zClAguYpzRrTb3mZRrHDnDo4MXbFHzWC2PYd69cp UeuJDo32p08gLIahpG5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0NOS-001l24-0S; Tue, 07 Nov 2023 14:49:28 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0NOO-001l0r-3A for linux-arm-kernel@lists.infradead.org; Tue, 07 Nov 2023 14:49:26 +0000 Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7ad501cb1f9so90665239f.0 for ; Tue, 07 Nov 2023 06:49:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1699368563; x=1699973363; 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=mGdhwZC1aoWv4hm325gNK3bTc4NhbyLb0VzfJImw0Uw=; b=gJJ1Jz4DThjxcCmWl+0rK5rrGJ5u5ZZQ3s5TgjPf7Jseh2MBXfxJliLtd05rAAusjj oEGTmgGvst17154p8iwsMmBUuXk4Tch2BSMf/kUD7WsgiT29Vs4c0RVZ9+GsQOfZKtb+ hBzzRpLjKkuFoWzjbbzdhFmfRpQfYr+CJo/1g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699368563; x=1699973363; 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=mGdhwZC1aoWv4hm325gNK3bTc4NhbyLb0VzfJImw0Uw=; b=v+4kvZKftYM7AMn5URQ1vxQMM9McnLcnHvhk15evf6Qph0AzfmwJHFodfPogo4KhVJ Rs9eZepGm8bq8LD7LaUfB0S5QV+twMmL9lLXm2C5DMcxQ/PZ9VgQlZtVVPQa7CPFrphT +hOLB/3DLb0h+WiRlWVWBH4LlQ5AfB2ZJMDrguaEincFUyBovvWt1nu7Q+bYWRmp+Zod 2Zu908vrCnbkxnwy4eJYMmHRK/EU07E3Aerjf0W6Aob5bg55AuuS1BrErT6PRJQXClVq uTCk4sVeZrBur5/9Oix2YiMzj2UFHHb/Im7sqVFWwCO2snmt4/z0vtcjLiKocWZma/FR PDtg== X-Gm-Message-State: AOJu0Yz/PFE54Etpuk7lhHaXrahKH84lwiVk4yH3B4biqRqSA66oFRRl 1WIOrwFeQ8TQfw+QZqSPIZm2ZmY9oCZ/rwSS/W0bQg== X-Google-Smtp-Source: AGHT+IFbWYxmCVLOPBkIKdca7xRPNMPu+WV7uYSe3XtBCvnGL0pLnyu5kmk3VGVXfipxrEiR5YJiqQ== X-Received: by 2002:a05:6602:29cf:b0:7a9:509c:961 with SMTP id z15-20020a05660229cf00b007a9509c0961mr36574184ioq.13.1699368562862; Tue, 07 Nov 2023 06:49:22 -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 b16-20020a05663801b000b0045a66a26208sm2815200jaq.128.2023.11.07.06.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 06:49:22 -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 v4 0/3] arm64: Add a build target for Flat Image Tree Date: Tue, 7 Nov 2023 07:48:48 -0700 Message-ID: <20231107144917.48304-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_064925_022314_9736FA70 X-CRM114-Status: GOOD ( 18.54 ) 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 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 | 20 ++- scripts/make_fit.py | 289 +++++++++++++++++++++++++++++++++++++ 6 files changed, 326 insertions(+), 4 deletions(-) create mode 100755 scripts/make_fit.py