From nobody Mon Feb 9 12:24:54 2026 Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE968326939 for ; Fri, 14 Nov 2025 14:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763130485; cv=none; b=U0MiLzJV18w4uvNDBesZ95f5HngiVoWt8hOF4p0vFEyLLNdimr/lOQjCS6Mr4Vdh/YNNFzMb8ux27gkj9BoUuVqbMankP4xKlzgNRW+RQnpcJMnA/9O/mydcvdLmYxh1AIp4yVZD7U13T9GwUmypybhE/quaK/8qstZvADIh2X0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763130485; c=relaxed/simple; bh=WxmuUnG9mgIBxKipIANrDQZ0nIjxvThuVKA/zPa2iQ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ACvRTKf206LFCzIAg1wuF6IGC0Cs3d/9rmb2zeoObLDsR+LvzBhzEkugS49wv5eTaKu8ZbzxsIYA0XNH/LqLjPrPv2Np+qz/xwcemvExtrKh9NJ4asLPVexe6F2N6zHS185viSavrb7wkNsOusA5werxsTE6a0KB2lRE3NeB1KM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=QVRdIOkV; arc=none smtp.client-ip=209.85.166.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="QVRdIOkV" Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-948a50b8ea6so142657439f.1 for ; Fri, 14 Nov 2025 06:28:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1763130483; x=1763735283; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VOwDYlRH5DhNzOzjWWbwzUOQiOeiolgsqjgpBqGQ14g=; b=QVRdIOkVLQSxIoEqHfBv3mF2pRLlruNqQ/tUeJ9cPJLWohTVCZPT3Pj0yXk4rdyclO LN5X3q2c9MKyAkdjTiq2k2FA7Uw1DrgeV9Owb/dh109kznCpGTsjwVITxmLFYiZFi8pP /jkKvZkf+gvyMBQF94ebfHCRX5NBrfMoZqRfc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763130483; x=1763735283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VOwDYlRH5DhNzOzjWWbwzUOQiOeiolgsqjgpBqGQ14g=; b=PvxVapTskuK5hfVe0PfUE2fgGx42xOTBqDowSQaGUuI9169icRW4QrqQ4P16zhdQdY DD9dCKwGiPGeLbQ/uKf5D+2XSJPI0/a2ABoPWPrWHlUc7Bbtl6nHXBNztDEU+ocp3Xio U/NQZ76G23UvJbpGmUDlobHsaEdpf2472GBl3I1nC+ayqQIsnRCEVdOqYQhW77hZpSrI AEpxNh4WsVDhi59W2YWKGae/Gliwlon0E7XlKCCkiWC7DoQTpr/c/ZsdE+oL7d/5TUHK oVWbgKDZa1QzdJTDL3i/RHgN4L0ZS4iN4PEkFJoLjl4hyQ1CVQMHB6Vzl/dPdWfqWK2K 7Isg== X-Forwarded-Encrypted: i=1; AJvYcCVMeX7OgsJUi6F8oQwAVCTzWE4FsKITjZ19n1arOAoUAmhjAmtb3jvIY0p7ERsCYGX2EWtGieUGRKpHsUo=@vger.kernel.org X-Gm-Message-State: AOJu0Yx4YwBTw4ABCn6QNCDfk6q31oPty2q/ILFO3LYALcA9HV3v2qsT M12eUw2/V4CQwhIMByFNtqaisB69LQghKuTLhx3nkrbFQoS7Qdcy7DU7SJk4k0XhxA== X-Gm-Gg: ASbGnctsk/wf3ntV5kFMIhzqJ3IUb+Q43UoWhEbUyCePF6NLWXo3NYkDJgCW2oR36m/ Brmv3kgXBDuD/QYUp5FcoaP0lwx67VCDsQ0p59rGsW3OtaeMQkt8V9+aet8A3d71n0xgLpnFJcH XCBKhb78VjkNkSZn1bnkH4N6n1yeJRSte9ZZm8VVm4OAlFj5H0SGfid2kLWxHTNTXRLuEQohNJk mal/LfOiQoK1XP7rAsg6A4g9S2nYlKSrrW11+nyNvlMSoUx9Ws8gZ1+qLNKODEEyNwyASI4eExz D14vlVaueSe5UCWdXBs9YrKiGrowALMOQcHXDsbPeSHGJPw3kb4rp51BDxhBTBeIfiQE3JisXxZ SmJ5q988vsv37qQgzPjCmCSod7MKxaC0KWEYiS3VjWWySGE9OhDJ1SzFPNiihizDWF9VrzWa4r1 moC1n6H+Xq8YiBWyE= X-Google-Smtp-Source: AGHT+IHKQCuiUr5zChKS0MHb/W5O2DKQjIJyTMquCSOnoatcp/1EvxDxrceULeEYGZCSDbMoVvwx8A== X-Received: by 2002:a05:6e02:1a4c:b0:434:7caa:8947 with SMTP id e9e14a558f8ab-4348c949d5bmr50346505ab.28.1763130483086; Fri, 14 Nov 2025 06:28:03 -0800 (PST) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-434839cdb10sm27500205ab.32.2025.11.14.06.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 06:28:02 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: Nicolas Schier , Masahiro Yamada , Chen-Yu Tsai , Tom Rini , Ahmad Fatoum , =?UTF-8?q?J=20=2E=20Neusch=C3=A4fer?= , Simon Glass , Nicolas Schier , linux-kernel@vger.kernel.org Subject: [PATCH v5 1/8] scripts/make_fit: Speed up operation Date: Fri, 14 Nov 2025 07:27:27 -0700 Message-ID: <20251114142741.1919072-2-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251114142741.1919072-1-sjg@chromium.org> References: <20251114142741.1919072-1-sjg@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The kernel is likely at least 16MB so we may as well use that as a step size when reallocating space for the FIT in memory. Pack the FIT at the end, so there is no wasted space. This reduces the time to pack by an order of magnitude, or so. Signed-off-by: Simon Glass Reviewed-by: Nicolas Schier --- (no changes since v3) Changes in v3: - Move the ramdisk chunk into the correct patch scripts/make_fit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/make_fit.py b/scripts/make_fit.py index 1683e5ec6e67..0f5e7c4b8aed 100755 --- a/scripts/make_fit.py +++ b/scripts/make_fit.py @@ -98,7 +98,7 @@ def setup_fit(fsw, name): fsw (libfdt.FdtSw): Object to use for writing name (str): Name of kernel image """ - fsw.INC_SIZE =3D 65536 + fsw.INC_SIZE =3D 16 << 20 fsw.finish_reservemap() fsw.begin_node('') fsw.property_string('description', f'{name} with devicetree set') @@ -299,7 +299,9 @@ def build_fit(args): finish_fit(fsw, entries) =20 # Include the kernel itself in the returned file count - return fsw.as_fdt().as_bytearray(), seq + 1, size + fdt =3D fsw.as_fdt() + fdt.pack() + return fdt.as_bytearray(), seq + 1, size =20 =20 def run_make_fit(): --=20 2.43.0