qemu-system-arm and bootloader emulation
Currently, qemu-system-arm attempts to emulate a simple boot-loader if it thinks it is booting a u-boot image or a raw image (see hw/arm-boot.c), and not if it's booting an ELF image.
I think this is a little backwards: when I give a raw ROM image as argument I want no boot-loader, and when I give an ELF image I want a bootloader to do its stuff, particularly when emulating an MP system.
And sometimes a uimage is something that is a rom image (and doesn't need a bootloader) and sometimes it is a Linux or other OS kernel (that may need some bootloader support).
I'm not sure what the right' thing to do is: but I would like more control over whether the bootloader code is executed. One possibility is to provide an environment variable, say, QEMU_RAW'. Another is to look at the load address --- if it's equal to boot_info->loader_start then this is a raw ROM image and qemu should treate the first few bytes as the reset vector, and otherwise emulate the boot-loader.
What do you think?
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia