[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ImageBuilder][PATCH] uboot-script-gen: add debug option to print final dt "chosen" node


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Mon, 17 Mar 2025 13:16:06 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qfI1fp9pZIPfQSq8BsdXPAntvA4TYc/mID6Sigz3ifY=; b=jrJtt3tosaTCeFnOiyvm+r4ujRyzZdHPHTsEudadDkpxmpg/wKA8g1m0UzB9ZrRPi6s0ZneJQwJIN1zr4HVZ1CwJo8YtWbVUvKyWB4Cqya0h8y5AGx9NiyAZ8g6yWjo0UZsXOdlv1QIx3D2lzXeUgNzP/4RSAgxorK0i8lcTiHZSgtIIpeo/DEXDQJaRRVZvt1G1BRdeRhWuh76N5c1v6zz2UHzqpN59m1qYCQMu4bSDIQX82xp2E0Pg6Gqp4/pE/zBQu5jmil72mHCC13e/ODWHwLyC8vAT1S24zIBG5uJElXR1jOkl1/uXIjjgnXVJMqhriRbLQt6qH0JbvXF1sw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qi4BuVgRYmt/ZgHPOgR2hBJ2KR5tvaICZaCAdH1yebJadxZhM7pxSZWyNieRjMQOHlwugbPTkOnrPi32byrnu+HMH74CDXd7LNTE+SCLDXwY2N3wEkN9ppPNJ0m16h39PqgBginbWkY1v9z2TNl+1hh276uuiBkrGeR91B7rTvC36TjpiDgoNt7tVu3+zjk4GW3z4+mupu8B5YmQ4k4lmELu86UVtENXobzrbFvF/E/3vRbyfnGd6HJKEtPZeLxK8eNVDTI1IDgx9R4NSlLqOy27lyRrJYCt/G2mSw5Kci7BfOh9QV+ZoG7hu9ERBGQCb9wwCGNkhW68v8OH2bsB1A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
  • Delivery-date: Mon, 17 Mar 2025 11:16:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Add debug DBG_FDT_PRINT_CHOSEN config file option which adds
print of DT "chosen" node at the end of generated U-boot script.

This is useful for debug and development purposes.

Example:
  ...
  setenv fdt_high 0xffffffffffffffff
  fdt print /chosen
  booti 0x43000000 - 0x43200000

Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
---
 README.md                | 8 ++++++++
 scripts/uboot-script-gen | 5 +++++
 2 files changed, 13 insertions(+)

diff --git a/README.md b/README.md
index 4ba430ce74c5..5b75018ea956 100644
--- a/README.md
+++ b/README.md
@@ -396,3 +396,11 @@ disk\_image supports these additional parameters on the 
config file:
 disk_image also generates on the fly a xl config file for each domU and
 adds them to the dom0 rootfs partition under /etc/xen. It makes it
 easier to start those domUs from dom0.
+
+
+## Debug
+
+This section defines config file debug options
+
+- DBG_FDT_PRINT_CHOSEN specifies that U-Boot script command to print DT 
"chosen"
+  node will be added to the boot script.
diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
index 0607542b1872..74e3b076910c 100755
--- a/scripts/uboot-script-gen
+++ b/scripts/uboot-script-gen
@@ -1357,6 +1357,11 @@ device_tree_editing $device_tree_addr
 # disable device tree reloation
 echo "setenv fdt_high 0xffffffffffffffff" >> $UBOOT_SOURCE
+if test "$DBG_FDT_PRINT_CHOSEN"
+then
+    echo "fdt print /chosen" >> $UBOOT_SOURCE
+fi
+
 # append extra u-boot commands (fixups) to script before boot command
 if test "$APPEND_EXTRA_CMDS"
 then
--
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.