Forum Discussion
Altera_Forum
Honored Contributor
21 years agokernal build on custom board
I am trying to build the uC linux kernal for a custom board. I am not using an Altera or Microtronix board. The kernal build fails wrt the JTAG UART. It fails, apparently, in the same spot whether or not the JTAG UART is part of the NIOS core or not.
Any thoughts here? IRQ number wrong? Base address wrong? Something I have to change when configuring the kernal? Here is a list of the errors: Any and all help is much appreciated by this non-linux rookie. CC drivers/serial/altera_juart.o /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:347: error: `na_jtag_uart' undeclared here (not in a function) /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:347: error: initializer element is not constant /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:347: error: (near initialization for `juart_ports[0].port.membase') /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:348: error: `na_jtag_uart' undeclared here (not in a function) /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:348: error: initializer element is not constant /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:348: error: (near initialization for `juart_ports[0].port.mapbase') /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:350: error: `na_jtag_uart_irq' undeclared here (not in a function) /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:350: error: initializer element is not constant /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:350: error: (near initialization for `juart_ports[0].port.irq') /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:356: error: initializer element is not constant /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:356: error: (near initialization for `juart_ports[0].port') /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:357: error: initializer element is not constant /cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x/drivers/serial/altera_juart.c:357: error: (near initialization for `juart_ports[0]') make[3]: *** [drivers/serial/altera_juart.o] Error 1 make[2]: *** [drivers/serial] Error 2 make[1]: *** [drivers] Error 2 make: *** [all] Error 2 make: Leaving directory `/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_0.1.5/linux-2.6.x'3 Replies
- Altera_Forum
Honored Contributor
The first line,
error: `na_jtag_uart' undeclared here (not in a function) means that the compiler can't find the expected symbol for the jtag uart. In SOPC-builder, rename the jtag uart to "jtag_uart", regenerate and try again. You might get more errors of the same kind if you have not named the modules exactly as the kernel expects them to be. - Altera_Forum
Honored Contributor
Much appreciated - I'll give it a shot. Now, if only Microtronix supplied a listing of what peripherals are required and what they are called.....
- Altera_Forum
Honored Contributor
Sorry about that...
It'll be fixed in the next release. Our maintenance release will coincide with the release of Nios II I.1