From nobody Thu Dec 18 10:32:51 2025 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (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 A78142D12E7 for ; Thu, 11 Dec 2025 14:03:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765461824; cv=none; b=PGpuyF6R6GqMJABwhmMTNcsaiZAijodQ/WdgEA8oHCDU9F/X1tJW5vEyb/TLRSG4njdRIfNH9fcxHk2IdqS87bd1EnToLFp9UK2riXMy41zoP+1SO+IWn94FGV8GZlClOJEJ2sd624b0GJjRiQ3VVcJuDXH55hDa+wSEyuY+gvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765461824; c=relaxed/simple; bh=dANt1IxVBpejBPX1GyE+hxJwTnKsLrEyXQVIM/d+pnQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LCePz+Zsv5uFT9vghUV6ZFLZ3DOsw090mc4lF+L5FZmWc6z/LI+9ZcfgiTU9BVIgS8YwUpJg3ohvXRzqkvCDhe6WlDN44gJ3dgSiWqq0yZQZyFNnYcjnee1mxl+LBPnWFL/qul8x49P+erlyoGAFEgLCZ3c1sH6wPyRJgzCDiVA= 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=GEW9Vq9g; arc=none smtp.client-ip=209.85.167.182 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="GEW9Vq9g" Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-44fe903c1d6so31992b6e.0 for ; Thu, 11 Dec 2025 06:03:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1765461822; x=1766066622; 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=CLsfEOgWDExJ3WhLf4sg7dIsOWS7vuQUYkgDX6My13A=; b=GEW9Vq9gY4K2UcYxbwo2JfLFy/bCYafMvxJVmj9vuIsSIDaI99oD/wt12XJ+nH5SOK Cnmo/SzyEzYEmbhLH5A6sY+qeb3Y4VVtFXBrLh0VviS2siUlxfuejaBtyxv9Qv2YWmZT RftBdh/Kh269aJUY8ppWzcK5obOc8bTh6SxdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765461822; x=1766066622; 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=CLsfEOgWDExJ3WhLf4sg7dIsOWS7vuQUYkgDX6My13A=; b=gekPisgqE3cntJ+mZek+1hmn/Tu2RyMdNhxbqJQeSipiV7lL7Jom4unjJ74q6ExeZ8 K0PDE0qW58k3zOHeuC/8TU/5skvD/LXKZTZhiOah5G1qTvM0yDgtufkPMeKOOydwam2H D27Hjwz1EzPQgC2CVZQwu+Dhq34I1fsD6tEgUFG+ngKqdS1jx1CQR0T7X+zdgVjvVqJ5 Cz5nYuR+zX1J18sqa+mcddwDPxFNZOrjYFWQ47osacZPii631KtEIxlqrdupfZvQIZkg EIcg0n2vaLHwgBdg74pKbmA2nrYSq2SBa2uhRmD5m/ZfF3+kZCq+SXT2/XZ2t7qQdIIk CCIQ== X-Forwarded-Encrypted: i=1; AJvYcCVfIMONq3G5nnroyZcQVgsOM70ofeyWszc0H2qaECbnB4lhecpwPjWo2OUqg415Iq+x9pAkGi5IcP3tuRQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwgQvli4R+IERAZSjr5YmFJT2rpHs6lZE5QRQ6QlKaYsDx7NITf +fVu+xrj6alI1hFO0064qx2WR6Ct7YBkGqSE/l9/avwgTm64tNCt8bOAcFJLL5FSYg== X-Gm-Gg: AY/fxX6+zMwGzSRieFJGYZqRU93FMCmKaBcdKXAwaTAmms+7N/hc7c9ACHFD6oleKIF 0RrDPoDfz5bcMGqZWBrbuOFWqsAwOgJjkqxXQ4fhBjAyFfpaQxdhyWTFZb6b9GeKYtjFsyaVWt9 V3sb2NEnx/tAu+g7N+F7zeJDbqX8Af8KkwnKS1T040n8/cZNUZuXnSuQ8+pH4yVc0KKL2YxBab8 fBisc5PCa/CG7tXE8fdCtWYmmU0xt6dfURumMcPEWBOICN2DHwIg0ZGley2SKPZxSpCFvMoI6iA 5D6s12bAlckl39OwFuw85h21FJz1Z5j7LuhmDkd1r70lt8l1ZDGswlB2PVMpePHIUcR3TI4yWKo dwlRaAzC01T6Vf+iBQfE+y6JWwyaibkj8mpx2BI6i+ihOnSrgb+xqRAPhhKObRB09V9e/yJIdZl HzaFkiVv9LFRpduZ4= X-Google-Smtp-Source: AGHT+IEa1BeEGmi4St54QeGtSB8Z4r5rsDPCPbjRjNJyjfsp44pJXGn7gep4nq/PLQSPhCGdL61Z+w== X-Received: by 2002:a05:6808:1710:b0:450:b781:3731 with SMTP id 5614622812f47-455863b7c8emr3319159b6e.26.1765461821361; Thu, 11 Dec 2025 06:03:41 -0800 (PST) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id 5614622812f47-45598d6e789sm1130030b6e.22.2025.12.11.06.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Dec 2025 06:03:40 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: Nicolas Schier , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , =?UTF-8?q?J=20=2E=20Neusch=C3=A4fer?= , Masahiro Yamada , Tom Rini , Ahmad Fatoum , Chen-Yu Tsai , Simon Glass , Nicolas Schier , linux-kernel@vger.kernel.org Subject: [PATCH v7 1/6] scripts/make_fit: Speed up operation Date: Thu, 11 Dec 2025 07:02:58 -0700 Message-ID: <20251211140309.1910613-2-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251211140309.1910613-1-sjg@chromium.org> References: <20251211140309.1910613-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 Reviewed-by: Ahmad Fatoum Tested-by: Chen-Yu Tsai --- (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