Alex Richardson has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/68479?usp=email )

Change subject: configs: Add /chosen/bootargs property to riscv/fs_linux.py fdt
......................................................................

configs: Add /chosen/bootargs property to riscv/fs_linux.py fdt

This matches QEMU which also passes the kernel command line in the fdt.

Change-Id: I7adf88d727579f473fdf0f435809c41cdbeb4928
---
M configs/example/riscv/fs_linux.py
1 file changed, 13 insertions(+), 9 deletions(-)



diff --git a/configs/example/riscv/fs_linux.py b/configs/example/riscv/fs_linux.py
index e4972fb..c7b06b2 100644
--- a/configs/example/riscv/fs_linux.py
+++ b/configs/example/riscv/fs_linux.py
@@ -114,6 +114,11 @@
     root.append(state.sizeCellsProperty())
     root.appendCompatible(["riscv-virtio"])
     root.append(FdtPropertyStrings("model", ["riscv-virtio,gem5"]))
+    chosen_node = FdtNode("chosen")
+    chosen_node.append(
+        FdtPropertyStrings("bootargs", [system.workload.command_line])
+    )
+    root.append(chosen_node)

     for mem_range in system.mem_ranges:
         root.append(generateMemNode(state, mem_range))
@@ -303,6 +308,13 @@
 # --------------------------- DTB Generation --------------------------- #

 if not args.bare_metal:
+    # Linux boot command flags
+    if args.command_line:
+        system.workload.command_line = args.command_line
+    else:
+        kernel_cmd = ["console=ttyS0", "root=/dev/vda", "ro"]
+        system.workload.command_line = " ".join(kernel_cmd)
+
     if args.dtb_filename:
         system.workload.dtb_filename = args.dtb_filename
     else:
@@ -310,17 +322,9 @@
         system.workload.dtb_filename = path.join(
             m5.options.outdir, "device.dtb"
         )
-
-    # Default DTB address if bbl is bulit with --with-dts option
+    # Default DTB address if bbl is built with --with-dts option
     system.workload.dtb_addr = 0x87E00000

-    # Linux boot command flags
-    if args.command_line:
-        system.workload.command_line = args.command_line
-    else:
-        kernel_cmd = ["console=ttyS0", "root=/dev/vda", "ro"]
-        system.workload.command_line = " ".join(kernel_cmd)
-
 # ---------------------------- Default Setup --------------------------- #

 if (

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/68479?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I7adf88d727579f473fdf0f435809c41cdbeb4928
Gerrit-Change-Number: 68479
Gerrit-PatchSet: 1
Gerrit-Owner: Alex Richardson <alexrichard...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to