Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

U-Boot issues

Altera_Forum
Honored Contributor II
1,791 Views

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. :(
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
491 Views

For the second issue...I had the same problem...with the latest u-boot....same addressing... 

 

if you type go 0xc0000000 restart correctly??? If yes I put a printf of the restart address in do_reset (cpu.c)...since then restarted well every time...don't ask me why!!! :confused: 

 

Hope help 

Carlo
0 Kudos
Altera_Forum
Honored Contributor II
491 Views

Hello, 

 

A patch will be present in the next released. Look at here: 

 

hxxp://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/82039 

 

Regards, 

Franck.
0 Kudos
Altera_Forum
Honored Contributor II
491 Views

thanks for the information :)

0 Kudos
Reply