Altera_Forum
Honored Contributor
15 years agoU-Boot issues
Hi all,
I am working on nios2mmu currently. u-boot always reports "*** ERROR: unimplemented instruction..." after the message "Uncompressing Kernel Image ... OK" I found the problem is in bootm.c. argc is only 2 while boot command is "bootm <boot-address>" and I need to comment out two lines in bootm.c to make boot sequence works. Do anyone meet the same issue and any suggestion ?. arch/nios2/lib/bootm.c
int do_bootm_linux(int flag, int argc, char * const argv, bootm_headers_t *images)
{
void (*kernel)(int, int, int, char *) = (void *)images->ep;
char *commandline = getenv("bootargs");
ulong initrd_start = images->rd_start;
ulong initrd_end = images->rd_end;
char *of_flat_tree = NULL;# if defined(CONFIG_OF_LIBFDT)
ulong of_size = 0;
/* find flattened device tree */
if (boot_get_fdt(flag, argc, argv, images, &of_flat_tree, &of_size))
return 1;# endif
// if (!of_flat_tree)
// of_flat_tree = (char *)simple_strtoul(argv, NULL, 16);
if (of_flat_tree)
initrd_end = (ulong)of_flat_tree;
if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
return 1;
/* flushes data and instruction caches before calling the kernel */
disable_interrupts();
flush_dcache((ulong)kernel, CONFIG_SYS_DCACHE_SIZE);
flush_icache((ulong)kernel, CONFIG_SYS_ICACHE_SIZE);
debug("bootargs=%s @ 0x%lx\n", commandline, (ulong)&commandline);
debug("initrd=0x%lx-0x%lx\n", (ulong)initrd_start, (ulong)initrd_end);
/* kernel parameters passing
second issue I met is reset command. it never work. my flash base address is 0x0 CONFIG_SYS_RESET_ADDR is 0xc0000000 from nios wiki, it should work, but it never happen to me. :(