From nobody Sun Feb 8 05:53:27 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 817D71BC9E6 for ; Tue, 24 Dec 2024 12:43:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735044180; cv=none; b=rSwEe3fqrO0ueD+ax1SrMo7MVKkRoC63EgKbU2QCFNa42lUX5CYKewR0D/9q5eZfvwMSV/Hzpie5D/gPC9Br/6nvgjZw8QByQzatYt/527HbdH7Uq7F+U0HvG84IwBMfqI3gBiIRUvYakPghm6ymqCvkcL07EUPWwCtiGKPERFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735044180; c=relaxed/simple; bh=eCOLbrEQl6Q8PofZ6oAAOmyrOHt5RHJBqFDV24Mwud4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=TO6hUcOnwnHAom3P55ix4RMT1TdvVE6LJH2YfyFGDEclk6+iWGXnscClaBG+cBhphWuwuokEO7gVWhv7FfPa4VFt7CQIEdNFhcHr6qY1jPzdW0MFU6T62OpEgK1L+ZIz38NwK2divun3Qod70T0+sZDQyxKbWX7xJQMqYQcf7LU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O+ExvHZO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O+ExvHZO" Received: by smtp.kernel.org (Postfix) with ESMTPS id 09A58C4CED0; Tue, 24 Dec 2024 12:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1735044180; bh=eCOLbrEQl6Q8PofZ6oAAOmyrOHt5RHJBqFDV24Mwud4=; h=From:Date:Subject:To:Cc:Reply-To:From; b=O+ExvHZOdrFYPMSsMhUwU2SqPWvwHf8vBfEv2p0bkT3aMtPrjMDUZn1AjJ/iS2wBn aEGmwKkY0h3nO2uomsaEMYWGUn2S0jt86RAPZ6r4QXrVeYsUZ61gnt13OCE0BajzDR O9G1pqv9OoVLnstW+0wmpHJ5DXhT+rvfkg1xyFVui6ygVuGb57BcyUMKq2+S6v7fcU PT1D3ecqKSEQ9ywSuxqvPsu3TmJRtx7Y08QtihOVh8ASBsa+RC6OJ3za9glKbEcCDo uZ77B0j3zAsHUj74HhzL9v4UeHt+qmDBdry9esFMfPzDf91lFSZAoAfyxntZcTHe+2 Qn7tAGmZRLPGg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3441E77188; Tue, 24 Dec 2024 12:42:59 +0000 (UTC) From: =?utf-8?q?J=2E_Neusch=C3=A4fer_via_B4_Relay?= Date: Tue, 24 Dec 2024 13:42:37 +0100 Subject: [PATCH] scripts/make_fit: Print DT name before libfdt errors Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241224-makefit-v1-1-feeccef137ee@posteo.net> X-B4-Tracking: v=1; b=H4sIADysamcC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxNDIyMT3dzE7NS0zBJdY8M0cwvLJMvUVJM0JaDqgiKgcAXYpOjY2loA/1A rUlkAAAA= X-Change-ID: 20241224-makefit-31f789b9ee4f To: Simon Glass Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1735044177; l=2504; i=j.ne@posteo.net; s=20240329; h=from:subject:message-id; bh=qNYHUnAZnyBHAWNkYsjAlxvZcMVlVw3UbvcsQUL+fy8=; b=9cH15+82rUPew5FWYHisRJZ1579YkP0KJq670oUqZwkqMpTzQQZuQusGEXLCKZFJwse0LY8dZ hkbIfmJtBr/CsITqhiVUYuXQ0IpgidL4z/7RTB2Pxlpmhz0qmFvof0P X-Developer-Key: i=j.ne@posteo.net; a=ed25519; pk=NIe0bK42wNaX/C4bi6ezm7NJK0IQE+8MKBm7igFMIS4= X-Endpoint-Received: by B4 Relay for j.ne@posteo.net/20240329 with auth_id=156 X-Original-From: =?utf-8?q?J=2E_Neusch=C3=A4fer?= Reply-To: j.ne@posteo.net From: "J. Neusch=C3=A4fer" This makes it easier to pinpoint where the error happened. For example: FIT arch/powerpc/boot/image.fit Error processing arch/powerpc/boot/dts/microwatt.dtb: Traceback (most recent call last): File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py",= line 335, in sys.exit(run_make_fit()) ^^^^^^^^^^^^^^ File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py",= line 309, in run_make_fit out_data, count, size =3D build_fit(args) ^^^^^^^^^^^^^^^ File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py",= line 286, in build_fit raise e File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py",= line 283, in build_fit (model, compat, files) =3D process_dtb(fname, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/jn/dev/linux/linux-git/build-mpc83xx/../scripts/make_fit.py",= line 231, in process_dtb model =3D fdt.getprop(0, 'model').as_str() ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/libfdt.py", line 448, in getprop pdata =3D check_err_null(fdt_getprop(self._fdt, nodeoffset, prop_name), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/libfdt.py", line 153, in check_err_n= ull raise FdtException(val) libfdt.FdtException: pylibfdt error -1: FDT_ERR_NOTFOUND Signed-off-by: J. Neusch=C3=A4fer --- The example is from a different series which I will release soon, which enables FIT on powerpc. --- scripts/make_fit.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/make_fit.py b/scripts/make_fit.py index 4a1bb2f55861adfce07959528e175260bc503593..1683e5ec6e6754dff3383dfec89= df78b9c2fa896 100755 --- a/scripts/make_fit.py +++ b/scripts/make_fit.py @@ -279,7 +279,11 @@ def build_fit(args): if os.path.splitext(fname)[1] !=3D '.dtb': continue =20 - (model, compat, files) =3D process_dtb(fname, args) + try: + (model, compat, files) =3D process_dtb(fname, args) + except Exception as e: + sys.stderr.write(f"Error processing {fname}:\n") + raise e =20 for fn in files: if fn not in fdts: --- base-commit: 4bbf9020becbfd8fc2c3da790855b7042fad455b change-id: 20241224-makefit-31f789b9ee4f Best regards, --=20 J. Neusch=C3=A4fer