Skip to content

Customize device tree for system emulation #527

Closed
@RinHizakura

Description

@RinHizakura

Currently, I want to try adding a -append option similar to QEMU to specify kernel boot args more conveniently. I want to discuss which implementation may be a better choice for the future development of rv32emu.

In more detail, system simulation is currently implemented using the -b option to provide a device tree describing the platform. However, because the device tree is coupled with the hardware (emulation) design of rv32emu itself, it means that even if the user wants to customize the device tree, he/she still needs to be based on a template like minimal.dts. Therefore, I think it might be more appropriate to design only parts of the device tree that provide specific options for tweaking.

For the requirement to customize bootargs, there are several possible options as far as I know:

  1. Use libfdt to dynamically create a device tree(similar to qemu)
  2. Use minimal.dts as the template, and then provide the option to apply dt overlay
  3. Represent dts as a formatted string, and then fill in the customized part when executing the emulator

Please let me know what you think about this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions