hw/arm: Use 'load_ramdisk()' for loading ramdisks w/ U-Boot header
The load_ramdisk function is used to load ramdisk featuring a U-Boot header. Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373323202-17083-3-git-send-email-soren.brinkmann@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
84aee0deae
commit
fd76663e3f
|
@ -411,10 +411,16 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
|
||||||
info->entry = entry;
|
info->entry = entry;
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
if (info->initrd_filename) {
|
if (info->initrd_filename) {
|
||||||
|
initrd_size = load_ramdisk(info->initrd_filename,
|
||||||
|
info->initrd_start,
|
||||||
|
info->ram_size -
|
||||||
|
info->initrd_start);
|
||||||
|
if (initrd_size < 0) {
|
||||||
initrd_size = load_image_targphys(info->initrd_filename,
|
initrd_size = load_image_targphys(info->initrd_filename,
|
||||||
info->initrd_start,
|
info->initrd_start,
|
||||||
info->ram_size -
|
info->ram_size -
|
||||||
info->initrd_start);
|
info->initrd_start);
|
||||||
|
}
|
||||||
if (initrd_size < 0) {
|
if (initrd_size < 0) {
|
||||||
fprintf(stderr, "qemu: could not load initrd '%s'\n",
|
fprintf(stderr, "qemu: could not load initrd '%s'\n",
|
||||||
info->initrd_filename);
|
info->initrd_filename);
|
||||||
|
|
Loading…
Reference in a new issue