简体   繁体   English

使用 QEMU 进行 Beaglebone 黑色仿真

[英]Beaglebone black emulation with QEMU

I am trying to run u-boot.bin for Beaglebone black on QEMU by using below instruction:我正在尝试使用以下指令在 QEMU 上为 Beaglebone black 运行 u-boot.bin:

$qemu-system-arm -M realview-pb-a8 -nographic -kernel /media/remo/xyz/EmbeddedLinux/u-boot-source-code/u-boot/u-boot.bin $qemu-system-arm -M realview-pb-a8 -nographic -kernel /media/remo/xyz/EmbeddedLinux/u-boot-source-code/u-boot/u-boot.bin

First of all, whether the machine I am using here is appropriate for BBB as there is no machine listed for BBB I have used realview-pb-a8首先,我在这里使用的机器是否适合BBB,因为没有为BBB列出的机器我使用过realview-pb-a8

By giving this instruction, it has taken almost 30mins but still I didn't get u-boot prompt.通过给出这个指令,它花了将近 30 分钟,但我仍然没有得到 u-boot 提示。

u-boot.bin created by giving following instructions: u-boot.bin 通过给出以下指令创建:

make CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf- make CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf-_boneblack_vboot_defconfig使 CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf- 使 CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf-_boneblack_vboot_defconfig

This is the first time I am running u-boot on qemu in the process of learning Embedded Linux.这是我在学习Embedded Linux的过程中第一次在qemu上运行u-boot。

Please help me around.请帮帮我。

Running a U-Boot compiled for one board on a QEMU configuration for another machine is bound to fail.在另一台机器的 QEMU 配置上运行为一块板编译的 U-Boot 肯定会失败。

If you want to run U-Boot in QEMU you should build one of the QEMU targets:如果你想在 QEMU 中运行 U-Boot,你应该构建一个 QEMU 目标:

  • qemu_arm64_defconfig qemu_arm64_defconfig
  • qemu_arm_defconfig qemu_arm_defconfig
  • qemu_mips64_defconfig qemu_mips64_defconfig
  • qemu_mips64el_defconfig qemu_mips64el_defconfig
  • qemu_mips_defconfig qemu_mips_defconfig
  • qemu_mipsel_defconfig qemu_mipsel_defconfig
  • qemu-ppce500_defconfig qemu-ppce500_defconfig
  • qemu-riscv32_defconfig qemu-riscv32_defconfig
  • qemu-riscv32_smode_defconfig qemu-riscv32_smode_defconfig
  • qemu-riscv32_spl_defconfig qemu-riscv32_spl_defconfig
  • qemu-riscv64_defconfig qemu-riscv64_defconfig
  • qemu-riscv64_smode_defconfig qemu-riscv64_smode_defconfig
  • qemu-riscv64_spl_defconfig qemu-riscv64_spl_defconfig
  • qemu-x86_64_defconfig qemu-x86_64_defconfig
  • qemu-x86_defconfig qemu-x86_defconfig

Instructions are provided in说明在

  • doc/board/emulation/qemu-arm.rst doc/board/emulation/qemu-arm.rst
  • doc/board/emulation/qemu-mips.rst doc/board/emulation/qemu-mips.rst
  • doc/board/emulation/qemu-riscv.rst doc/board/emulation/qemu-riscv.rst
  • doc/board/emulation/qemu-x86.rst doc/board/emulation/qemu-x86.rst

If you have a match between the emulated machine and the image you can also run other configuration.如果您在模拟机器和图像之间有匹配,您还可以运行其他配置。 The following ones are known to be usable:以下是已知可用的:

  • vexpress_ca15_tc2_defconfig vexpress_ca15_tc2_defconfig
  • vexpress_ca5x2_defconfig vexpress_ca5x2_defconfig
  • vexpress_ca9x4_defconfig vexpress_ca9x4_defconfig

If you want to run u-boot on qemu then try the following:如果您想在 qemu 上运行 u-boot,请尝试以下操作:

  1. Get u-boot source.获取u-boot源码。
  2. Prepare u-boot config files using make qemu_arm_config ARCH=arm CROSS_COMPILE=arm-none-eabi-使用make qemu_arm_config ARCH=arm CROSS_COMPILE=arm-none-eabi-准备 u-boot 配置文件
  3. Build u-boot make all ARCH=arm CROSS_COMPILE=arm-none-eabi- Build u-boot make all ARCH=arm CROSS_COMPILE=arm-none-eabi-
  4. Launch qemu with u-boot image qemu-system-arm -M virt -nographic -kernel u-boot使用 u-boot 启动 qemu 映像qemu-system-arm -M virt -nographic -kernel u-boot

You can check here Implement custom u-boot command .您可以在此处查看实施自定义 u-boot 命令 Here the question refers to implementing a new u-boot command but build instructions you can follow to boot u-boot on qemu.这里的问题是指实现一个新的u-boot命令,但是您可以按照构建说明在 qemu 上启动 u-boot。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM