Forum Discussion
Altera_Forum
Honored Contributor
14 years agoU-Boot v2 aka Barebox
Hello,
I'm inviting you to try this wonderfull bootloader named Barebox (here (http://barebox.org)). I added the nios2 arch to the project some times ago and now, we have some nios2 drivers availables: - altera uart, - jtag uart, - altera tse, - altera spi, Of course, others drivers are availables (nor, nand,...). I made a short tutorial/introduction to the usage of barebox with a neek board on my website: www.elec4fun.fr (http://www.elec4fun.fr) Enjoy :)16 Replies
- Altera_Forum
Honored Contributor
Indeed, we now have dt support in Barebox.
We should add the device tree support to the nios arch. I'll do that when I have time (or you ? :)). Franck. - Altera_Forum
Honored Contributor
Nice suggestion, but as you guess, I'm new in embedded developpement, and I just discover devicetree feature.
Also, I can send you my minor update of altera_tse driver. I don't know (I mean, howto) push it back to barebox project. Regards, Christophe - Altera_Forum
Honored Contributor
I'd be happy to merge your changes.
Check your PM. Franck. - Altera_Forum
Honored Contributor
Hi Franck,
Email send. Thanks. On another side, I face a new trouble. After fixing nios_sopc.h, barebox start, and I reach the prompt. But shortly after, without notice, an exception is raised.
First, this never happen with our previous MPU design. Second, It don't seems to occur when I "place" barebox at bottom of DDR3 (above 0xc8000000). Third, instruction @ XXXX is random. I give a look at nios2/lib/clock.c, and everything seems Ok. But I notice important side effect when I try some minor change on this file. Linux kernel still running nicely. Regards, Christophebarebox@generic:/ iomem 0x00000000 - 0xffffffff (size 0x00000000) iomem 0xc4000000 - 0xc41fffff (size 0x00200000) ssram0 0xc5200000 - 0xc527ffff (size 0x00080000) onchip0 0xc8000000 - 0xcfffffff (size 0x08000000) ram0 0xcff30000 - 0xcff3ffff (size 0x00010000) stack 0xcff40000 - 0xcff9ffff (size 0x00060000) malloc space 0xcffa0000 - 0xcffeb7cb (size 0x0004b7cc) barebox 0xcffeb7cc - 0xcffedd6b (size 0x000025a0) barebox data 0xcffedd6c - 0xcfff3227 (size 0x000054bc) bss 0xe0000000 - 0xe3ffffff (size 0x04000000) cfi_flash0 0xe5000000 - 0xe5001fff (size 0x00002000) altera_tse0 0xe5003000 - 0xe50033ff (size 0x00000400) altera_tse0 0xe5003400 - 0xe500343f (size 0x00000040) altera_tse0 0xe5003440 - 0xe500347f (size 0x00000040) altera_tse0 0xe6000080 - 0xe600009f (size 0x00000020) altera_serial_jtag0 0xe60000a0 - 0xe60000bf (size 0x00000020) altera_serial0 0xe60000c0 - 0xe60000df (size 0x00000020) altera_serial1 barebox@generic:/ *** ERROR: unimplemented instruction @ c350fb40 # ## ERROR# ## Please RESET the board# ## - Altera_Forum
Honored Contributor
Hi,
You should try to remove the more driver you can to check if one of them can cause this problem. Franck. - Altera_Forum
Honored Contributor
Hi,
After investigation, I found that exception raise come from __muldi3 and other operand operation. (_mult is used by cyc2ns()). Maybe it's not only barebox related issue, but when barebox is on top on ddr3 space (our range ddr3 is 0x800 0000 to 0xfff ffff), this exception occurs randomly (but at least 10s after starting). Another strange fact is, clock_source function are based on uint64_t, and exception seems to come form __multdi3, which is long long typed ! In fact, this exception doesn't occur with the same Nios2 design without MMU and Linux (with MMU). Regards, Christophe FPGA : Cyclone V Altera DevKit Tools : Quartus 12.1 WebEdition