Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp1701889rdb; Sun, 19 Nov 2023 07:03:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHptmem/SGOJ/mXu0mcCWahBhLahNVlk+J+kMsAZUaxFg+eMPQk4J4GjPzrwgaL16F5vE4z X-Received: by 2002:a05:6871:33a5:b0:1d6:4b84:c7ed with SMTP id ng37-20020a05687133a500b001d64b84c7edmr5547653oac.23.1700406196920; Sun, 19 Nov 2023 07:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700406196; cv=none; d=google.com; s=arc-20160816; b=vKe/dws5IfCTHQKk+3/Y7+kjGlfaELukzOmC+keVNjoGEGvvtDE8O+JPKRCeQPFDmM iExNyToKoavYkg+xxEtLausM5xJy//OZwNKg6FWadCxbd+fxBiSI2t4nlwue+Y4JU49N cdBaoNHrJBqiVgb+obiM3L+szELBA7gK05HqL1q213JHUGinOPyhIifsuVYE0a9IYq23 SDJ8F84bQgAhjD7I1pOFej9uuqSNBhEKWgUCtTvTzH7M3udmQdvUG3Dx64ES7tMQBQjM dBJgv9CtjZsF36SdxpS6srs5C/D0SV50PkJti2H5aMC1QbRljW8rEnhy0FvwHDWFu6jK kyGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=N51tl/zj6hx3y8C/i7pvWONxuVI4d2CkVjaNAa9KVfw=; fh=YQikNudVzmYXrMB39s06Lqfy92WQR80MxG1JQiZOKl8=; b=PrlEhMZMmk38j8uLMKzrvk/hobOOxJT+vZdk1sJoQ1/wokszEGd5yZmbKuM/6fANHU TU2hm1IPFenF08cKTx7FLHUrZhQqJhzzfDuiEuxomW7KE6xO3wgw95Na2MeKVabV+NyZ KmfIwPSwk7nt2qmXK8KOnlh9ZDOAx0m4XS1Xn8inZ8fJe3TyIaKuIih0rldU8k4O330V nDnNbyAhuH+wKNimvVXGzYZdqr7Zy8vTJf/wkLtCW2C9RopFEtZsSvv4axwkmrIMi5ip 4kBihNqg/RCVq8tJ1Cr8+kaoUybU+OkBnwGz0FLg16ljMOdOVROEOnLjsHVknkXibiFH LJ0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KEzJhvN0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id qc14-20020a056871e7ce00b001e99121728esi2325700oac.44.2023.11.19.07.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 07:03:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KEzJhvN0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 535C98094D4B; Sun, 19 Nov 2023 07:03:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230027AbjKSPCi (ORCPT + 99 others); Sun, 19 Nov 2023 10:02:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjKSPCh (ORCPT ); Sun, 19 Nov 2023 10:02:37 -0500 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03635E1 for ; Sun, 19 Nov 2023 07:02:34 -0800 (PST) Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-7a6889f33b9so131702239f.0 for ; Sun, 19 Nov 2023 07:02:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1700406153; x=1701010953; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=N51tl/zj6hx3y8C/i7pvWONxuVI4d2CkVjaNAa9KVfw=; b=KEzJhvN0vrEgKamwqdG9mDVInm4xSfTFPMFqyjZgwOisiumSyX8gix15ChoNUpIZJw DrtSJvpIScPxlikJbrLrSF8lipP4Tk5UXy7EwYvAZi4RDHiy8dAE90jxnZdK7HM1i9C8 ydth7g3Joi5uMnmY81yhw8cIugvWy1p2GBjp8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700406153; x=1701010953; 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=N51tl/zj6hx3y8C/i7pvWONxuVI4d2CkVjaNAa9KVfw=; b=UyBYybvpaQlZn5veJwzAum2RvYktQ5LAYjc3R2MhxjYZK34IrMAQd0NwNZF3BPvLK7 lSV5BIC+r46HiKA5xmzxX2l5a8qYs5Xvgk1MqnXlqGopsYiuYvOdVedML8e9UJljKK4O UUnznV148MfYtSk47K6X5KRTZTTVysANiImHyGviKBVqwuuv/p9VzoG7Y80MUHJs4Q4E hTEWJHYJnN+GFq1IjvPYRzUJIKdG2WjD6DabBf6LdderEaHnj0Gdt8Lrk+D1jiFT3XE6 KM1FhsUquggFzd71syb11WX1cYCz8TQ0xIotGwr8hVbqN0cWTcMSWtljXw5kL8PdP1B+ ZJnA== X-Gm-Message-State: AOJu0Yw2iTRUfn+4w35NMsyRBi7FjBZ5WA+uPqCx+OjJJSjPrQsH3CTj lBTmpbmA8IvKq5z7dCV3A4d6k8fbh3kQyqjRyQJEhQ== X-Received: by 2002:a6b:c505:0:b0:7b0:aee5:f9c2 with SMTP id v5-20020a6bc505000000b007b0aee5f9c2mr3285969iof.14.1700406153095; Sun, 19 Nov 2023 07:02:33 -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 w24-20020a056638379800b004665bec29d1sm79923jal.128.2023.11.19.07.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 07:02:32 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: U-Boot Mailing List , Masahiro Yamada , Tom Rini , 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 v6 0/2] arm64: Add a build target for Flat Image Tree Date: Sun, 19 Nov 2023 08:01:13 -0700 Message-ID: <20231119150229.634424-1-sjg@chromium.org> X-Mailer: git-send-email 2.43.0.rc0.421.g78406f8d94-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sun, 19 Nov 2023 07:03:03 -0800 (PST) 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 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): 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 | 13 ++ scripts/make_fit.py | 289 +++++++++++++++++++++++++++++++++++++ 6 files changed, 321 insertions(+), 2 deletions(-) create mode 100755 scripts/make_fit.py -- 2.43.0.rc0.421.g78406f8d94-goog