0
votes

I am trying to run u-boot.bin for Beaglebone black on QEMU by using below instruction:

$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

By giving this instruction, it has taken almost 30mins but still I didn't get u-boot prompt.

u-boot.bin created by giving following instructions:

make CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf- make 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.

Please help me around.

2

2 Answers

0
votes

Running a U-Boot compiled for one board on a QEMU configuration for another machine is bound to fail.

If you want to run U-Boot in QEMU you should build one of the QEMU targets:

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

Instructions are provided in

  • doc/board/emulation/qemu-arm.rst
  • doc/board/emulation/qemu-mips.rst
  • doc/board/emulation/qemu-riscv.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_ca5x2_defconfig
  • vexpress_ca9x4_defconfig
0
votes

If you want to run u-boot on qemu then try the following:

  1. Get u-boot source.
  2. Prepare u-boot config files using make qemu_arm_config ARCH=arm CROSS_COMPILE=arm-none-eabi-
  3. 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

You can check here Implement custom u-boot command . Here the question refers to implementing a new u-boot command but build instructions you can follow to boot u-boot on qemu.