【问题标题】:Loading ROM bootloader in qemu在 qemu 中加载 ROM 引导程序
【发布时间】:2017-03-17 19:56:20
【问题描述】:

我有一个自定义的引导加载程序,我有引导加载程序的入口点,如何将这个地址指定给 qemu?

当我尝试使用这行 qemu-system-mips -pflash img_ 加载图像时,我也有这个警告:

WARNING: Image format was not specified for 'img_' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.

我试过-pflash=img_,format=raw,但没用。

谢谢。

【问题讨论】:

    标签: qemu


    【解决方案1】:

    您应该深入了解qemu sources 以在 qemu 中使用自定义引导加载程序映像。 QEMU 在board initilizaton function加载booloader,这是特定于板子的。

    运行以下命令查看所有可用的 MIPS 板模型:

    qemu-system-mips64 -machine  ?
    Supported machines are:
    magnum               MIPS Magnum
    malta                MIPS Malta Core LV (default)
    mips                 mips r4k platform
    mipssim              MIPS MIPSsim platform
    none                 empty machine
    pica61               Acer Pica 61
    

    这些模型在 qemu/hw/mips/ 文件中实现。 (寻找 * _init 函数)

    例如,对于 malta 板(默认)它是 hw/mips/mips_malta.c。查看 mips_malta_init 函数:它构造设备、总线和 cpu,注册内存区域并将引导加载程序放置到内存中。似乎 FLASH_ADDRESS 宏就是你要找的。​​p>

    请注意,此初始化函数对 QEMU 实现的所有板都是通用的。 此外,每个板子都有一些参考/数据表文档,QEMU 模型应该与它们相辅相成,作为程序员的视图。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-16
      • 2012-12-23
      • 1970-01-01
      • 2016-02-14
      • 2020-10-10
      • 1970-01-01
      • 2021-03-30
      • 1970-01-01
      相关资源
      最近更新 更多