From nobody Tue Dec 2 02:30:07 2025 Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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 C76EB30C601 for ; Wed, 19 Nov 2025 18:14:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763576051; cv=none; b=FktDv+QRV4pScO5EZsxT4dYfCNKlqCQ9uDX2lLcm2I+uDnwFkZrHceux8CtKrLGyffy0Dmy0maBrKZ+JeqPp07Mrey0WvUGD5pURoFXUwS0FoMUQ1pnBMVTPSefOKoYw/USJzvoIgfn+T6/bLjpkvV53/8yAxhPBJCgHGOuLsQg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763576051; c=relaxed/simple; bh=WxmuUnG9mgIBxKipIANrDQZ0nIjxvThuVKA/zPa2iQ4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=akpK6OoLe7d7Km/B++IKByObEKZ23qbuio//dt7EeSUFlQYIXNUGg73BvlTU6WLh8k74BqqF5Npt5ZaRKB8w92Xhkjvy5F0WAX6V4nVVIPkRvci2HCqrfbBGrO9r+1qmY/ZpR803lnBPs9Wz6IXD9k4g74xO/Dwsx/94WYnsYuw= 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=lD2aUj95; arc=none smtp.client-ip=209.85.166.41 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="lD2aUj95" Received: by mail-io1-f41.google.com with SMTP id ca18e2360f4ac-948f8fa9451so137070839f.3 for ; Wed, 19 Nov 2025 10:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1763576043; x=1764180843; 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=lD2aUj95/Ik+uiY44n0boB1hFIZHU2AO77fpKDbuLUqXQX79MhuuTsptZyuC8u2AoB 18K1laa8DbARtdFqjAUHkJiAQJ2aE0CkcawNWl/5WVq4qURgPNN05wtxLCES4I+AljJA pSRv70ovy4r8HaXMzSj2zNng9O5zrAi2tn3x0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763576043; x=1764180843; 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=OtQ8oHUfA+iRwmmFEv8RRoaD1i4Tse9hxW+nxX0qFuy3NGm1bIcEpfd8rKUUbKksb4 4PBHOt0zdO+K99X6+hGlwqa05Asz8BRKR0Q7czY9pQTd36BtcvHZt4meCAQSlwcJi9o1 3O5/P0x8ImmV2+6PnG9ogJpO9CFyjewmATBpSFDH7STiF5jOqdjIuqWskkA4P5m967sB z8PH1TA1zNXx4ZJL/OpgphN1FatlhFs+5YiultACMbtcHJHM8npDlodn0Ee3dNTfji1U gy+/pJLIsVGf21tyZGonBBp6ek0J9lnArENGyuOg7crKGrOlTtCD5iKgKO235IqhN4jT NZXQ== X-Forwarded-Encrypted: i=1; AJvYcCVrUDddXTEGjssKHjVD8+bx0DkYjLI3177bq1RhEXA3qMM9qDf0lc1LpTV+g+erW98Q+J5FczC8SnnhKVc=@vger.kernel.org X-Gm-Message-State: AOJu0Yyp1RSx2QU3JdFbzDSRaIAfuoO37Dn0/eGYzQ/UTsg2heCL20kd YLa/edtWpvTOy6bqbVcPDERMlwbPFJmQDVG5QywPy6EdIMw4uNG2tkJmIfqTPsncTg== X-Gm-Gg: ASbGncuxJigAqHPo9BYvgOWrhbbA8eeb0Ohy4mFRqo+awNO2spk8N+qyltcF0c9P5ZN SJCF1dV8MwArG19kXiEUB1SdTS22ZymNVzJugPonryk9oLQ/fqhhwVpGXZQcX1IrgkXJnhIYqp+ 0b54mc1As7jZgstNarjdnTAfOH+Lg7vUeGvJ7V6StIcCRUXTjSx/oDVr7eIspefIWyDQYsDE4Ra CROxnIAnM3nAOTCs7QEitq5ZbsDewVwykFX46W0kSA/uqpgY+97hOrgtqY8PK2WeqsUfIRQRBeb 3nixy5OY2mSNp44kn5fh1K1tgnV71HhwQFExEpev1E2fI3XgSpYs9q2ri3M3LPXncA7YYvd9KBl SzAMyxWszyJQo+6E5d3khmCA5dX7GVvartOqESSNzOWDJ43np8/Dwuqu+IGNUsPwtYBqD2rgGZR Mo5X8TazxrWEiZovw= X-Google-Smtp-Source: AGHT+IH6yIX6WHieDPQzbEo8QY+iE45HF4Ibs2aq1PWlH9l6naUWz/+RgOAJxj/Z0iBtnKJ4hNu+AQ== X-Received: by 2002:a05:6602:640e:b0:948:707f:1421 with SMTP id ca18e2360f4ac-9492b6b66bfmr387613439f.15.1763576043003; Wed, 19 Nov 2025 10:14:03 -0800 (PST) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-949385ae254sm4838639f.1.2025.11.19.10.14.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 10:14:01 -0800 (PST) From: Simon Glass To: linux-arm-kernel@lists.infradead.org Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Masahiro Yamada , Tom Rini , Ahmad Fatoum , =?UTF-8?q?J=20=2E=20Neusch=C3=A4fer?= , Nicolas Schier , Chen-Yu Tsai , Simon Glass , Nicolas Schier , linux-kernel@vger.kernel.org Subject: [PATCH v6 1/8] scripts/make_fit: Speed up operation Date: Wed, 19 Nov 2025 11:13:22 -0700 Message-ID: <20251119181333.991099-2-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251119181333.991099-1-sjg@chromium.org> References: <20251119181333.991099-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 --- (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