Revision ca20cf32 hw/arm_boot.c

b/hw/arm_boot.c
10 10
#include "hw.h"
11 11
#include "arm-misc.h"
12 12
#include "sysemu.h"
13
#include "loader.h"
14
#include "elf.h"
13 15

  
14 16
#define KERNEL_ARGS_ADDR 0x100
15 17
#define KERNEL_LOAD_ADDR 0x00010000
......
191 193
    int n;
192 194
    int is_linux = 0;
193 195
    uint64_t elf_entry;
194
    target_ulong entry;
196
    target_phys_addr_t entry;
197
    int big_endian;
195 198

  
196 199
    /* Load the kernel.  */
197 200
    if (!info->kernel_filename) {
......
206 209
        qemu_register_reset(main_cpu_reset, env);
207 210
    }
208 211

  
212
#ifdef TARGET_WORDS_BIGENDIAN
213
    big_endian = 1;
214
#else
215
    big_endian = 0;
216
#endif
217

  
209 218
    /* Assume that raw images are linux kernels, and ELF images are not.  */
210
    kernel_size = load_elf(info->kernel_filename, 0, &elf_entry, NULL, NULL);
219
    kernel_size = load_elf(info->kernel_filename, 0, &elf_entry, NULL, NULL,
220
                           big_endian, ELF_MACHINE, 1);
211 221
    entry = elf_entry;
212 222
    if (kernel_size < 0) {
213 223
        kernel_size = load_uimage(info->kernel_filename, &entry, NULL,

Also available in: Unified diff