riscvarchive / riscv-qemu

QEMU with RISC-V (RV64G, RV32G) Emulation Support
384 stars 154 forks source link

Support loading binary files in addition to ELF files #175

Open lukasauer opened 5 years ago

lukasauer commented 5 years ago

The kernel and bootloader are not always available as ELF files, or directly executable. For example, the kernel might be included together with a device tree inside of an image. Support this use case by adding support for loading binary files in addition to ELF files.

With this patch, the files specified with the -bios and -kernel parameters are attempted to be loaded as ELF files first. If this fails, they are loaded directly to memory instead.

lukasauer commented 5 years ago

Ping? The Travis CI failures seem to be unrelated to my patch.

lukasauer commented 5 years ago

I have updated my patch with your comments. Please let me know if it looks good to you now.