0

I am trying to emulate an Arm Cortex A8 processor / Texas Instruments Sitara AM335x processor using QEMU to run the firmware of an embedded device. My first attempt was to cross-compile kernel and userland with the ARMv5 toolchain to make it work with versatilepb. Actually, I was able to boot the kernel using QEMU but got a kernel panic when loading userland. I assume that some peripherals are missing for versatilepb that the firmware relies on.

Thus, I thought I can give the virt board a try (also because I am only interested in getting the guest to run).

As far as I understood, the virt board automatically generates a device tree blob, so I only have to pass my kernel image. However, when I run:

qemu-system-arm -M virt -m 1024 -kernel ./linuximage -cpu cortex-a7                                           
qemu-system-arm: Not enough space for DTB after kernel/initrd

I suspect that the LOADADDR that I pass when building the kernel is wrong. Currently, I have LOADADDR=0x4000_0000, because according to the documentation RAM starts at 0x4000_0000. Is this the wrong load address for this board? Any idea how I can debug this issue?

Also, I do believe that I am using the correct toolchain for the virt board, since, for example:

readelf -A ./build-target/linux-4.9.146/net/netlink/diag.o
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_ABI_PCS_wchar_t: 2
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_optimization_goals: Aggressive Size
  Tag_CPU_unaligned_access: v6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.