|
需要修改qemu-mini2440/hw/mini2440.c文件:
304行加入:
static void mini2440_reset_for_sylixos(void *opaque)
{
struct mini2440_board_s *s = (struct mini2440_board_s *) opaque;
int32_t image_size;
s->cpu->env->regs[15] = 0;
if (s->kernel) {
if (strstr(s->kernel, "u-boot.bin")) {
image_size = load_image(s->kernel, qemu_get_ram_ptr(0x03f80000));
if (image_size > 0) {
mini2440_printf("loaded %s (size %x)\n", s->kernel, image_size);
s->cpu->env->regs[15] = S3C_RAM_BASE | 0x03f80000;
}
} else {
image_size = load_image(s->kernel, qemu_get_ram_ptr(0));
if (image_size > 0) {
mini2440_printf("loaded %s (size %x)\n", s->kernel, image_size);
s->cpu->env->regs[15] = S3C_RAM_BASE;
}
}
}
}
376行:
#if 0
qemu_register_reset(mini2440_reset, s);
#else
qemu_register_reset(mini2440_reset_for_sylixos, s);
#endif
403行:
mini->nand = nand_init(NAND_MFR_SAMSUNG, 0xf1);
这样可以把Nand Flash大小改为128MB。
406行:
#if 0
mini2440_reset(mini);
#else
mini2440_reset_for_sylixos(mini);
#endif
需要修改qemu-mini2440/gdbstub.c文件:
2347行:
#if 0
snprintf(gdbstub_device_name, sizeof(gdbstub_device_name),
"%s,nowait,nodelay,server", device);
#else /* for sylixos, add ipv4 option, by jiaojinxing1987@gmail.com */
snprintf(gdbstub_device_name, sizeof(gdbstub_device_name),
"%s,nowait,nodelay,server,ipv4", device);
#endif
Qemu的gdb server默认监听ipv6的1234端口,改为ipv4的,否则arm-none-eabi-gdb连接不上。
|
|